Libraries.Game.WebDisplay Documentation

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

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Destroy()This action closes the window.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetConfiguration()This action returns the ApplicationConfiguration being used by the GameDisplay.
GetHashCode()This action gets the hash code for an object.
GetHeight()This action returns the height of the GameDisplay.
GetName()
GetPixelScaleFactor()This action returns the ratio between screen coordinates and pixels.
GetResize()This action returns whether the GameDisplay is resizable or not.
GetSecondsBetweenFrames()This action tests how many seconds have passed since the last time that the time was updated.
GetWidth()This action returns the width of the GameDisplay.
RenderingRequested()This action returns whether or not the GameDisplay has currently been asked to render.
RequestRendering()This action tells the GameDisplay to render to the screen.
SetConfiguration(Libraries.Game.ApplicationConfiguration configuration)This action sets the ApplicationConfiguration being used by the game, which includes data for the screen.
SetDisplayMode(integer width, integer height, boolean fullscreen)This action sets the width and height of the GameDisplay, and optionally makes the game full screen.
SetLastTime()This action records the time when the action is called, and stores it.
SetName(text newName)
SetVSync(boolean vsync)This action sets vSync on or off for the GameDisplay.
SetupDisplay()This action prepares the display for use.
UpdateTime()This action updates the game's timekeeping information.
WasResized()This action returns whether or not the GameDisplay has been resized.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Destroy()

This action closes the window.

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(t)

Parameters

Return

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

GetConfiguration()

This action returns the ApplicationConfiguration being used by the GameDisplay.

Return

Libraries.Game.ApplicationConfiguration:

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 GameDisplay.

Return

integer:

GetName()

Return

text

GetPixelScaleFactor()

This action returns the ratio between screen coordinates and pixels.

Return

number:

GetResize()

This action returns whether the GameDisplay is resizable or not.

Return

boolean:

GetSecondsBetweenFrames()

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

Return

number:

GetWidth()

This action returns the width of the GameDisplay.

Return

integer:

RenderingRequested()

This action returns whether or not the GameDisplay has currently been asked to render.

Return

boolean:

RequestRendering()

This action tells the GameDisplay to render to the screen.

SetConfiguration(Libraries.Game.ApplicationConfiguration configuration)

This action sets the ApplicationConfiguration being used by the game, which includes data for the screen. The ApplicationConfiguration must be of the correct type or otherwise an error will be thrown, i.e., if the GameDisplay is a WebDisplay, it must receive a WebConfiguration.

Parameters

SetDisplayMode(integer width, integer height, boolean fullscreen)

This action sets the width and height of the GameDisplay, and optionally makes the game full screen. Returns a boolean value indicating whether the action was successful - for example, this should typically work on desktops, but on mobile devices it will fail and return false.

Parameters

Return

boolean:

SetLastTime()

This action records the time when the action is called, and stores it.

SetName(text newName)

Parameters

SetVSync(boolean vsync)

This action sets vSync on or off for the GameDisplay.

Parameters

SetupDisplay()

This action prepares the display for use. The WebDisplay must already have been given a WebConfiguration using the SetConfiguration action, and the provided configuration must have a valid canvas identifier to be used by the display.

UpdateTime()

This action updates the game's timekeeping information. Also resets the flag for requested rendering.

WasResized()

This action returns whether or not the GameDisplay has been resized.

Return

boolean: