Interface IGameSettings
Game settings (those can be set only once).
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IGameSettings
Properties
| Improve this Doc View SourceDefaults
The settings for various defaults.
Declaration
IDefaultsSettings Defaults { get; }
Property Value
Type | Description |
---|---|
IDefaultsSettings | The defaults. |
PreserveAspectRatio
If the game is configured to preserve the aspect ratio, then in case the window is resized and the aspect ratio is changed, the screen will be letterboxed or pillarboxed so the aspect ratio for the actual content will remain the same (preserve aspect ratio is on by default).
Declaration
bool PreserveAspectRatio { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Title
Gets the title (the name of the game): would appear on the game window's title bar.
Declaration
string Title { get; }
Property Value
Type | Description |
---|---|
System.String | The title. |
VirtualResolution
Gets the virtual resolution of the game. This is the resolution in which you write your co-ordinates and sizes, and those will be scaled appropriately to match the actual screen size. For example: let's say your virtual resolution is (320,200) and you have an object with width = 20, draw with bottom left (x,y) = (100,50). If the actual screen size is currently (640,400) that would render the object at actual screen (x,y) = (200,100) and the object will be scaled x2 to have width = 40. Note: you can override this resolution for specific layers, so you can have (as an example) hi-res UI in a low-res game.
Declaration
Size VirtualResolution { get; }
Property Value
Type | Description |
---|---|
Size | The virtual resolution. |
Vsync
Gets the vsync mode (synchronization of the frame update rate with screen refresh rate to prevent tearing). To read about how this works: https://hardforum.com/threads/how-vsync-works-and-why-people-loathe-it.928593/
Declaration
VsyncMode Vsync { get; }
Property Value
Type | Description |
---|---|
VsyncMode | The vsync. |
WindowBorder
Gets the style of the window's border.
Declaration
WindowBorder WindowBorder { get; }
Property Value
Type | Description |
---|---|
WindowBorder | The window border. |
WindowSize
Gets the size of the window (the size of the actual window on screen).
Declaration
Size WindowSize { get; }
Property Value
Type | Description |
---|---|
Size | The size of the window. |
WindowState
Gets the state of the window (minimized/maximized/etc).
Declaration
WindowState WindowState { get; }
Property Value
Type | Description |
---|---|
WindowState | The state of the window. |