#include <SlEventHandler.h>
Takes a SDL_Event and calls the assigned SlEventObject.
| SlEventHandler::SlEventHandler |
( |
| ) |
|
| SlEventHandler::~SlEventHandler |
( |
| ) |
|
Delete copy constructor. EventHandler is unique to SlManager and its sprites.
| void SlEventHandler::addAction |
( |
const std::string & |
key, |
|
|
const std::string & |
whatToDo, |
|
|
const std::string & |
spritename, |
|
|
int |
destination, |
|
|
std::vector< std::string > |
parameters |
|
) |
| |
| void SlEventHandler::addManipulations |
( |
const std::map< std::string, SlManipulation * > & |
manip | ) |
|
| SlManipulation * SlEventHandler::getManipulation |
( |
const std::string & |
whatToDo | ) |
|
| int SlEventHandler::handleEvent |
( |
const SDL_Event & |
event | ) |
|
The actual event handling, checking what SDL_Event was registered. Limited implimentation.
- Return values
-
| 1 | if event was quit. |
| 0 | otherwise. |
< undefined input is ignored.
Deleted, same reason as copy constructor.
| void SlEventHandler::parseEvent |
( |
std::ifstream & |
input | ) |
|
Parse configuration file entry. Pattern: key what spritename sprite_destination parameters
| int SlEventHandler::pollEvent |
( |
| ) |
|
Check for events.
- Return values
-
| 1 | if event was quit. |
| 0 | otherwise. |
< 0 means don't quit, 1 means quit
| SDL_Event SlEventHandler::event_ |
|
private |
The event used for polling.
| std::map<std::string, SlEventObject> SlEventHandler::eventActions_ |
|
private |
The string is the keyword for the event handling.
Contains pointers to all SlSpriteManipulations and SlRenderManipulations
The documentation for this class was generated from the following files: