Libraries.Game.DesktopConfiguration Documentation

This class represents the configuration of the game. It is referenced when the game is first created to set its initial data.

Inherits from: Libraries.Language.Object, Libraries.Game.ApplicationConfiguration

Variables Table

VariablesDescription
Libraries.Game.ScreenResolution defaultResolutionThe ScreenResolution to use when the game launches. If left undefined, the game will create a window using the configuration's given width and height.
number multipleClickTimerThe maximum number of seconds allowed between each mouse click before the click is no longer considered related to the previous click. This is used for things such as double-click input.
integer widthThe initial width of the application screen.
number minimumFrameDelayIf limitFramesPerSecond is true, this value represents the minimum number of seconds the engine should wait between frames. Having a minimum delay between frames gives screen readers and other accessibility technologies a greater opportunity to collect information from the system. If this value is set to 0, then the engine will only delay as much as necessary to hit the target frame rate. The default value is 0.01 seconds.
integer yInitial y coordinate where the window will appear on screen. -1 for center.
boolean resizableIf true, the window will be resizable.
text titleThe title of the application.
integer heightThe initial height of the application screen.
number multipleKeyPressTimerThe maximum number of seconds allowed between each key press before the press is no longer considered related to the previous key press. This is used for things like capturing double-taps on keys.
boolean enableAccessibilityWhether or not the game should support accessibility devices, such as screen readers. This value is true by default. This value must be set before starting the game to have any effect -- changing it after will do nothing.
Libraries.Game.Graphics.Color initialBackgroundColorThe starting color of the window while the Game is loading.
integer xInitial x coordinate where the window will appear on screen. -1 for center.
boolean maximizedWhether or not the window should be maximized when launched. This only works if the window isn't fullscreen. By default, this value is false.
boolean vSyncEnabledIf true, the application will use vSync.
boolean limitFramesPerSecondWhether or not the game engine should limit the total frames rendered per second. If this is false, the engine will attempt to render as many frames as possible, which can potentially waste CPU time, consume more power, and adversely affect how screen readers interact with the application. If this value is set to true, the engine will try to limit the frames rendered to the targetFramesPerSecond value. This value is true by default.
integer targetFramesPerSecondTarget framerate when "limitFramesPerSecond" is set to true. The default value is 70.
boolean autoResizeTexturesIf true, the textures will automatically be resized when the window is resized.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()