galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Settings Struct Reference

Helper class to encapsulate our global settings we want to quickly access across app. More...

#include <Settings.hpp>

Collaboration diagram for galaxy::Settings:

Static Public Member Functions

static auto set_config_to_default () -> void
 Restore all config settings to default.
static auto set_settings_from_config () -> void
 Set all our settings using the provided config file.
static auto log_dir () noexcept -> const std::string &
 Current root directory of application, unless it has been changed.
static auto window_width () noexcept -> int
 Window creation width.
static auto window_height () noexcept -> int
 Window creation height.
static auto title () noexcept -> const std::string &
 Game title.
static auto vsync () noexcept -> bool
 Vsync control.
static auto window_resizable () noexcept -> bool
 Is the window resizable.
static auto decoration () noexcept -> bool
 Controls if a window has a border around it (including titlebar).
static auto fullscreen () noexcept -> bool
 Is window started fullscreen.
static auto maximized () noexcept -> bool
 Is window started maximized?
static auto minimized () noexcept -> bool
 Is window started minimized?
static auto borderless_fullscreen () noexcept -> bool
 Is window in borderless fullscreen?
static auto window_icon () noexcept -> const std::string &
 Window icon file in vfs.
static auto ontop () noexcept -> bool
 Should the window always be on top.
static auto root_dir () noexcept -> std::filesystem::path
 Current root directory of application, unless it has been changed.
static auto assets_dir () noexcept -> std::filesystem::path
 Main data directory.
static auto asset_pack () noexcept -> const std::string &
 Name of packed assets file.
static auto use_loose_assets () noexcept -> bool
 Should asset data be read from pack or assets dir.
static auto assets_dir_music () noexcept -> const std::string &
 Music asset location.
static auto assets_dir_sfx () noexcept -> const std::string &
 SFX asset location.
static auto assets_dir_voice () noexcept -> const std::string &
 Voice asset location.
static auto assets_dir_font () noexcept -> const std::string &
 Font asset location.
static auto assets_dir_script () noexcept -> const std::string &
 Scripts asset location.
static auto assets_dir_shaders () noexcept -> const std::string &
 Shaders asset location.
static auto assets_dir_animation () noexcept -> const std::string &
 Animation data location.
static auto assets_dir_texture () noexcept -> const std::string &
 Textures asset location.
static auto assets_dir_prefabs () noexcept -> const std::string &
 Prefab asset location.
static auto assets_dir_maps () noexcept -> const std::string &
 Maps asset location.
static auto assets_dir_video () noexcept -> const std::string &
 Video asset location.
static auto assets_dir_ui () noexcept -> const std::string &
 UI asset location.
static auto cursor_locked () noexcept -> bool
 Is the cursor grabbed.
static auto cursor_show () noexcept -> bool
 Is the mouse cursor visible or not.

Static Private Attributes

static int s_window_width
static int s_window_height
static std::string s_title
static bool s_vsync
static bool s_resizable
static bool s_decoration
static bool s_fullscreen
static bool s_maximized
static bool s_minimized
static bool s_borderless
static std::string s_window_icon
static bool s_ontop
static std::filesystem::path s_assets_dir
static std::string s_asset_pack
static bool s_use_loose_assets
static std::string s_assets_music
static std::string s_assets_sfx
static std::string s_assets_voice
static std::string s_assets_font
static std::string s_assets_script
static std::string s_assets_shaders
static std::string s_assets_animation
static std::string s_assets_texture
static std::string s_assets_prefabs
static std::string s_assets_maps
static std::string s_assets_video
static std::string s_assets_ui
static bool s_cursor_locked
static bool s_cursor_show

Detailed Description

Helper class to encapsulate our global settings we want to quickly access across app.

Definition at line 18 of file Settings.hpp.

Member Function Documentation

◆ set_config_to_default()

auto galaxy::Settings::set_config_to_default ( ) -> void
static

Restore all config settings to default.

Definition at line 23 of file Settings.cpp.

Here is the caller graph for this function:

◆ set_settings_from_config()

auto galaxy::Settings::set_settings_from_config ( ) -> void
static

Set all our settings using the provided config file.

Definition at line 80 of file Settings.cpp.

Here is the caller graph for this function:

◆ log_dir()

auto galaxy::Settings::log_dir ( ) -> const std::string &
staticnodiscardnoexcept

Current root directory of application, unless it has been changed.

Returns
Const string.

Definition at line 137 of file Settings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ window_width()

auto galaxy::Settings::window_width ( ) -> int
staticnodiscardnoexcept

Window creation width.

Returns
Integer.

Definition at line 143 of file Settings.cpp.

Here is the caller graph for this function:

◆ window_height()

auto galaxy::Settings::window_height ( ) -> int
staticnodiscardnoexcept

Window creation height.

Returns
Integer.

Definition at line 148 of file Settings.cpp.

Here is the caller graph for this function:

◆ title()

auto galaxy::Settings::title ( ) -> const std::string &
staticnodiscardnoexcept

Game title.

Returns
Const string.

Definition at line 153 of file Settings.cpp.

Here is the caller graph for this function:

◆ vsync()

auto galaxy::Settings::vsync ( ) -> bool
staticnodiscardnoexcept

Vsync control.

Returns
Boolean.

Definition at line 158 of file Settings.cpp.

Here is the caller graph for this function:

◆ window_resizable()

auto galaxy::Settings::window_resizable ( ) -> bool
staticnodiscardnoexcept

Is the window resizable.

Returns
Boolean.

Definition at line 163 of file Settings.cpp.

Here is the caller graph for this function:

◆ decoration()

auto galaxy::Settings::decoration ( ) -> bool
staticnodiscardnoexcept

Controls if a window has a border around it (including titlebar).

Returns
Boolean.

Definition at line 168 of file Settings.cpp.

Here is the caller graph for this function:

◆ fullscreen()

auto galaxy::Settings::fullscreen ( ) -> bool
staticnodiscardnoexcept

Is window started fullscreen.

Returns
Boolean.

Definition at line 173 of file Settings.cpp.

Here is the caller graph for this function:

◆ maximized()

auto galaxy::Settings::maximized ( ) -> bool
staticnodiscardnoexcept

Is window started maximized?

Fullscreen takes priority.

Returns
Boolean.

Definition at line 178 of file Settings.cpp.

Here is the caller graph for this function:

◆ minimized()

auto galaxy::Settings::minimized ( ) -> bool
staticnodiscardnoexcept

Is window started minimized?

Fullscreen takes priority.

Returns
Boolean.

Definition at line 183 of file Settings.cpp.

Here is the caller graph for this function:

◆ borderless_fullscreen()

auto galaxy::Settings::borderless_fullscreen ( ) -> bool
staticnodiscardnoexcept

Is window in borderless fullscreen?

Returns
Boolean.

Definition at line 188 of file Settings.cpp.

Here is the caller graph for this function:

◆ window_icon()

auto galaxy::Settings::window_icon ( ) -> const std::string &
staticnodiscardnoexcept

Window icon file in vfs.

Returns
Const string.

Definition at line 193 of file Settings.cpp.

Here is the caller graph for this function:

◆ ontop()

auto galaxy::Settings::ontop ( ) -> bool
staticnodiscardnoexcept

Should the window always be on top.

Returns
Boolean.

Definition at line 198 of file Settings.cpp.

Here is the caller graph for this function:

◆ root_dir()

auto galaxy::Settings::root_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Current root directory of application, unless it has been changed.

Returns
Filesystem path.

Definition at line 203 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir()

auto galaxy::Settings::assets_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Main data directory.

Returns
Filesystem path.

Definition at line 208 of file Settings.cpp.

Here is the caller graph for this function:

◆ asset_pack()

auto galaxy::Settings::asset_pack ( ) -> const std::string &
staticnodiscardnoexcept

Name of packed assets file.

Returns
Const string.

Definition at line 213 of file Settings.cpp.

Here is the caller graph for this function:

◆ use_loose_assets()

auto galaxy::Settings::use_loose_assets ( ) -> bool
staticnodiscardnoexcept

Should asset data be read from pack or assets dir.

Returns
Boolean.

Definition at line 218 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_music()

auto galaxy::Settings::assets_dir_music ( ) -> const std::string &
staticnodiscardnoexcept

Music asset location.

Returns
Const string.

Definition at line 223 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_sfx()

auto galaxy::Settings::assets_dir_sfx ( ) -> const std::string &
staticnodiscardnoexcept

SFX asset location.

Returns
Const string.

Definition at line 228 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_voice()

auto galaxy::Settings::assets_dir_voice ( ) -> const std::string &
staticnodiscardnoexcept

Voice asset location.

Returns
Const string.

Definition at line 233 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_font()

auto galaxy::Settings::assets_dir_font ( ) -> const std::string &
staticnodiscardnoexcept

Font asset location.

Returns
Const string.

Definition at line 238 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_script()

auto galaxy::Settings::assets_dir_script ( ) -> const std::string &
staticnodiscardnoexcept

Scripts asset location.

Returns
Const string.

Definition at line 243 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_shaders()

auto galaxy::Settings::assets_dir_shaders ( ) -> const std::string &
staticnodiscardnoexcept

Shaders asset location.

Returns
Const string.

Definition at line 248 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_animation()

auto galaxy::Settings::assets_dir_animation ( ) -> const std::string &
staticnodiscardnoexcept

Animation data location.

Returns
Const string.

Definition at line 253 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_texture()

auto galaxy::Settings::assets_dir_texture ( ) -> const std::string &
staticnodiscardnoexcept

Textures asset location.

Returns
Const string.

Definition at line 258 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_prefabs()

auto galaxy::Settings::assets_dir_prefabs ( ) -> const std::string &
staticnodiscardnoexcept

Prefab asset location.

Returns
Const string.

Definition at line 263 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_maps()

auto galaxy::Settings::assets_dir_maps ( ) -> const std::string &
staticnodiscardnoexcept

Maps asset location.

Returns
Const string.

Definition at line 268 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_video()

auto galaxy::Settings::assets_dir_video ( ) -> const std::string &
staticnodiscardnoexcept

Video asset location.

Returns
Const string.

Definition at line 273 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_ui()

auto galaxy::Settings::assets_dir_ui ( ) -> const std::string &
staticnodiscardnoexcept

UI asset location.

Returns
Const string.

Definition at line 278 of file Settings.cpp.

Here is the caller graph for this function:

◆ cursor_locked()

auto galaxy::Settings::cursor_locked ( ) -> bool
staticnodiscardnoexcept

Is the cursor grabbed.

Returns
Boolean.

Definition at line 283 of file Settings.cpp.

Here is the caller graph for this function:

◆ cursor_show()

auto galaxy::Settings::cursor_show ( ) -> bool
staticnodiscardnoexcept

Is the mouse cursor visible or not.

Returns
Boolean.

Definition at line 288 of file Settings.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ s_window_width

int galaxy::Settings::s_window_width
inlinestaticprivate

Definition at line 283 of file Settings.hpp.

◆ s_window_height

int galaxy::Settings::s_window_height
inlinestaticprivate

Definition at line 284 of file Settings.hpp.

◆ s_title

std::string galaxy::Settings::s_title
inlinestaticprivate

Definition at line 285 of file Settings.hpp.

◆ s_vsync

bool galaxy::Settings::s_vsync
inlinestaticprivate

Definition at line 286 of file Settings.hpp.

◆ s_resizable

bool galaxy::Settings::s_resizable
inlinestaticprivate

Definition at line 287 of file Settings.hpp.

◆ s_decoration

bool galaxy::Settings::s_decoration
inlinestaticprivate

Definition at line 288 of file Settings.hpp.

◆ s_fullscreen

bool galaxy::Settings::s_fullscreen
inlinestaticprivate

Definition at line 289 of file Settings.hpp.

◆ s_maximized

bool galaxy::Settings::s_maximized
inlinestaticprivate

Definition at line 290 of file Settings.hpp.

◆ s_minimized

bool galaxy::Settings::s_minimized
inlinestaticprivate

Definition at line 291 of file Settings.hpp.

◆ s_borderless

bool galaxy::Settings::s_borderless
inlinestaticprivate

Definition at line 292 of file Settings.hpp.

◆ s_window_icon

std::string galaxy::Settings::s_window_icon
inlinestaticprivate

Definition at line 293 of file Settings.hpp.

◆ s_ontop

bool galaxy::Settings::s_ontop
inlinestaticprivate

Definition at line 294 of file Settings.hpp.

◆ s_assets_dir

std::filesystem::path galaxy::Settings::s_assets_dir
inlinestaticprivate

Definition at line 296 of file Settings.hpp.

◆ s_asset_pack

std::string galaxy::Settings::s_asset_pack
inlinestaticprivate

Definition at line 297 of file Settings.hpp.

◆ s_use_loose_assets

bool galaxy::Settings::s_use_loose_assets
inlinestaticprivate

Definition at line 298 of file Settings.hpp.

◆ s_assets_music

std::string galaxy::Settings::s_assets_music
inlinestaticprivate

Definition at line 299 of file Settings.hpp.

◆ s_assets_sfx

std::string galaxy::Settings::s_assets_sfx
inlinestaticprivate

Definition at line 300 of file Settings.hpp.

◆ s_assets_voice

std::string galaxy::Settings::s_assets_voice
inlinestaticprivate

Definition at line 301 of file Settings.hpp.

◆ s_assets_font

std::string galaxy::Settings::s_assets_font
inlinestaticprivate

Definition at line 302 of file Settings.hpp.

◆ s_assets_script

std::string galaxy::Settings::s_assets_script
inlinestaticprivate

Definition at line 303 of file Settings.hpp.

◆ s_assets_shaders

std::string galaxy::Settings::s_assets_shaders
inlinestaticprivate

Definition at line 304 of file Settings.hpp.

◆ s_assets_animation

std::string galaxy::Settings::s_assets_animation
inlinestaticprivate

Definition at line 305 of file Settings.hpp.

◆ s_assets_texture

std::string galaxy::Settings::s_assets_texture
inlinestaticprivate

Definition at line 306 of file Settings.hpp.

◆ s_assets_prefabs

std::string galaxy::Settings::s_assets_prefabs
inlinestaticprivate

Definition at line 307 of file Settings.hpp.

◆ s_assets_maps

std::string galaxy::Settings::s_assets_maps
inlinestaticprivate

Definition at line 308 of file Settings.hpp.

◆ s_assets_video

std::string galaxy::Settings::s_assets_video
inlinestaticprivate

Definition at line 309 of file Settings.hpp.

◆ s_assets_ui

std::string galaxy::Settings::s_assets_ui
inlinestaticprivate

Definition at line 310 of file Settings.hpp.

◆ s_cursor_locked

bool galaxy::Settings::s_cursor_locked
inlinestaticprivate

Definition at line 312 of file Settings.hpp.

◆ s_cursor_show

bool galaxy::Settings::s_cursor_show
inlinestaticprivate

Definition at line 313 of file Settings.hpp.


The documentation for this struct was generated from the following files: