Files
viseq/src/interactable.h
T

41 lines
742 B
C++
Raw Normal View History

2024-11-09 23:56:40 +01:00
#pragma once
#include "datatypes.h"
#include "vmath.h"
2026-06-24 11:04:28 +02:00
2024-11-09 23:56:40 +01:00
namespace VISEQ::BASE {
class Interactable{
public:
Interactable() {
static int _z_index = 0;
z_index = _z_index;
_z_index++;
}
2024-11-09 23:56:40 +01:00
virtual ~Interactable() {}
2026-06-26 01:50:32 +02:00
bool is_hovering = false;
int z_index = 0;
inline static int z_hovering = 0;
virtual bool hovering() = 0;
virtual bool entered() {return false;};
virtual bool exited() {return false;};
2026-05-04 18:40:00 +02:00
virtual bool clicked();
2026-05-04 18:40:00 +02:00
virtual bool held();
2024-11-09 23:56:40 +01:00
2026-05-04 18:40:00 +02:00
virtual bool released();
virtual GRAPH::GraphItemType getType() = 0;
virtual void pickUp() = 0;
virtual void pickUp(Vec2Df position) = 0;
virtual void drag(Vec2Df position) = 0;
virtual void putDown() = 0;
2024-11-09 23:56:40 +01:00
};
}