ScummVM API documentation
Ultima::Shared::EventsManager Class Reference
Inheritance diagram for Ultima::Shared::EventsManager:
Ultima::Nuvie::Events

Public Member Functions

 EventsManager (EventsCallback *callback)
 
void addTarget (EventTarget *target)
 
void removeTarget ()
 
virtual bool pollEvent (Common::Event &event)
 
void pollEvents ()
 
void pollEventsAndWait ()
 
uint32 getFrameCounter () const
 
uint32 getTicksCount () const
 
void sleep (uint time)
 
bool waitForPress (uint expiry)
 
void setMousePos (const Point &pt)
 
bool isSpecialPressed (SpecialButtons btn) const
 
uint getSpecialButtons () const
 
virtual void setCursor (int cursorId)
 
void showCursor ()
 
void hideCursor ()
 
bool isCursorVisible ()
 
uint32 getTicks ()
 
uint32 playTime () const
 
void setPlayTime (uint32 time)
 
bool isButtonDown (MouseButton button) const
 
bool isButtonDown () const
 
byte getButtonState () const
 
Common::Point getMousePos () const
 

Protected Member Functions

virtual void nextFrame ()
 

Member Function Documentation

◆ nextFrame()

virtual void Ultima::Shared::EventsManager::nextFrame ( )
protectedvirtual

Handles moving to the next game frame

◆ addTarget()

void Ultima::Shared::EventsManager::addTarget ( EventTarget target)
inline

Adds a new event target to the top of the list. It will get all events generated until such time as another is pushed on top of it, or the removeTarget method is called

◆ removeTarget()

void Ultima::Shared::EventsManager::removeTarget ( )
inline

Removes the currently active event target

◆ pollEvent()

virtual bool Ultima::Shared::EventsManager::pollEvent ( Common::Event event)
virtual

Polls the ScummVM backend for any pending events, passing out the event, if any

◆ pollEvents()

void Ultima::Shared::EventsManager::pollEvents ( )

Checks for any pending events. This differs from pollEvent, in that the event manager will dispatch all pending events to the currently registered active event target, rather than simply returning a single event like pollEvent does

◆ pollEventsAndWait()

void Ultima::Shared::EventsManager::pollEventsAndWait ( )

Poll for events and introduce a small delay, to allow the system to yield to other running programs

◆ getFrameCounter()

uint32 Ultima::Shared::EventsManager::getFrameCounter ( ) const
inline

Return the current game frame number

◆ getTicksCount()

uint32 Ultima::Shared::EventsManager::getTicksCount ( ) const

Get the elapsed playtime

◆ sleep()

void Ultima::Shared::EventsManager::sleep ( uint  time)

Sleep for a specified period of time

◆ waitForPress()

bool Ultima::Shared::EventsManager::waitForPress ( uint  expiry)

Wait for a mouse or keypress

◆ setMousePos()

void Ultima::Shared::EventsManager::setMousePos ( const Point pt)

Sets the mouse position

◆ getSpecialButtons()

uint Ultima::Shared::EventsManager::getSpecialButtons ( ) const
inline

Returns the bitset of the currently pressed special buttons

◆ showCursor()

void Ultima::Shared::EventsManager::showCursor ( )

Show the mouse cursor

◆ hideCursor()

void Ultima::Shared::EventsManager::hideCursor ( )

Hide the mouse cursor

◆ isCursorVisible()

bool Ultima::Shared::EventsManager::isCursorVisible ( )

Returns if the mouse cursor is visible

◆ getTicks()

uint32 Ultima::Shared::EventsManager::getTicks ( )
inline

Gets the current total ticks

◆ playTime()

uint32 Ultima::Shared::EventsManager::playTime ( ) const
inline

Gets the total overall play time

◆ setPlayTime()

void Ultima::Shared::EventsManager::setPlayTime ( uint32  time)
inline

Sets the current play time

◆ isButtonDown() [1/2]

bool Ultima::Shared::EventsManager::isButtonDown ( MouseButton  button) const
inline

Returns true if a given mouse button is pressed

◆ isButtonDown() [2/2]

bool Ultima::Shared::EventsManager::isButtonDown ( ) const
inline

Returns true if any mouse button is pressed

◆ getButtonState()

byte Ultima::Shared::EventsManager::getButtonState ( ) const
inline

Returns the mouse buttons states

◆ getMousePos()

Common::Point Ultima::Shared::EventsManager::getMousePos ( ) const
inline

Return the mouse position


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