ScummVM API documentation
AGS::EventsManager Class Reference

Public Member Functions

void pollEvents ()
 
bool keyEventPending () const
 
Common::Event getPendingKeyEvent ()
 
uint getModifierFlags () const
 
void pushKeyboardEvent (const Common::Event &evt)
 
Common::Event readEvent ()
 
void warpMouse (const Common::Point &newPos)
 
bool isKeyPressed (AGS3::eAGSKeyCode key, bool poll=true)
 
void clearEvents ()
 
Common::Point getMousePos () const
 
int16 getJoystickAxis (byte axis) const
 
bool getJoystickButton (byte button) const
 
bool getJoystickButtonOnce (byte button)
 

Static Public Member Functions

static bool ags_key_to_scancode (AGS3::eAGSKeyCode key, Common::KeyCode(&kc)[3])
 
static AGS3::eAGSKeyCode scummvm_key_to_ags_key (const Common::Event &event, int &ags_mod, bool old_keyhandle)
 

Member Function Documentation

◆ ags_key_to_scancode()

static bool AGS::EventsManager::ags_key_to_scancode ( AGS3::eAGSKeyCode  key,
Common::KeyCode(&)  kc[3] 
)
static

Converts ags key to ScummVM scancode

◆ pollEvents()

void AGS::EventsManager::pollEvents ( )

Poll any pending events

◆ keyEventPending()

bool AGS::EventsManager::keyEventPending ( ) const
inline

Returns true if any unprocessed keyboard events are pending

◆ getPendingKeyEvent()

Common::Event AGS::EventsManager::getPendingKeyEvent ( )
inline

Returns the next pending unprocessed keyboard event

◆ getModifierFlags()

uint AGS::EventsManager::getModifierFlags ( ) const
inline

Returns the bitset of currently pressed modifier keys

◆ pushKeyboardEvent()

void AGS::EventsManager::pushKeyboardEvent ( const Common::Event evt)
inline

Pushes a keydown event into the keypresses queue, without updating the key down flag array

◆ readEvent()

Common::Event AGS::EventsManager::readEvent ( )

Returns the next event, if any

◆ warpMouse()

void AGS::EventsManager::warpMouse ( const Common::Point newPos)

Sets the mouse position

◆ isKeyPressed()

bool AGS::EventsManager::isKeyPressed ( AGS3::eAGSKeyCode  key,
bool  poll = true 
)

Returns true if a given key is pressed

◆ getMousePos()

Common::Point AGS::EventsManager::getMousePos ( ) const
inline

Get the current mouse position

◆ getJoystickAxis()

int16 AGS::EventsManager::getJoystickAxis ( byte  axis) const
inline

Gets a joystick axis position

◆ getJoystickButton()

bool AGS::EventsManager::getJoystickButton ( byte  button) const
inline

Gets whether a given joystick button is down

◆ getJoystickButtonOnce()

bool AGS::EventsManager::getJoystickButtonOnce ( byte  button)
inline

Gets whether a given joystick button is down once


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