Libraries.Game.DesktopDisplay Documentation

This class represents the game window. This class is handled automatically by the Game class. Most users will never need to interact with this class directly. This class is used specifically on desktop platforms (Windows and Mac OS X

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

Summary

Variable Summary Table

VariablesDescription
boolean shouldrenderThis boolean represents whether the GameDisplay currently needs to render something new on the scree

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Destroy()This action closes the windo
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
FirstTimeShowWindow()Used internally by the game engine.
FocusWindow()This action asks the operating system to give the main application window the focus.
GetAvailableResolutions()This action will return an array containing all of the screen resolutions available for this machin
GetClipboard()This action returns the DesktopConfiguration being used by the GameDispla
GetConfiguration()This action returns the DesktopConfiguration being used by the GameDispla
GetDesktopResolution()This action returns a ScreenResolution object that describes the currently set resolution of the computer's desktop (not the resolution being used by the game
GetDisplayX()This action returns the screen x coordinate of the DesktopDispla
GetDisplayY()This action returns the screen y coordinate of the DesktopDispla
GetHashCode()This action gets the hash code for an object.
GetHeight()This action returns the height of the DesktopDispla
GetPixelScaleFactor()This action returns the ratio between screen coordinates and pixel
GetResize()This action returns whether the DesktopDisplay is resizable or no
GetScreenResolution()This action will return the current screen resolution being used by the game engin
GetSecondsBetweenFrames()This action tests how many seconds have passed since the last time that the time was update
GetWidth()This action returns the width of the DesktopDispla
IsActive()This action returns whether or not the DesktopDisplay is the currently active application on the syste
IsAvailable()The IsAvailable action returns whether or not a display is available to draw on.
IsCloseRequested()This action determines if the user has tried to close the window by clicking the window's red close butto
IsWindowFocused()This action determines whether or not the main application window has the focus on desktop platforms.
IsWindowMaximized()This action returns true if the display is a maximized window.
IsWindowMinimized()This action returns true if the display is minimized, or false otherwis
MaximizeWindow()This action maximizes the window.
MinimizeWindow()This action minimizes the windo
RequestRendering()This action tells the DesktopDisplay to render to the scree
RestoreWindow()This action returns a maximized window to a smaller window, or returns a minimized window to the foregroun
SetClipboard(text value)This action sets the DesktopConfiguration being used by the game, which includes data for the scree
SetConfiguration(Libraries.Game.ApplicationConfiguration conf)This action sets the DesktopConfiguration being used by the game, which includes data for the scree
SetDisplayMode(integer width, integer height, boolean fullscreen)This action sets the width and height of the DesktopDisplay, and optionally makes the game full scree
SetLastTime()This action records the time when the action is called, and stores i
SetResize(boolean resize)This action sets whether the DesktopDisplay should be resizable or no
SetScreenResolution(Libraries.Game.ScreenResolution resolution)This action will set the game screen to use the given screen resolution.
SetVSync(boolean vsync)This action sets vSync on or off for the DesktopDispla
SetWindowIcon(Libraries.System.File file)This action will set the icon the application uses in the taskbar on Windows platform
SetWindowIcon(text fileName)This action will set the icon the application uses in the taskbar on Windows platform
SetWindowPosition(integer x, integer y)This action sets the position of the window on the screen.
SetupDisplay()This action initializes the DesktopDispla
Update()This action updates the game screen without polling the inpu
UpdateBuffer()This action forces the Game to draw its contents to the DesktopDisplay's internal buffer without drawing them to the scree
UpdateTime()This action updates the game's timekeeping informatio
WasResized()This action returns whether or not the DesktopDisplay has been resize

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.

Example Code

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

Parameters

Return

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

Destroy()

This action closes the windo

Equals(Libraries.Language.Object object)

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

Example Code

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

Parameters

Return

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

FirstTimeShowWindow()

Used internally by the game engine. This should never be called by user

FocusWindow()

This action asks the operating system to give the main application window the focus. This only works on desktop platforms - on other platforms, this call is ignore

GetAvailableResolutions()

This action will return an array containing all of the screen resolutions available for this machin

Return

Libraries.Containers.Array:

GetClipboard()

This action returns the DesktopConfiguration being used by the GameDispla

Return

text:

GetConfiguration()

This action returns the DesktopConfiguration being used by the GameDispla

Return

Libraries.Game.ApplicationConfiguration:

GetDesktopResolution()

This action returns a ScreenResolution object that describes the currently set resolution of the computer's desktop (not the resolution being used by the game

Return

Libraries.Game.ScreenResolution:

GetDisplayX()

This action returns the screen x coordinate of the DesktopDispla

Return

integer:

GetDisplayY()

This action returns the screen y coordinate of the DesktopDispla

Return

integer:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetHeight()

This action returns the height of the DesktopDispla

Return

integer:

GetPixelScaleFactor()

This action returns the ratio between screen coordinates and pixel

Return

number:

GetResize()

This action returns whether the DesktopDisplay is resizable or no

Return

boolean:

GetScreenResolution()

This action will return the current screen resolution being used by the game engin

Return

Libraries.Game.ScreenResolution:

GetSecondsBetweenFrames()

This action tests how many seconds have passed since the last time that the time was update

Return

number:

GetWidth()

This action returns the width of the DesktopDispla

Return

integer:

IsActive()

This action returns whether or not the DesktopDisplay is the currently active application on the syste

Return

boolean:

IsAvailable()

The IsAvailable action returns whether or not a display is available to draw on. If no display is available, actions that try to create or draw graphics (such as loading a Drawable) will create an error. This will return false if called before StartGame() is called in the Game class, and will typically return true after the game has been starte

Return

boolean:

IsCloseRequested()

This action determines if the user has tried to close the window by clicking the window's red close butto

Return

boolean:

IsWindowFocused()

This action determines whether or not the main application window has the focus on desktop platforms. On non-desktop platforms, this always returns fals

Return

boolean:

IsWindowMaximized()

This action returns true if the display is a maximized window. If the display isn't maximized, or if the display is full screen, this returns fals

Return

boolean:

IsWindowMinimized()

This action returns true if the display is minimized, or false otherwis

Return

boolean:

MaximizeWindow()

This action maximizes the window. It does nothing if the window is already maximized or if the display is fullscree

MinimizeWindow()

This action minimizes the windo

RequestRendering()

This action tells the DesktopDisplay to render to the scree

RestoreWindow()

This action returns a maximized window to a smaller window, or returns a minimized window to the foregroun

SetClipboard(text value)

This action sets the DesktopConfiguration being used by the game, which includes data for the scree

Parameters

SetConfiguration(Libraries.Game.ApplicationConfiguration conf)

This action sets the DesktopConfiguration being used by the game, which includes data for the scree

Parameters

SetDisplayMode(integer width, integer height, boolean fullscreen)

This action sets the width and height of the DesktopDisplay, and optionally makes the game full scree

Parameters

Return

boolean:

SetLastTime()

This action records the time when the action is called, and stores i

SetResize(boolean resize)

This action sets whether the DesktopDisplay should be resizable or no

Parameters

SetScreenResolution(Libraries.Game.ScreenResolution resolution)

This action will set the game screen to use the given screen resolution. The resolution should be acquired from one of the actions that provides the usable screen resolutions for this machine, such as GetDesktopResolution or GetAvailableResolution

Parameters

SetVSync(boolean vsync)

This action sets vSync on or off for the DesktopDispla

Parameters

SetWindowIcon(Libraries.System.File file)

This action will set the icon the application uses in the taskbar on Windows platform

Parameters

SetWindowIcon(text fileName)

This action will set the icon the application uses in the taskbar on Windows platform

Parameters

SetWindowPosition(integer x, integer y)

This action sets the position of the window on the screen. This uses the coordinate system of the native platform, which often will start the y index at the top of the screen and move down as the y value increase

Parameters

SetupDisplay()

This action initializes the DesktopDispla

Update()

This action updates the game screen without polling the inpu

UpdateBuffer()

This action forces the Game to draw its contents to the DesktopDisplay's internal buffer without drawing them to the scree

UpdateTime()

This action updates the game's timekeeping informatio

WasResized()

This action returns whether or not the DesktopDisplay has been resize

Return

boolean: