GLLib : Keypad System
[GLLib]
key input method
More...Modules | |
| Vars for Key Accumulation | |
| Used only if GLLibConfig.useKeyAccumulation == true. | |
| Vars without Key Accumulation | |
| Used only if GLLibConfig.useKeyAccumulation == false. | |
| GLKey | |
| static void | Game_KeyClearKeyCode () |
| clear all the key code . no key input will be valid until you define new key association using Game_keySetKeyCode | |
| static void | Game_KeySetKeyCode (boolean gameAction, int keyCode, int key) |
| set the keycode for a specific key | |
| static int | IsAnyKeyDown () |
| Is there any key that is being held. | |
| static boolean | IsKeyDown (int keyFlag) |
| Query a key to know if its down/pressed. | |
| static boolean | IsKeyUp (int keyFlag) |
| Query a key to know if its up/unpressed. | |
| void | keyPressed (int keyCode) |
| Key pressed method. | |
| void | keyReleased (int keyCode) |
| Key released. | |
| static void | ResetAKey (int keyFlag) |
| Reset one key to unpressed state. | |
| static void | ResetKey () |
| Reset all keys to unpressed. | |
| static int | WasAnyKeyPressed () |
| Was there any key just pressed. | |
| static int | WasAnyKeyReleased () |
| Was there any key just released. | |
| static boolean | WasKeyPressed (int keyFlag) |
| Was there a key just pressed. | |
| static boolean | WasKeyReleased (int keyFlag) |
| Was there a key just released. | |
Detailed Description
key input method
Function Documentation
| static void Game_KeyClearKeyCode | ( | ) | [static, inherited] |
clear all the key code . no key input will be valid until you define new key association using Game_keySetKeyCode
| static void Game_KeySetKeyCode | ( | boolean | gameAction, | |
| int | keyCode, | |||
| int | key | |||
| ) | [static, inherited] |
set the keycode for a specific key
- Parameters:
-
gameAction set to true if the key code is related to a game action. keyCode keycode to associate.(eg Canvas.LEFT for example) key to associate with this key code. (eg GLKey.k_left for example)
| static int IsAnyKeyDown | ( | ) | [static, inherited] |
Is there any key that is being held.
- Returns:
- GLKey.k_invalid if no key is held, the correct GLKey value otherwise.
| static boolean IsKeyDown | ( | int | keyFlag | ) | [static, inherited] |
Query a key to know if its down/pressed.
- Parameters:
-
keyFlag Key to query.
- Returns:
- Boolean value, true if the key is down/pressed.
| static boolean IsKeyUp | ( | int | keyFlag | ) | [static, inherited] |
Query a key to know if its up/unpressed.
- Parameters:
-
keyFlag Key to query.
- Returns:
- Boolean value, true if the key is up/unpressed.
| void keyPressed | ( | int | keyCode | ) | [protected, inherited] |
Key pressed method.
Called when a key is pressed.
- Parameters:
-
keyCode Key Code from the device. To be translated to GLLib constants.
- See also:
- Canvas.keyPressed
| void keyReleased | ( | int | keyCode | ) | [protected, inherited] |
Key released.
Callded when a previously pressed key is released.
- Parameters:
-
keyCode Key Code from the device. To be translated to GLLib constants.
- See also:
- Canvas.keyReleased
| static void ResetAKey | ( | int | keyFlag | ) | [static, inherited] |
Reset one key to unpressed state.
- Parameters:
-
keyFlag Key to reset state.
- Note:
- If GLLibConfig.useKeyAccumulation is False, this call is the same as ResetKey.
| static void ResetKey | ( | ) | [static, inherited] |
Reset all keys to unpressed.
| static int WasAnyKeyPressed | ( | ) | [static, inherited] |
Was there any key just pressed.
- Returns:
- GLKey.k_invalid if no key was pressed, the correct GLKey value otherwise.
| static int WasAnyKeyReleased | ( | ) | [static, inherited] |
Was there any key just released.
- Returns:
- GLKey.k_invalid if no key was released, the correct GLKey value otherwise.
| static boolean WasKeyPressed | ( | int | keyFlag | ) | [static, inherited] |
Was there a key just pressed.
- Parameters:
-
keyFlag Key to query.
- Returns:
- Boolean value, true if the key was just pressed.
| static boolean WasKeyReleased | ( | int | keyFlag | ) | [static, inherited] |
Was there a key just released.
- Parameters:
-
keyFlag Key to query.
- Returns:
- Boolean value, true if the key was just released.
Generated on Tue Sep 23 23:05:30 2008 for GLLib by
1.5.2