Skip to content

Class EngineSettings

Namespace: Apogee.Host
Assembly: Apogee.Host.dll

The engine's own settings (window., graphics., audio.*) and what makes them do something.

public static class EngineSettings

Inheritance

object ← EngineSettings

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

AudioBusPrefix

The start of the keys of the audio buses: audio.bus.music is the volume of the bus music.

public const string AudioBusPrefix = "audio.bus."

Field Value

string

AudioVolume

The master volume, 0 to 1.

public const string AudioVolume = "audio.volume"

Field Value

string

GraphicsVSync

Whether frames wait for the display (read when the game starts).

public const string GraphicsVSync = "graphics.vsync"

Field Value

string

WindowFullscreen

Whether the window is fullscreen.

public const string WindowFullscreen = "window.fullscreen"

Field Value

string

WindowHeight

The window's height in points.

public const string WindowHeight = "window.height"

Field Value

string

WindowWidth

The window's width in points.

public const string WindowWidth = "window.width"

Field Value

string

Methods

ConnectAudio(SettingsStore, AudioSystem)

Makes the volumes of the audio system follow the settings, now and when they change: audio.volume is the master volume and audio.bus.<name> (a number setting that a script defines) the volume of the bus of that name. A bus whose key is defined later is set when it is defined.

public static void ConnectAudio(SettingsStore store, AudioSystem audio)

Parameters

store SettingsStore

The settings.

audio AudioSystem

The audio system.

ConnectWindow(SettingsStore, Window, bool)

Makes a window follow window.fullscreen and remember its size. The window must have been made from the settings (the size and whether it starts fullscreen); this keeps it in step afterwards. Dispose the result when the window goes.

public static WindowSettings ConnectWindow(SettingsStore store, Window window, bool trackSize = true)

Parameters

store SettingsStore

The settings.

window Window

The game's window.

trackSize bool

Whether a size the player gives the window is stored (not when the size came from the command line).

Returns

WindowSettings

Register(SettingsStore, EngineSettingDefaults)

Defines the engine's settings; scripts cannot define these keys again. The defaults of the window come from the game's game.xml.

public static void Register(SettingsStore store, EngineSettingDefaults defaults)

Parameters

store SettingsStore

The store to define them in.

defaults EngineSettingDefaults

The game's defaults.