19 #ifndef OPENXCOM_ACTION_H
20 #define OPENXCOM_ACTION_H
27 class InteractiveSurface;
38 double _scaleX, _scaleY;
39 int _topBlackBand, _leftBlackBand, _mouseX, _mouseY, _surfaceX, _surfaceY;
43 Action(SDL_Event *ev,
double scaleX,
double scaleY,
int topBlackBand,
int leftBlackBand);
51 void setMouseAction(
int mouseX,
int mouseY,
int surfaceX,
int surfaceY);
int getTopBlackBand() const
Gets the top black band height.
Definition: Action.cpp:87
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
Surface that the user can interact with.
Definition: InteractiveSurface.h:39
~Action()
Cleans up the action.
Definition: Action.cpp:37
SDL_Event * getDetails() const
Gets the details of the action.
Definition: Action.cpp:200
void setSender(InteractiveSurface *sender)
Sets the sender of the action.
Definition: Action.cpp:191
Action(SDL_Event *ev, double scaleX, double scaleY, int topBlackBand, int leftBlackBand)
Creates an action with given event data.
Definition: Action.cpp:33
double getAbsoluteXMouse() const
Gets the mouse's absolute X position.
Definition: Action.cpp:130
double getRelativeXMouse() const
Gets the mouse's relative X position.
Definition: Action.cpp:156
int getYMouse() const
Gets the mouse's Y position.
Definition: Action.cpp:119
InteractiveSurface * getSender() const
Gets the sender of the action.
Definition: Action.cpp:181
double getAbsoluteYMouse() const
Gets the mouse's absolute Y position.
Definition: Action.cpp:143
int getLeftBlackBand() const
Gets the left black band width.
Definition: Action.cpp:97
double getXScale() const
Gets the screen's X scale.
Definition: Action.cpp:46
double getRelativeYMouse() const
Gets the mouse's relative Y position.
Definition: Action.cpp:169
bool isMouseAction() const
Gets if the action is a mouse action.
Definition: Action.cpp:77
void setMouseAction(int mouseX, int mouseY, int surfaceX, int surfaceY)
Sets the action as a mouse action.
Definition: Action.cpp:69
int getXMouse() const
Gets the mouse's X position.
Definition: Action.cpp:108
double getYScale() const
Gets the screen's Y scale.
Definition: Action.cpp:56