Class SDLMouseState[in The SDL Falcon Module.]

Allows querying of current mouse status.

class SDLMouseState

more...

Summary

stateMouse button pression state
xCurrent mouse x positio
xrelRelative x movement with respect to last check
yCurrent mouse y positio
yrelRelative y movement with respect to last check
PumpAndRefresh()Peeks incoming events into SDL and then refresh current mouse position and status.
Refresh()Refresh current mouse position and status.

Detailed description

Allows querying of current mouse status.

This class is used to wrap mouse event collection functions SDL_GetMouseState and SDL_GetRelativeMouseState.

To query the state of the mouse, it is necessary to create an instance of this class, and then call its refresh() method.

If the program doesn't call periodically event dispatching routines or if it doesn't pump events through SDL.PumpEvents, then it is necessary to use the pumpAndRefresh() method for the contents of this class to be updated.

Properties

state

Mouse button pression state

x

Current mouse x positio

xrel

Relative x movement with respect to last check

y

Current mouse y positio

yrel

Relative y movement with respect to last check

Methods

PumpAndRefresh()

Peeks incoming events into SDL and then refresh current mouse position and status.

SDLMouseState.PumpAndRefresh( )

This method internally performs a SDL.PumpEvents call before calling the refresh method.

Refresh()

Refresh current mouse position and status.

SDLMouseState.Refresh( )

Use this method only if the program pumps events or waits for them regularly. Otherwise, use SDLMouseState.PumpAndRefresh.


Made with faldoc 2.0.0