GAME
Contents
| Name | Description |
|---|---|
| onDoubleClick( x , y , button ) | (Callback)Detects double clicking. |
| onKeyDown( key , down , pressed_ctrl , pressed_shift ) | (Callback)Detects key presses. |
| onMouseDown( x , y , button ) | (Callback)Detects mouse presses. |
| onMouseMove( x , y , button ) | (Callback)Detects mouse movement |
| onMouseUp( x , y , button ) | (Callback)Detects mouse presses. |
| onMouseWheel( x , y , direction ) | (Callback)Detects mouse scroll wheel. |
| onTripleClick( x , y , button ) | (Callback)Detects triple clicking. |
onDoubleClick( number x , number y , number button )
(Callback)Detects double clicking.
Tirggered whenever the user double clicked in the screen. The speed for double clicking is system defined, and may not be the same across platforms.
Parameters
-
x (number)
The x position of the mouse
-
y (number)
The y position of the mouse
-
button (number)
Which button was double clicked. Will be one of:
Defined at client/callbackhandeler.cpp:241
onKeyDown( number key , boolean down , boolean pressed_ctrl , boolean pressed_shift )
(Callback)Detects key presses.
Detects any key presses from the game.
Parameters
-
key (number)
The key that the user pressed down
-
down (boolean)
Was the key pressed down?
-
pressed_ctrl (boolean)
Was control pressed?
-
pressed_shift (boolean)
Was shift pressed?
Defined at client/callbackhandeler.cpp:274
onMouseDown( number x , number y , number button )
(Callback)Detects mouse presses.
Called whenever the a mouse button has been pressed
Parameters
-
x (number)
The x position of the mouse
-
y (number)
The y position of the mouse
-
button (number)
Which mouse button was pressed. Will be one of:
Defined at client/callbackhandeler.cpp:198
onMouseMove( number x , number y , number button )
(Callback)Detects mouse movement
Called whenever the mouse is moved
Parameters
-
x (number)
The x position that the mouse now occupies
-
y (number)
The y position that the mouse now occupies
-
button (number)
Will be EMIEMOUSEMOVED.
Defined at client/callbackhandeler.cpp:182
onMouseUp( number x , number y , number button )
(Callback)Detects mouse presses.
Detects when the mouse has been released.
Parameters
-
x (number)
The x position of the mouse on the screen (in pixels)
-
y (number)
The y position of the mouse
-
button (number)
The mouse key that was clicked, will be one of:
Defined at client/callbackhandeler.cpp:213
onMouseWheel( number x , number y , number direction )
(Callback)Detects mouse scroll wheel.
Triggered whenever the scroll wheel moves up or down.
Parameters
-
x (number)
The x position of the mouse
-
y (number)
The y position of the mouse
-
direction (number)
The direction of the scroll wheel, -1, 0 or 1
Defined at client/callbackhandeler.cpp:225
onTripleClick( number x , number y , number button )
(Callback)Detects triple clicking.
Triggered whenever the user tripple clicks on the screen. The speed for tripple clicking is system defined, and may not be the same across platforms.
Parameters
-
x (number)
The x position of the mouse
-
y (number)
The y position of the mouse
-
button (number)
Which button was tripple clicked. Will be one of:
Defined at client/callbackhandeler.cpp:257