#include <sdlinput.h>
SDL implementation of Input.
◆ SDLInput()
gcn::SDLInput::SDLInput |
( |
| ) |
|
◆ _pollInput()
virtual void gcn::SDLInput::_pollInput |
( |
| ) |
|
|
inlinevirtual |
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.
Implements gcn::Input.
◆ convertKeyCharacter()
Key gcn::SDLInput::convertKeyCharacter |
( |
SDL_Keysym |
key | ) |
|
|
static |
Converts an SDL keysym to a Key object.
- Parameters
-
- Returns
- a Key object.
◆ convertMouseButton()
int gcn::SDLInput::convertMouseButton |
( |
int |
button | ) |
|
|
protected |
Converts a mouse button from SDL to a Guichan mouse button representation.
- Parameters
-
button | an SDL mouse button. |
- Returns
- a Guichan button.
◆ dequeueKeyInput()
KeyInput gcn::SDLInput::dequeueKeyInput |
( |
| ) |
|
|
virtual |
◆ dequeueMouseInput()
◆ isKeyQueueEmpty()
bool gcn::SDLInput::isKeyQueueEmpty |
( |
| ) |
|
|
virtual |
Checks whether the key queue is empty or not.
- Returns
- true if the key queue is empty.
Implements gcn::Input.
◆ isMouseQueueEmpty()
bool gcn::SDLInput::isMouseQueueEmpty |
( |
| ) |
|
|
virtual |
Checks whether the mouse queue is empyt or not.
- Returns
- true if the mouse queue is empty.
Implements gcn::Input.
◆ processKeyRepeat()
void gcn::SDLInput::processKeyRepeat |
( |
| ) |
|
|
virtual |
◆ pushInput()
void gcn::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
-
◆ mIsRepeating
bool gcn::SDLInput::mIsRepeating |
|
protected |
◆ mKeyInputQueue
std::queue<KeyInput> gcn::SDLInput::mKeyInputQueue |
|
protected |
◆ mLastKey
Key gcn::SDLInput::mLastKey |
|
protected |
◆ mMouseDown
bool gcn::SDLInput::mMouseDown |
|
protected |
◆ mMouseInputQueue
std::queue<MouseInput> gcn::SDLInput::mMouseInputQueue |
|
protected |
◆ mMouseInWindow
bool gcn::SDLInput::mMouseInWindow |
|
protected |
The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The