29#pragma region static_functions
43 constexpr auto value = 0.15f;
51 constexpr auto value = 0.05f;
65#pragma region overridden_functions
69 return std::make_unique<Options>(*
this);
72 auto onUpdate(
float dt) ->
void override;
82 auto load(
const Stream& stream) ->
void override;
83 auto save(
Stream& stream)
const ->
void override;
87#pragma region Options_Functions
132#pragma region member_variables
144#pragma region helper_functions
148#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:50
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:24
Type
Definition System.h:20
@ Options
Definition System.h:40
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:140
float uiVolume
Definition Options.h:135
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition Options.h:67
auto onUpdate(float dt) -> void override
called once every frame.
Definition Options.cpp:49
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:128
float musicVolume
Definition Options.h:136
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition Options.cpp:62
auto setMusicVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:107
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition Options.cpp:72
~Options() override=default
bool fullScreen
Definition Options.h:138
auto onRender() -> void override
called every frame after update has been called for every object.
Definition Options.cpp:54
static float MAX_OVERRIDE_VOLUME()
enum-like function to get the max volume of the game (this is the max volume the override channel sho...
Definition Options.h:41
static float LOW_VOLUME()
enum-like function to get the paused volume of the game (this is the volume the override channel shou...
Definition Options.h:49
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition Options.cpp:58
Options(const Options &other)=default
auto setFullscreen(bool flag) -> void
Changes if the game is in fullscreen.
Definition Options.cpp:113
float masterVolume
Definition Options.h:134
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition Options.h:76
auto setMasterVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:95
Options()
Definition Options.cpp:31
auto getMusicVolume() const -> float
Returns the music volume.
Definition Options.cpp:133
auto getMasterVolume() const -> float
Returns the master volume.
Definition Options.cpp:123
auto setUIVolume(float newVolume) -> void
Changes the master volume level through Audio system and then updates the Options system toggle.
Definition Options.cpp:101
auto operator=(const Options &other) -> Options &
Definition Options.cpp:36
auto getFullscreen() const -> bool
Returns if the game is in fullscreen.
Definition Options.cpp:138
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition Options.cpp:67
the type of elements in a basic_json container
Definition GameObject.h:37