OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
GameConfig::Window Class Reference

#include <GameConfig.h>

Inheritance diagram for GameConfig::Window:
ConfigSection

Public Member Functions

 Window (GameConfig *config)
 
- Public Member Functions inherited from ConfigSection
 ConfigSection (Config *config, std::string_view name)
 
 ConfigSection (const ConfigSection &other)=delete
 
 ConfigSection (ConfigSection &&other)=delete
 
Configconfig () const
 
const std::string & name () const
 
void registerEntry (AnyConfigEntry *entry)
 
AnyConfigEntryentry (std::string_view name) const
 
std::vector< AnyConfigEntry * > entries () const
 

Public Attributes

String Title
 
Int Display
 
ConfigEntry< PlatformWindowModeMode
 
Int PositionX
 
Int PositionY
 
Int Width
 
Int Height
 
Bool MouseGrab
 
Bool Resizable
 
Bool ReloadTex
 

Static Private Member Functions

static std::string ValidateTitle (std::string title)
 
static int ValidatePosition (int position)
 
static int ValidateWidth (int dimension)
 
static int ValidateHeight (int dimension)
 

Constructor & Destructor Documentation

◆ Window()

GameConfig::Window::Window ( GameConfig config)
inlineexplicit

Member Function Documentation

◆ ValidateHeight()

static int GameConfig::Window::ValidateHeight ( int  dimension)
inlinestaticprivate

◆ ValidatePosition()

static int GameConfig::Window::ValidatePosition ( int  position)
inlinestaticprivate

◆ ValidateTitle()

static std::string GameConfig::Window::ValidateTitle ( std::string  title)
inlinestaticprivate

◆ ValidateWidth()

static int GameConfig::Window::ValidateWidth ( int  dimension)
inlinestaticprivate

Member Data Documentation

◆ Display

Int GameConfig::Window::Display
Initial value:
= {this, "display", 0,
"Display number as exposed by SDL. "
"Order is platform-specific, e.g. on windows 0 is main display."}

◆ Height

Int GameConfig::Window::Height
Initial value:
= {this, "height", 480, &ValidateHeight,
"Window height."}
static int ValidateHeight(int dimension)
Definition: GameConfig.h:675

◆ Mode

ConfigEntry<PlatformWindowMode> GameConfig::Window::Mode
Initial value:
= {this, "mode", ConfigWindowMode,
"Window mode, one of 'windowed', 'borderless', 'fullscreen' or 'fullscreen_borderless'."}
#define ConfigWindowMode
Definition: GameConfig.h:22

◆ MouseGrab

Bool GameConfig::Window::MouseGrab
Initial value:
= {this, "mouse_grab", false,
"Restrict mouse movement to game window when it's in focus."}

◆ PositionX

Int GameConfig::Window::PositionX
Initial value:
= {this, "position_x", -1, &ValidatePosition,
"Game window x position in display coordinates. Use -1 for centered."}
static int ValidatePosition(int position)
Definition: GameConfig.h:663

◆ PositionY

Int GameConfig::Window::PositionY
Initial value:
= {this, "position_y", -1, &ValidatePosition,
"Game window y position in display coordinates. Use -1 for centered."}

◆ ReloadTex

Bool GameConfig::Window::ReloadTex
Initial value:
= {this, "reload_tex", true,
"Reload texture assets if window is reinitialised."}

◆ Resizable

Bool GameConfig::Window::Resizable
Initial value:
= {this, "resizable", true,
"Make window resizable by user or not."}

◆ Title

String GameConfig::Window::Title
Initial value:
= String(this, "title", "OpenEnroth", &ValidateTitle,
"Game window title.")
static std::string ValidateTitle(std::string title)
Definition: GameConfig.h:657
ConfigEntry< std::string > String
Definition: GameConfig.h:37

◆ Width

Int GameConfig::Window::Width
Initial value:
= {this, "width", 640, &ValidateWidth,
"Window width."}
static int ValidateWidth(int dimension)
Definition: GameConfig.h:669

The documentation for this class was generated from the following file: