41 lines
742 B
C++
41 lines
742 B
C++
#pragma once
|
|
|
|
#include "datatypes.h"
|
|
#include "vmath.h"
|
|
|
|
namespace VISEQ::BASE {
|
|
|
|
class Interactable{
|
|
public:
|
|
Interactable() {
|
|
static int _z_index = 0;
|
|
z_index = _z_index;
|
|
_z_index++;
|
|
}
|
|
|
|
virtual ~Interactable() {}
|
|
|
|
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;};
|
|
|
|
virtual bool clicked();
|
|
|
|
virtual bool held();
|
|
|
|
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;
|
|
};
|
|
|
|
}
|