![]() |
Blamite Game Engine - blam!
00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
|
Namespace containing functions for handling input from keyboards, mice, etc. More...
Functions | |
BLAM void | FireKeyPress (SDL_Keycode key) |
Fires a key press event. More... | |
BLAM void | FireCharacterInput (char character) |
Fires a character input event. More... | |
BLAM void | SetKeyState (SDL_Keycode key, bool down) |
Sets the pressed state of a key. More... | |
BLAM bool | IsKeyDown (SDL_Keycode key) |
Checks if a given key is down. More... | |
BLAM void | FireMouseClick (uint8_t button) |
Fires a MouseClickEvent. More... | |
BLAM void | FireMouseMove (int x, int y) |
Fires a MouseMoveEvent. More... | |
BLAM void | SetMouseButtonState (uint8_t button, bool down) |
Sets the mouse down state for a given mouse button. More... | |
BLAM bool | IsMouseButtonDown (uint8_t button) |
Checks if a given mouse button is down. More... | |
Namespace containing functions for handling input from keyboards, mice, etc.
void Blam::Input::FireCharacterInput | ( | char | character | ) |
Fires a character input event.
character | - The character that was pressed. |
void Blam::Input::FireKeyPress | ( | SDL_Keycode | key | ) |
Fires a key press event.
key | - The virtual key code that was pressed. |
void Blam::Input::FireMouseClick | ( | uint8_t | button | ) |
Fires a MouseClickEvent.
button | - The mouse button that was pressed. Valid values can be seen in sdl2/SDL_mouse.h , all starting with SDL_BUTTON_ . |
void Blam::Input::FireMouseMove | ( | int | x, |
int | y | ||
) |
Fires a MouseMoveEvent.
Should generally only be called from the engine input listeners.
x | - The distance the mouse has moved along the X axis. |
y | - The distance the mouse has moved along the Y axis. |
bool Blam::Input::IsKeyDown | ( | SDL_Keycode | key | ) |
Checks if a given key is down.
key | - The keycode to check. |
true
if the key is currently pressed, otherwise returns false
. bool Blam::Input::IsMouseButtonDown | ( | uint8_t | button | ) |
Checks if a given mouse button is down.
button | - The mouse button to check. Valid values can be seen in sdl2/SDL_mouse.h , all starting with SDL_BUTTON_ . |
true
if the specified mouse button is down, otherwise returns false
. void Blam::Input::SetKeyState | ( | SDL_Keycode | key, |
bool | down | ||
) |
Sets the pressed state of a key.
key | - The keycode to set the state for. |
down | - Whether or not the key is currently being pressed. |
void Blam::Input::SetMouseButtonState | ( | uint8_t | button, |
bool | down | ||
) |
Sets the mouse down state for a given mouse button.
button | - The mouse button to set the state for. Valid values can be seen in sdl2/SDL_mouse.h , all starting with SDL_BUTTON_ . |
down | - Whether or not the button is currently being pressed. |