mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
ui: add main menu scene and interactive button widget
- Implement MainMenuScene with a "Start Game" button that pushes the WorldScene. - Extend Button class with background/foreground, hover detection, and size queries. - Add virtual width/height and event handlers to Widget base class. - Update WorldUIManager to propagate mouse move events. - Adjust Window mouse mode based on game running state.
This commit is contained in:
@@ -25,7 +25,7 @@ public:
|
||||
private:
|
||||
WorldScene& m_scene;
|
||||
std::unordered_map<std::string, std::unique_ptr<Widget>> m_widgets;
|
||||
|
||||
bool handle_mouse_move_event(const MouseMoveEvent& e);
|
||||
bool handle_mouse_button_event(const MouseButtonEvent& e);
|
||||
bool handle_window_resize_event(const WindowResizeEvent& e);
|
||||
bool handle_mouse_wheel_event(const MouseWheelEvent& e);
|
||||
|
||||
Reference in New Issue
Block a user