set_mouse_cursor_bitmap(3)
β¨ set_mouse_cursor_bitmap π
okay bestie, so this is a page from the Allegro manual, section 3, and it's literally all about set_mouse_cursor_bitmap β the glow-up function for your mouse cursor's lil picture. π±οΈβ¨
π SYNOPSIS π
#include <allegro.h>
void set_mouse_cursor_bitmap(int cursor, BITMAP *bmp);
π¦ DESCRIPTION π¦
so here's the tea β: this function swaps out the cursor image Allegro uses if select_mouse_cursor() gets called but likeβ¦ there's no native operating system cursor it can use. when does that happen? for example, because you didn't call enable_hardware_cursor(). yeah. that one's on you, no cap. π
the cursor argument can be one of these icons, and they're all giving very specific energy:
MOUSE_CURSOR_ALLEGROMOUSE_CURSOR_ARROWMOUSE_CURSOR_BUSYMOUSE_CURSOR_QUESTIONMOUSE_CURSOR_EDIT
π¨ but not MOUSE_CURSOR_NONE. do not pass that one. it's not invited to the function. periodt. π
now the bmp argument, and this one's flexible β it can either point to a valid bitmap, or it can be NULL. your choice, bestie, main character decisions only.
- pass a bitmap and Allegro will use that image instead of its own default substitution (that's the fallback for when the operating system's native cursor isn't available). β οΈ the bitmap must remain available for the duration in which it could be used β so don't free it, don't let it get eaten, keep it alive and thriving.
- pass
NULLand Allegro reverts to its default substitutions. back to factory settings, iconic behaviour. π
π also important: the effect of this function will not be apparent untilshow_mouse()is called. so if you're sitting there like "why is nothing happening"β¦ girl. callshow_mouse(). that's the vibe check.
π SEE ALSO π
install_mouse(3)show_mouse(3)set_mouse_sprite(3)gfx_capabilities(3)enable_hardware_cursor(3)show_os_cursor(3)
okay that's the whole page, you ate that fr fr. π«Ά this was written for Allegro, version 4.4.3 β and that's the whole manual entry, slay. π πΈ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms