al_mouse_button_down(3)
okay bestie, youβre reading the Library Functions Manual entry for al_mouse_button_down(3) β and yes, this is the Allegro 5 API glow-up π
β¨
β¨ NAME β¨
al_mouse_button_down β Allegro 5 API, and itβs literally here to check a mouse button for you π±οΈπ
π SYNOPSIS π
#include <allegro5/allegro.h>
bool al_mouse_button_down(const ALLEGRO_MOUSE_STATE *state, int button)
π DESCRIPTION π
So hereβs the vibe: this function returns true if the mouse button you specified was held down in the state you specified. No cap, thatβs the whole main-character job. π
Unlike most things, the first mouse button is numbered 1 β yes, 1, not 0, bestie. As a convenience, the constants ALLEGRO_MOUSE_BUTTON_LEFT, ALLEGRO_MOUSE_BUTTON_RIGHT, and ALLEGRO_MOUSE_BUTTON_MIDDLE are provided. π
But heads up: depending on the hardware, there may be more or fewer mouse buttons. If you want to be sure, you can check al_get_mouse_num_buttons(3) β sheβll tell you whatβs actually there π¦
π¦ SEE ALSO π¦
ALLEGRO_MOUSE_STATE(3)β the state situation πal_get_mouse_state(3)β grab that mouse state β¨al_get_mouse_state_axis(3)β axis info, iykyk πΈ
From the Allegro reference manual β al_mouse_button_down(3), signing off ππ
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms