mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
- 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.
19 lines
306 B
C++
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
|