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 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 editor_dir () noexcept -> std::filesystem::path
 Directory for editor specific stuff.
 
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 Private Attributes

static std::filesystem::path s_assets_dir
 
static std::filesystem::path s_editor_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
 

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 22 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 67 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.

Definition at line 200 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.

Definition at line 205 of file Settings.cpp.

+ Here is the caller graph for this function:

◆ editor_dir()

auto galaxy::settings::editor_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Directory for editor specific stuff.

Definition at line 210 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.

Definition at line 215 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.

Definition at line 220 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.

Definition at line 225 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.

Definition at line 230 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.

Definition at line 235 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.

Definition at line 240 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.

Definition at line 245 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.

Definition at line 250 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.

Definition at line 255 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.

Definition at line 260 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.

Definition at line 265 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.

Definition at line 270 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.

Definition at line 275 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.

Definition at line 280 of file Settings.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ s_assets_dir

std::filesystem::path galaxy::settings::s_assets_dir
inlinestaticprivate

Definition at line 266 of file Settings.hpp.

◆ s_editor_dir

std::filesystem::path galaxy::settings::s_editor_dir
inlinestaticprivate

Definition at line 267 of file Settings.hpp.

◆ s_asset_pack

std::string galaxy::settings::s_asset_pack
inlinestaticprivate

Definition at line 268 of file Settings.hpp.

◆ s_use_loose_assets

bool galaxy::settings::s_use_loose_assets
inlinestaticprivate

Definition at line 269 of file Settings.hpp.

◆ s_assets_music

std::string galaxy::settings::s_assets_music
inlinestaticprivate

Definition at line 270 of file Settings.hpp.

◆ s_assets_sfx

std::string galaxy::settings::s_assets_sfx
inlinestaticprivate

Definition at line 271 of file Settings.hpp.

◆ s_assets_voice

std::string galaxy::settings::s_assets_voice
inlinestaticprivate

Definition at line 272 of file Settings.hpp.

◆ s_assets_font

std::string galaxy::settings::s_assets_font
inlinestaticprivate

Definition at line 273 of file Settings.hpp.

◆ s_assets_script

std::string galaxy::settings::s_assets_script
inlinestaticprivate

Definition at line 274 of file Settings.hpp.

◆ s_assets_shaders

std::string galaxy::settings::s_assets_shaders
inlinestaticprivate

Definition at line 275 of file Settings.hpp.

◆ s_assets_animation

std::string galaxy::settings::s_assets_animation
inlinestaticprivate

Definition at line 276 of file Settings.hpp.

◆ s_assets_texture

std::string galaxy::settings::s_assets_texture
inlinestaticprivate

Definition at line 277 of file Settings.hpp.

◆ s_assets_prefabs

std::string galaxy::settings::s_assets_prefabs
inlinestaticprivate

Definition at line 278 of file Settings.hpp.

◆ s_assets_maps

std::string galaxy::settings::s_assets_maps
inlinestaticprivate

Definition at line 279 of file Settings.hpp.

◆ s_assets_video

std::string galaxy::settings::s_assets_video
inlinestaticprivate

Definition at line 280 of file Settings.hpp.

◆ s_assets_ui

std::string galaxy::settings::s_assets_ui
inlinestaticprivate

Definition at line 281 of file Settings.hpp.


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