Open Game Engine 2D API
|
Functions | |
int | OGE_GetKey () |
Get current pressed key of the keyboard. | |
void | OGE_HoldKeyEvent () |
Stop broadcasting the key event. | |
void | OGE_SkipMouseEvent () |
Continue to broadcast the mouse event. | |
int | OGE_GetScanCode () |
Get the scan code of current pressed key in the keyboard. | |
void | OGE_ShowKeyboard (bool bShow) |
Show the soft keyboard or not. | |
bool | OGE_IsKeyboardShown () |
Check if the soft keyboard is shown or not. | |
void | OGE_SetKeyDown (int iKey) |
Fire a key down event. | |
void | OGE_SetKeyUp (int iKey) |
Fire a key up event. | |
bool | OGE_IsKeyDown (int iKey) |
Check if the key of the keyboard is pressed or not. | |
bool | OGE_IsKeyDownTime (int iKey, int iInterval) |
Check whether the keyboard key is pressed again after the last time it was pressed. | |
int | OGE_GetJoystickCount () |
Return a count of the number of joysticks available. | |
bool | OGE_IsJoyKeyDown (int iJoyId, int iKey) |
Check if the joystick key is pressed or not. | |
bool | OGE_IsJoyKeyDownTime (int iJoyId, int iKey, int iInterval) |
Check if the joystick key is pressed again in a short time after it was pressed last time. | |
bool | OGE_IsMouseLeftDown () |
Check if the left button of the mouse is pressed or not. | |
bool | OGE_IsMouseRightDown () |
Check if the right button of the mouse is pressed or not. | |
bool | OGE_IsMouseLeftUp () |
Check if the left button of the mouse is up or not. | |
bool | OGE_IsMouseRightUp () |
Check if the right button of the mouse is up or not. | |
int | OGE_GetMouseX () |
Get the x coordinate of the position of the mouse cursor. | |
int | OGE_GetMouseY () |
Get the y coordinate of the position of the mouse cursor. | |
int | OGE_GetCaretPos (int iSprId) |
Get the position of the caret of the text input editor. | |
void | OGE_ResetCaretPos (int iSprId) |
Reset the position of the caret of the text input editor (reset it to be zero) | |
int | OGE_GetInputTextBuffer (int iSprId) |
Get the text input buffer. | |
void | OGE_ClearInputTextBuffer (int iSprId) |
Clear text input buffer. | |
int | OGE_GetInputCharCount (int iSprId) |
Get the count of the characters of the input text. | |
string | OGE_GetInputText (int iSprId) |
Get the input text. | |
int | OGE_SetInputText (int iSprId, string sText) |
Fill the input text buffer with a string. | |
void | OGE_SetInputWinPos (int iSprId, int iPosX, int iPosY) |
Set the position of the input window. |
void OGE_ClearInputTextBuffer | ( | int | iSprId | ) |
Clear text input buffer.
[in] | iSprId | The ID of the text input sprite |
int OGE_GetCaretPos | ( | int | iSprId | ) |
Get the position of the caret of the text input editor.
[in] | iSprId | The ID of the text input sprite |
int OGE_GetInputCharCount | ( | int | iSprId | ) |
Get the count of the characters of the input text.
[in] | iSprId | The ID of the text input sprite |
string OGE_GetInputText | ( | int | iSprId | ) |
Get the input text.
[in] | iSprId | The ID of the text input sprite |
int OGE_GetInputTextBuffer | ( | int | iSprId | ) |
Get the text input buffer.
[in] | iSprId | The ID of the text input sprite |
int OGE_GetJoystickCount | ( | ) |
Return a count of the number of joysticks available.
int OGE_GetKey | ( | ) |
Get current pressed key of the keyboard.
int OGE_GetMouseX | ( | ) |
Get the x coordinate of the position of the mouse cursor.
int OGE_GetMouseY | ( | ) |
Get the y coordinate of the position of the mouse cursor.
int OGE_GetScanCode | ( | ) |
Get the scan code of current pressed key in the keyboard.
bool OGE_IsJoyKeyDown | ( | int | iJoyId, |
int | iKey | ||
) |
Check if the joystick key is pressed or not.
[in] | iJoyId | The ID of the joystick |
[in] | iKey | The joystick key |
bool OGE_IsJoyKeyDownTime | ( | int | iJoyId, |
int | iKey, | ||
int | iInterval | ||
) |
Check if the joystick key is pressed again in a short time after it was pressed last time.
[in] | iJoyId | The ID of the joystick |
[in] | iKey | The joystick key |
[in] | iInterval | The short time |
bool OGE_IsKeyboardShown | ( | ) |
Check if the soft keyboard is shown or not.
bool OGE_IsKeyDown | ( | int | iKey | ) |
Check if the key of the keyboard is pressed or not.
[in] | iKey | The key code |
bool OGE_IsKeyDownTime | ( | int | iKey, |
int | iInterval | ||
) |
Check whether the keyboard key is pressed again after the last time it was pressed.
[in] | iKey | The keyboard key |
[in] | iInterval | The waiting time after the last time it was pressed |
bool OGE_IsMouseLeftDown | ( | ) |
Check if the left button of the mouse is pressed or not.
bool OGE_IsMouseLeftUp | ( | ) |
Check if the left button of the mouse is up or not.
bool OGE_IsMouseRightDown | ( | ) |
Check if the right button of the mouse is pressed or not.
bool OGE_IsMouseRightUp | ( | ) |
Check if the right button of the mouse is up or not.
void OGE_ResetCaretPos | ( | int | iSprId | ) |
Reset the position of the caret of the text input editor (reset it to be zero)
[in] | iSprId | The ID of the text input sprite |
int OGE_SetInputText | ( | int | iSprId, |
string | sText | ||
) |
Fill the input text buffer with a string.
[in] | iSprId | The ID of the text input sprite |
[in] | sText | The string used to fill the buffer |
void OGE_SetInputWinPos | ( | int | iSprId, |
int | iPosX, | ||
int | iPosY | ||
) |
Set the position of the input window.
[in] | iSprId | The ID of the text input sprite |
[in] | iPosX | The x coordinate of the position of the input window |
[in] | iPosY | The y coordinate of the position of the input window |
void OGE_SetKeyDown | ( | int | iKey | ) |
Fire a key down event.
[in] | iKey | The key code for the key event |
void OGE_SetKeyUp | ( | int | iKey | ) |
Fire a key up event.
[in] | iKey | The key code for the key event |
void OGE_ShowKeyboard | ( | bool | bShow | ) |
Show the soft keyboard or not.
[in] | bShow | If true then show the keyboard, otherwise hide it |