Starting work on moving GUI to event system (doesnt compile)
This commit is contained in:
parent
f1a855edc3
commit
ef7dfcef05
69 changed files with 4296 additions and 3709 deletions
|
|
@ -5,13 +5,19 @@ namespace GUIStuff {
|
|||
|
||||
class CheckBox : public Element {
|
||||
public:
|
||||
void update(UpdateInputData& io, bool newIsTicked, const std::function<void()>& elemUpdate);
|
||||
CheckBox(GUIManager& gui);
|
||||
|
||||
virtual void clay_draw(SkCanvas* canvas, UpdateInputData& io, Clay_RenderCommand* command, bool skiaAA) override;
|
||||
SelectionHelper selection;
|
||||
virtual bool input_mouse_button_callback(const InputManager::MouseButtonCallbackArgs& button, bool mouseHovering) override;
|
||||
virtual bool input_mouse_motion_callback(const InputManager::MouseMotionCallbackArgs& motion, bool mouseHovering) override;
|
||||
|
||||
void layout(const std::function<bool()>& isTicked, const std::function<void()>& onClick);
|
||||
private:
|
||||
static constexpr float CHECKBOX_ANIMATION_TIME = 0.3;
|
||||
bool isTicked = false;
|
||||
bool isHovering = false;
|
||||
float hoverAnimation2 = 0.0;
|
||||
std::function<bool()> isTicked;
|
||||
std::function<void()> onClick;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue