SDL implementation of Input.
More...
#include <sdlinput.h>
|
static int | convertMouseButton (int button) |
| Converts a mouse button from SDL to a Guichan mouse button representation.
|
|
static int | convertKeyCharacter (SDL_Event event) |
| Converts an SDL event key to a key value.
|
|
SDL implementation of Input.
Definition at line 142 of file sdlinput.h.
◆ SDLInput()
◆ _pollInput()
void SDLInput::_pollInput |
( |
| ) |
|
|
inlineoverride |
Polls all input.
It exists for input driver compatibility. If you only use SDL and plan sticking with SDL you can safely ignore this function as it in the SDL case does nothing.
Definition at line 164 of file sdlinput.h.
◆ convertKeyCharacter()
int SDLInput::convertKeyCharacter |
( |
SDL_Event |
event | ) |
|
|
staticprotected |
Converts an SDL event key to a key value.
- Parameters
-
event | an SDL event with a key to convert. |
- Returns
- a key value.
- See also
- Key
Definition at line 256 of file sdlinput.cpp.
◆ convertMouseButton()
int SDLInput::convertMouseButton |
( |
int |
button | ) |
|
|
staticprotected |
Converts a mouse button from SDL to a Guichan mouse button representation.
- Parameters
-
button | an SDL mouse button. |
- Returns
- a Guichan mouse button.
Definition at line 240 of file sdlinput.cpp.
◆ dequeueKeyInput()
gcn::KeyInput SDLInput::dequeueKeyInput |
( |
| ) |
|
|
override |
◆ dequeueMouseInput()
gcn::MouseInput SDLInput::dequeueMouseInput |
( |
| ) |
|
|
override |
◆ dequeueTextInput()
◆ isKeyQueueEmpty()
bool SDLInput::isKeyQueueEmpty |
( |
| ) |
|
|
override |
◆ isMouseQueueEmpty()
bool SDLInput::isMouseQueueEmpty |
( |
| ) |
|
|
override |
◆ isTextQueueEmpty()
bool SDLInput::isTextQueueEmpty |
( |
| ) |
const |
◆ pushInput()
void SDLInput::pushInput |
( |
SDL_Event |
event | ) |
|
|
virtual |
Pushes an SDL event.
It should be called at least once per frame to update input with user input.
- Parameters
-
Definition at line 132 of file sdlinput.cpp.
◆ mKeyInputQueue
std::queue<gcn::KeyInput> SDLInput::mKeyInputQueue |
|
protected |
◆ mMouseDown
bool SDLInput::mMouseDown = false |
|
protected |
◆ mMouseInputQueue
std::queue<gcn::MouseInput> SDLInput::mMouseInputQueue |
|
protected |
◆ mTextInputQueue
std::queue<TextInput> SDLInput::mTextInputQueue |
|
protected |
The documentation for this class was generated from the following files: