Some progress on selecting, hovering but still buggy and not a good design really.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "interactable.h"
|
||||
|
||||
namespace VISEQ::BASE {
|
||||
class Selectable : public Interactable{
|
||||
public:
|
||||
Selectable() {}
|
||||
|
||||
bool in_selection_rect = false;
|
||||
bool selected = false;
|
||||
|
||||
bool copied = false;
|
||||
bool highlighted = false;
|
||||
bool erase = false;
|
||||
|
||||
virtual bool clicked() override {
|
||||
return (selected || hovering()) && IsMouseButtonPressed(MOUSE_BUTTON_LEFT);
|
||||
}
|
||||
|
||||
virtual void select() = 0;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user