Brunot
Loading...
Searching...
No Matches
OptionsScene.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19#pragma once
20#include "Framework/Component.h"
21#include "Utility/Path/Path.h"
22
23class OptionsScene : public Component
24{
25public:
26#pragma region static_functions
27
28#pragma endregion
29
32 auto operator=(const OptionsScene&) -> OptionsScene& = default;
33 ~OptionsScene() override = default;
34 OptionsScene(OptionsScene&& other) noexcept;
35 auto operator=(OptionsScene&& other) noexcept -> OptionsScene& = default;
36
37#pragma region overriden_functions
38
39 auto clone() const -> std::unique_ptr<GameObject> override
40 {
41 return std::make_unique<OptionsScene>(*this);
42 }
43
44 auto componentShowMenu() -> void override
45 {
46 } // for debug ImGUI
47 auto onUpdate(float dt) -> void override;
48
49 auto endWindow() -> void override
50 {
51 } // for debug ImGUI
52 auto onRender() -> void override;
53 auto onEnterEngine() -> void override;
54 auto load(Stream& stream) -> void override;
55 auto save(Stream& stream) const -> void override;
56
57 friend auto to_json(json& j, const OptionsScene& n) -> void;
58 friend auto from_json(const json& j, OptionsScene& n) -> void;
59
60
61#pragma endregion
62
63#pragma region OptionsScene_functions
64
65 auto moveSelectorToMenu(int menuLevel) -> void;
66
67#pragma endregion
68
69#pragma region messaging_functions
70 auto linkMessages() -> void;
71
72 auto optionsReceiveUpKeyPressed(const Message* message) -> Message;
73 auto optionsReceiveDownKeyPressed(const Message* message) -> Message;
74
75 auto masterAudioMenu(const Message* message) -> Message;
76 auto uiAudioMenu(const Message* message) -> Message;
77 auto musicAudioMenu(const Message* message) -> Message;
78 auto fullScreenMenu(const Message* message) -> Message;
79 auto backMenu(const Message* message) -> Message;
80
81#pragma endregion
82
83private:
84#pragma region member_variables
85
87 int level = 0;
88
89#pragma endregion
90
91#pragma region helper_functions
92
93#pragma endregion
94
95#pragma region static_variables
96
98
99#pragma endregion
100
101};
sys::Json Stream
Definition AudioObject.h:20
The base class for components, holding all of their shared All components should inherit from this.
nlohmann::json json
Definition Json.cpp:19
An object that represents where a GameObject or a range of GameObjects exists in the Engine.
Component(ComponentTypeEnum type, const char *typeName)
Definition Component.cpp:72
friend Entity
Definition GameObject.h:84
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Definition OptionsScene.h:24
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition OptionsScene.h:39
auto uiAudioMenu(const Message *message) -> Message
Definition OptionsScene.cpp:230
auto musicAudioMenu(const Message *message) -> Message
Definition OptionsScene.cpp:253
auto operator=(const OptionsScene &) -> OptionsScene &=default
auto operator=(OptionsScene &&other) noexcept -> OptionsScene &=default
Entity * selector
Definition OptionsScene.h:97
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition OptionsScene.cpp:66
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition OptionsScene.h:49
auto backMenu(const Message *message) -> Message
Definition OptionsScene.cpp:283
auto optionsReceiveUpKeyPressed(const Message *message) -> Message
Definition OptionsScene.cpp:180
auto masterAudioMenu(const Message *message) -> Message
Definition OptionsScene.cpp:206
auto onUpdate(float dt) -> void override
called once every frame.
Definition OptionsScene.cpp:57
OptionsScene()
Definition OptionsScene.cpp:35
auto linkMessages() -> void
Definition OptionsScene.cpp:130
friend auto from_json(const json &j, OptionsScene &n) -> void
Definition OptionsScene.cpp:110
auto fullScreenMenu(const Message *message) -> Message
Definition OptionsScene.cpp:273
~OptionsScene() override=default
friend auto to_json(json &j, const OptionsScene &n) -> void
Definition OptionsScene.cpp:103
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition OptionsScene.cpp:98
auto optionsReceiveDownKeyPressed(const Message *message) -> Message
Definition OptionsScene.cpp:193
auto load(Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition OptionsScene.cpp:93
auto onRender() -> void override
called every frame after update has been called for every object.
Definition OptionsScene.cpp:62
auto componentShowMenu() -> void override
Definition OptionsScene.h:44
int level
Keeps track of which menu you are currently selecting.
Definition OptionsScene.h:87
auto moveSelectorToMenu(int menuLevel) -> void
Definition OptionsScene.cpp:117
Definition Message.h:34