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:
- Mouse Addon causing program crash
- bitmaps flicker when moving the mouse
- get all pressed keys? (part two)
- get all pressed keys?
- Weird flex with my Bitmaps on my Screen
- floating mouse coordinates
- GAME MENU
- Strange frame skipping
- Shader Puzzle aka Reverse Engineering cool effect
- Lag when object follows mouse
Other recent discussions:
- [Allegro5] Popup menu fails to display
- How can I map mouse coordinates to world coordinates using allegro transofrms?
- [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