|
SDL2lazy
|
#include <SlEventHandler.h>
Public Member Functions | |
| SlEventObject () | |
| ~SlEventObject () | |
| SlEventObject (const SlEventObject &)=delete | |
| SlEventObject & | operator= (const SlEventObject &)=delete |
| void | addAction (std::string name, int destination, SlManipulation *manip, std::vector< std::string > params) |
| void | trigger (int mouse_x=-1, int mouse_y=-1) |
Public Attributes | |
| bool | need_mouse_coordinates = false |
Private Attributes | |
| std::vector< SlEventAction > | actions_ |
| int | last_mouse_ [2] = {-1,-1} |
Object associated with a specific user input. This object's SlEventActions will be performed when the corresponding input event is received.
| SlEventObject::SlEventObject | ( | ) |
Default constructor
| SlEventObject::~SlEventObject | ( | ) |
Default destructor
|
delete |
Delete copy constructor. Each EventObject is associated with a specific input.
| void SlEventObject::addAction | ( | std::string | name, |
| int | destination, | ||
| SlManipulation * | manip, | ||
| std::vector< std::string > | params | ||
| ) |
Adds a new SlEventAction to actions_.
|
delete |
Deleted, same reason as copy constructor.
| void SlEventObject::trigger | ( | int | mouse_x = -1, |
| int | mouse_y = -1 |
||
| ) |
Triggers the SlEventAction::act() for all objects in actions_.
|
private |
The SlEventActions that will be performed when this object is triggered.
|
private |
Store previous mouse coordinates for relative movement.
| bool SlEventObject::need_mouse_coordinates = false |
Determines if this object required mouse coordinates. If true, coordinates and delta-coordinates will be added to parameters.
1.8.9.1