Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ur_ui_navigation.hpp
Go to the documentation of this file.
1
11
12#ifndef ZOAPPUINAVIGATION_H
13#define ZOAPPUINAVIGATION_H
14
15#define GLM_ENABLE_EXPERIMENTAL
16
17#include <glm/gtx/string_cast.hpp>
18
19#include <toymaker/engine/sim_system.hpp>
20
21
27class UrUINavigation: public ToyMaker::SimObjectAspect<UrUINavigation> {
28public:
29 UrUINavigation(): ToyMaker::SimObjectAspect<UrUINavigation>{0} {}
30 inline static std::string getSimObjectAspectTypeName() { return "UrUINavigation"; }
31 static std::shared_ptr<BaseSimObjectAspect> create(const nlohmann::json& jsonAspectProperties);
32 std::shared_ptr<BaseSimObjectAspect> clone() const override;
33
34 void loadScene(const std::string& sceneResourceName);
35
36 void onActivated() override;
37
38private:
39 std::string mSceneManagerPath {};
40
41 void onButtonClicked(const std::string& button);
42 void onButtonHoveredOver(const std::string& button);
43
44public:
45 ToyMaker::SignalObserver<const std::string&> mObserveButtonClicked {
46 *this, "ButtonClickedObserved",
47 [this](const std::string& button) { this->onButtonClicked(button); }
48 };
49 ToyMaker::SignalObserver<const std::string&> mObserveButtonHoveredOver {
50 *this, "ButtonHoveredOverObserved",
51 [this](const std::string& button) { this->onButtonHoveredOver(button); }
52 };
53};
54
55#endif