ScummVM API documentation
MADS::EventsManager Class Reference

Public Member Functions

 EventsManager (MADSEngine *vm)
 
 ~EventsManager ()
 
void loadCursors (const Common::Path &spritesName)
 
void setCursor (CursorType cursorId)
 
void setCursor2 (CursorType cursorId)
 
void showCursor ()
 
void hideCursor ()
 
bool isCursorVisible ()
 
void waitCursor ()
 
void freeCursors ()
 
void pollEvents ()
 
void setEventTarget (EventTarget *target)
 
Common::Point mousePos () const
 
Common::Point currentPos () const
 
void delay (int amount)
 
void waitForNextFrame ()
 
bool checkForNextFrameCounter ()
 
uint32 getFrameCounter () const
 
void initVars ()
 
void clearEvents ()
 
bool isKeyPressed () const
 
bool isActionTriggered () const
 
Common::KeyState getKey ()
 
Common::CustomEventType getAction ()
 

Public Attributes

SpriteAsset_cursorSprites
 
CursorType _cursorId
 
CursorType _newCursorId
 
bool _mouseClicked
 
bool _mouseReleased
 
byte _mouseButtons
 
bool _rightMousePressed
 
int _mouseStatus
 
int _strokeGoing
 
int _mouseStatusCopy
 
bool _mouseMoved
 
Common::Stack< Common::KeyState_pendingKeys
 
Common::Stack< Common::CustomEventType_pendingActions
 

Constructor & Destructor Documentation

◆ EventsManager()

MADS::EventsManager::EventsManager ( MADSEngine vm)

Constructor

◆ ~EventsManager()

MADS::EventsManager::~EventsManager ( )

Destructor

Member Function Documentation

◆ loadCursors()

void MADS::EventsManager::loadCursors ( const Common::Path spritesName)

Loads the sprite set containing the cursors

◆ setCursor()

void MADS::EventsManager::setCursor ( CursorType  cursorId)

Sets the cursor

◆ setCursor2()

void MADS::EventsManager::setCursor2 ( CursorType  cursorId)

Sets the cursor

◆ showCursor()

void MADS::EventsManager::showCursor ( )

Show the mouse cursor

◆ hideCursor()

void MADS::EventsManager::hideCursor ( )

Hide the mouse cursor

◆ isCursorVisible()

bool MADS::EventsManager::isCursorVisible ( )

Returns if the mouse cursor is visible

◆ waitCursor()

void MADS::EventsManager::waitCursor ( )

Shows the wait cursor

◆ freeCursors()

void MADS::EventsManager::freeCursors ( )

Free currently loaded cursors

◆ pollEvents()

void MADS::EventsManager::pollEvents ( )

Poll any pending events

◆ setEventTarget()

void MADS::EventsManager::setEventTarget ( EventTarget target)
inline

Sets an event handler other than the events manager

◆ mousePos()

Common::Point MADS::EventsManager::mousePos ( ) const
inline

Return the current mouse position

◆ currentPos()

Common::Point MADS::EventsManager::currentPos ( ) const
inline

Return the current mouse position

◆ delay()

void MADS::EventsManager::delay ( int  amount)

Delay for a given number of frames

◆ waitForNextFrame()

void MADS::EventsManager::waitForNextFrame ( )

Wait for the next frame

◆ checkForNextFrameCounter()

bool MADS::EventsManager::checkForNextFrameCounter ( )

Checks for whether the next game frame number has been reached.

◆ getFrameCounter()

uint32 MADS::EventsManager::getFrameCounter ( ) const
inline

Gets the current frame counter

◆ clearEvents()

void MADS::EventsManager::clearEvents ( )

Clears all currently pending keypresses

◆ isKeyPressed()

bool MADS::EventsManager::isKeyPressed ( ) const
inline

Returns true if there's any pending keys to be processed

◆ isActionTriggered()

bool MADS::EventsManager::isActionTriggered ( ) const
inline

Returns true if there's any pending actions to be processed

◆ getKey()

Common::KeyState MADS::EventsManager::getKey ( )
inline

Gets the next pending keypress

◆ getAction()

Common::CustomEventType MADS::EventsManager::getAction ( )
inline

Gets the next pending action


The documentation for this class was generated from the following file: