29#pragma region static_functions
49#pragma region overridden_functions
53 return std::make_unique<Options>(*
this);
56 auto onUpdate(
float dt) ->
void override;
66 auto load(
const Stream& stream) ->
void override;
67 auto save(
Stream& stream)
const ->
void override;
71#pragma region Options_Functions
116#pragma region member_variables
128#pragma region helper_functions
132#pragma region static_variables
sys::Json Stream
Definition AudioObject.h:20
The class that holds the top node, and manages the main game loop, as well as startup and shutdown.
static auto getSystem() -> system *
A function to get a system.
Definition Engine.h:46
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Type
Definition System.h:20
@ Options
Definition System.h:39
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
Definition AudioSystem.h:26
Options(Options &&other) noexcept=default
AudioSystem * audio
Definition Options.h:124
float uiVolume
Definition Options.h:119
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Options.h:51
auto onUpdate(float dt) -> void override
called once every frame.
Definition Options.cpp:47
auto operator=(Options &&other) noexcept -> Options &=default
static auto getEnum() -> Type
function required by all systems
Definition Options.h:34
auto getUIVolume() const -> float
Returns the UI volume.
Definition Options.cpp:126
float musicVolume
Definition Options.h:120
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Options.cpp:60
auto setMusicVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:105
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition Options.cpp:70
~Options() override=default
bool fullScreen
Definition Options.h:122
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Options.cpp:52
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Options.cpp:56
Options(const Options &other)=default
auto setFullscreen(bool flag) -> void
Changes if the game is in fullscreen.
Definition Options.cpp:111
float masterVolume
Definition Options.h:118
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Options.h:60
auto setMasterVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:93
Options()
Definition Options.cpp:29
auto getMusicVolume() const -> float
Returns the music volume.
Definition Options.cpp:131
auto getMasterVolume() const -> float
Returns the master volume.
Definition Options.cpp:121
auto setUIVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:99
auto operator=(const Options &other) -> Options &
Definition Options.cpp:34
auto getFullscreen() const -> bool
Returns if the game is in fullscreen.
Definition Options.cpp:136
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Options.cpp:65
the type of elements in a basic_json container
Definition GameObject.h:32