ALLEGRO_MOUSE_STATE
typedef struct ALLEGRO_MOUSE_STATE ALLEGRO_MOUSE_STATE;
Introduced in 5.0.0
Public fields (read only):
- x - mouse x position
- y - mouse y position
- w, z - mouse wheel position (2D 'ball')
- buttons - mouse buttons bitfield
The zeroth bit is set if the primary mouse button is held down, the first bit is set if the secondary mouse button is held down, and so on.
See also: al_get_mouse_state, al_get_mouse_state_axis, al_mouse_button_down
Examples: ex_mouse, ex_mouse_focus
Most helpful discussions:
- [A5] Show & Hide window/display Cross-Platform ?
- Why some Shaders don't work !
- Which is preferred: al_mouse_button_down or mouse_state.buttons?
- FULLSCREEN_WINDOW and display scaling on high DPI settings - Workaround
- ALLEGRO 5 - Bitmap Corruption after writing to source image
- Adjust camera depending on mouse location
- More efficient way to capture mouse position?
- Drag line with mouse on a fixed angle
- File I/O
- GUI Basics? (AGUI)
Other recent discussions:
- Programm lagging
- Y-pos example for Peter Wang
- Am I using 'do while' loops correctly?
- Allegro 5 + OpenGL + GL_DEPTH_TEST problem
- Allegro bitmaps: clearing to color
- Destroying timer causes crash
- [Allegro 5][Mac OS X]invalid fullscreen drawable
- Optimizing Isometric Tiles
- Installing Allegro5 under C::B
- Increase in Programming Questions