Starting work on moving GUI to event system (doesnt compile)

This commit is contained in:
Yousef Khadadeh 2026-03-27 09:51:53 +03:00
parent f1a855edc3
commit ef7dfcef05
69 changed files with 4296 additions and 3709 deletions

View file

@ -5,17 +5,25 @@ namespace GUIStuff {
class RotateWheel : public Element {
public:
void update(UpdateInputData& io, double* newRotationAnglePtr, const std::function<void()>& elemUpdate);
RotateWheel(GUIManager& gui);
void layout(double* rotateAngle, const std::function<void()>& onChange);
virtual void clay_draw(SkCanvas* canvas, UpdateInputData& io, Clay_RenderCommand* command, bool skiaAA) override;
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;
SelectionHelper selection;
private:
float wheel_start();
float wheel_end();
void draw_rotate_wheel(SkCanvas* canvas, UpdateInputData& io, bool skiaAA);
double rotateAngle = 0.0f;
SCollision::AABB<float> bb;
bool wheelHovered;
double* rotateAngle = nullptr;
bool isHeld = false;
bool isHovering = false;
bool isRotateBarHeld = false;
bool isRotateBarHovered = false;
std::function<void()> onChange;
void update_paint_circle_menu_mouse(const Vector2f& p, bool leftClicked);
};
}