Libraries.Game.InputSet Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer FINISH
integer DROP_ITEM_INPUT
integer TOUCH_MOVEMENT_INPUT
integer KEYBOARD_INPUTKEYBOARD_INPUT: BEGIN: When the key is first pressed down. CONTINUE: Each frame that the key is held down. FINISH: When the key is released. FINISH_UNCAUGHT: When the key is released, if it wasn't used as part of a keypress combination. MOUSE_INPUT: BEGIN: When the mouse button is first clicked. CONTINUE: Each frame that the button is held down. FINISH: When the button is released. FINISH_UNCAUGHT: N/A MOUSE_WHEEL_INPUT: BEGIN: When the mouse wheel moves. (Wheel movement is non-continuous - each movement is registered, but there's typically no "smooth transition" as in begin/finish) CONTINUE: N/A FINISH: N/A FINISH_UNCAUGHT: N/A MOUSE_MOVEMENT_INPUT: BEGIN: When the mouse first moves onto an Item. CONTINUE: Each mouse movement, whether on the same Item or not. FINISH: When the mouse moves off of an Item. FINISH_UNCAUGHT: N/A TOUCH_INPUT: BEGIN: When a finger first presses down. CONTINUE: Each frame a finger is touching the screen. FINISH: When the finger is removed from the screen. FINISH_UNCAUGHT: N/A DRAG_INPUT: BEGIN: When the mouse begins to move while holding a button down. CONTINUE: Each frame where the mouse moves while still holding the button. FINISH: When the mouse button is release
integer TEXT_INPUT
integer DRAG_ITEM_INPUT
integer SHIFT
integer MOUSE_MOVEMENT_INPUT
integer FINISH_UNCAUGHT
integer BEGIN
integer CONTROL
integer META
integer MOUSE_INPUTKEYBOARD_INPUT: BEGIN: When the key is first pressed down. CONTINUE: Each frame that the key is held down. FINISH: When the key is released. FINISH_UNCAUGHT: When the key is released, if it wasn't used as part of a keypress combination. MOUSE_INPUT: BEGIN: When the mouse button is first clicked. CONTINUE: Each frame that the button is held down. FINISH: When the button is released. FINISH_UNCAUGHT: N/A MOUSE_WHEEL_INPUT: BEGIN: When the mouse wheel moves. (Wheel movement is non-continuous - each movement is registered, but there's typically no "smooth transition" as in begin/finish) CONTINUE: N/A FINISH: N/A FINISH_UNCAUGHT: N/A MOUSE_MOVEMENT_INPUT: BEGIN: When the mouse first moves onto an Item. CONTINUE: Each mouse movement, whether on the same Item or not. FINISH: When the mouse moves off of an Item. FINISH_UNCAUGHT: N/A TOUCH_INPUT: BEGIN: When a finger first presses down. CONTINUE: Each frame a finger is touching the screen. FINISH: When the finger is removed from the screen. FINISH_UNCAUGHT: N/A DRAG_INPUT: BEGIN: When the mouse begins to move while holding a button down. CONTINUE: Each frame where the mouse moves while still holding the button. FINISH: When the mouse button is release
integer MOUSE_WHEEL_INPUT
integer ALT
integer CONTINUE
integer TOUCH_INPUT

Actions Summary Table

ActionsDescription
AddModifier(integer modifier)Where the actual information is stored for the InputSet.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Copy()This sets the raw bitmask.
Empty()
EmptyModifiers()
Equals(Libraries.Game.InputSet set)
Equals(Libraries.Language.Object o)
GetDisplayName()
GetHashCode()
GetInputTrigger()
GetInputType()
GetInputValue()
GetModifiers()
HasModifier(integer modifier)
RemoveModifier(integer modifier)
Set(Libraries.Game.InputSet set)
SetBitMask(integer value)This sets the raw bitmask.
SetDragItemInput()
SetDropItemInput()
SetEventCount(integer count)
SetInputTrigger(integer type)
SetInputType(integer type)
SetInputValue(integer value)
SetKeyboardInput(integer key)
SetMouseInput(integer mouseButton)
SetMouseMovementInput(integer mouseButton)
ToText()

Actions Documentation

AddModifier(integer modifier)

Where the actual information is stored for the InputSet. Storing in this format allows for matching InputSets to be used as keys into a HashTable, even if the objects themselves have different hashcodes. The individual bits represent the following information: 1st to 8th bits: Integer value of the key or mouse input. 9th to 12th bits: What kind of input this is. Corresponds to one of the input constants. 13th to 14th bits: How the input is triggered. Can represent an input event beginning, finishing, or continuing. 15th to 16th bits: How many previous events should be registered before triggering this one. 17th bit: Shift key modifier - 1 if required, 0 otherwise. 18th bit: Control key modifier - 1 if required, 0 otherwise. 19th bit: Alt key modifier - 1 if required, 0 otherwise. 20th bit: Meta key modifier - 1 if required, 0 otherwis

Parameters

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.

Copy()

This sets the raw bitmask. It intentionally has a nasty technical to warn the user that this action should not be used unless you really, really, know what you are doin

Return

Libraries.Game.InputSet:

Empty()

EmptyModifiers()

Equals(Libraries.Game.InputSet set)

Parameters

Return

boolean

Equals(Libraries.Language.Object o)

Parameters

Return

boolean

GetDisplayName()

Return

text

GetHashCode()

Return

integer

GetInputTrigger()

Return

integer

GetInputType()

Return

integer

GetInputValue()

Return

integer

GetModifiers()

Return

Libraries.Containers.Array

HasModifier(integer modifier)

Parameters

Return

boolean

RemoveModifier(integer modifier)

Parameters

Set(Libraries.Game.InputSet set)

Parameters

SetBitMask(integer value)

This sets the raw bitmask. It intentionally has a nasty technical to warn the user that this action should not be used unless you really, really, know what you are doin

Parameters

SetDragItemInput()

SetDropItemInput()

SetEventCount(integer count)

Parameters

SetInputTrigger(integer type)

Parameters

SetInputType(integer type)

Parameters

SetInputValue(integer value)

Parameters

SetKeyboardInput(integer key)

Parameters

SetMouseInput(integer mouseButton)

Parameters

SetMouseMovementInput(integer mouseButton)

Parameters

ToText()

Return

text