Libraries.Game.AndroidConfiguration Documentation

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

Variables Table

VariablesDescription
boolean useAspectRatioIf useAspectRatio is true, the engine will try to set the display to use the largest possible display of the aspect ratio given (targetWidth/targetHeight).
boolean useCompassWhether or not to use the compass for the game. Default value is false.
integer LANDSCAPE
integer samplesCountNumber of samples to use for CSAA/MSAA. 2 is a good value.
integer touchSleepTimeThe time in milliseconds to delay after each touch event before registering more touch events. For Android devices before Android 2.0, a value of 16 is useful for preventing a flood of touch events.
integer PORTRAITWhat orientation the phone should be in by default when running a Game. This should be one of either the LANDSCAPE or PORTRAIT constants. The default value is LANDSCAPE.
number multipleTapTimerThe maximum number of seconds allowed between each touch event before the tap is no longer considered related to the previous tap. This is used for things such as double-tap input.
integer maxSimultaneousSoundsThe maximum number of sounds that can be played simultaneously. The default value is 16.
boolean disableAudioWhether or not to disable Android audio support. Default value is false.
boolean useImmersiveModeWhether or not to use Android 4.4 KitKat's "Immersive mode'. Default value is false.
boolean preventScreenDimmingWhether or not to prevent the screen from dimming due to inactivity. The default value is true.
integer targetWidthHow wide the engine should try to make the display. If the value is 0, the entire width of the physical screen will be used. Otherwise, if useAspectRatio is true, the display will fill the screen as much as possible while maintaining the ratio of targetWidth/targetHeight. If useAspectRatio is false, the engine will try to make the display the exact target width, if possible. Users may want to use the SetDisplayTo actions for convenience.
boolean useAccelerometerWhether or not to use the accelerometer for the game. Default value is false.
boolean hideStatusBarWhether or not to hide status bar buttons on Android 4.0 and higher. Default value is false.
integer targetHeightHow tall the engine should try to make the display. If the value is 0, the entire height of the physical screen will be used. Otherwise, if useAspectRatio is true, the display will fill the screen as much as possible while maintaining the ratio of targetWidth/targetHeight. If useAspectRatio is false, the engine will try to make the display the exact target height, if possible. Users may want to use the SetDisplayTo actions for convenience.
integer defaultOrientationWhat orientation the phone should be in by default when running a Game. This should be one of either the LANDSCAPE or PORTRAIT constants. The default value is LANDSCAPE.

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

SetScreenToAspectRatio(integer width, integer height)

This action will set the game display to fill the screen as much as possible while maintaining the given aspect ratio, where the aspect ratio is the given width divided by the given height.

Parameters

  • integer width
  • integer height

SetScreenToFill()

This action will set the game display to fill the entire screen of the device. This is the default screen display mode.

SetScreenToSize(integer width, integer height)

This action will set the game display to appear in the center of the screen with the given width and height.

Parameters

  • integer width
  • integer height