|
gramods
|
Event adaptor for SDL2, providing means to input events into TouchState. More...
#include <SDLEventAdaptor.hh>


Public Member Functions | |
| void | init (int width, int height) override |
| Called by the owner (TouchState) when eventsInit is called. | |
| void | done () override |
| Called by the owner (TouchState) when eventsDone is called. | |
| void | handleEvent (const SDL_Event &event) |
| Updates the internal touch states based on the provided event. | |
Additional Inherited Members | |
Protected Member Functions inherited from gramods::gmTouch::TouchState::EventAdaptor | |
| void | addTouchState (TouchPointId id, float x, float y) |
| Adds a touch point sample. | |
| void | removeTouchState (TouchPointId id, float x, float y) |
| Removes the touch point with the specified id. | |
| void | addMouseState (float x, float y, bool mouse_down) |
| Add the specified mouse state. | |
| void | addMouseWheel (float s) |
| Sets the wheel value, positive up and negative down. | |
Event adaptor for SDL2, providing means to input events into TouchState.
Typical use:
|
overridevirtual |
Called by the owner (TouchState) when eventsDone is called.
Reimplemented from gramods::gmTouch::TouchState::EventAdaptor.
| void gramods::gmTouch::SDLEventAdaptor::handleEvent | ( | const SDL_Event & | event | ) |
Updates the internal touch states based on the provided event.
Call this once for each incoming event and finish with a call to eventsDone.
|
overridevirtual |
Called by the owner (TouchState) when eventsInit is called.
Reimplemented from gramods::gmTouch::TouchState::EventAdaptor.