Files
Cubed/include/Cubed/ui/button.hpp
zhenyan121 5712ba0600 refactor(core): add event system and scene management
- Introduce Event variant and Overloaded helper for input handling
- Move game state (camera, client_world, dev_panel) from App to WorldScene
- Add SceneManager with push/pop/change operations for scene stack
- Refactor input callbacks to dispatch events through scene hierarchy
- Extract Argument struct to separate header
- Update Renderer and WorldRenderer to accept world reference
- Replace global input state with event-driven processing in ClientPlayer, Camera, etc.
2026-07-12 16:05:59 +08:00

19 lines
306 B
C++

#pragma once
#include "Cubed/ui/widget.hpp"
#include <functional>
namespace Cubed {
class Button : public Widget {
public:
Button();
template <typename F> Button& set_clicked(F&& f) {
m_clicked = std::move(f);
}
private:
std::function<void()> m_clicked;
};
} // namespace Cubed