SET_MOUSE_CURSOR_BITMAP(3alleg4)
π set_mouse_cursor_bitmap π
okay bestie, welcome to the Allegro manual, section 3alleg4, and today's main character is set_mouse_cursor_bitmap β the glow-up your mouse pointer has been waiting for. let's get into it π¦
β¨ NAME β¨
set_mouse_cursor_bitmap β changes the image Allegro uses for mouse cursors. yes, THE cursor. the lil guy you move around. we're giving it a wardrobe change π
πΈ SYNOPSIS πΈ
#include <allegro.h>
void set_mouse_cursor_bitmap(int cursor, BITMAP *bmp);
π DESCRIPTION π
so here's the tea: this function changes the cursor image Allegro uses if select_mouse_cursor() is called but no native operating system cursor can be used. when does that happen? like, for example, because you did not call enable_hardware_cursor(). no native cursor for you, bestie, so Allegro gotta improvise β¨
the cursor argument can be one of these:
MOUSE_CURSOR_ALLEGROMOUSE_CURSOR_ARROWMOUSE_CURSOR_BUSYMOUSE_CURSOR_QUESTIONMOUSE_CURSOR_EDIT
but not MOUSE_CURSOR_NONE. like, that one's simply not invited to the party π
the bmp argument can either point to a valid bitmap or it can be NULL. passing a bitmap makes Allegro use that image in place of its own default substitution (should the operating system's native cursor be unavailable). the bitmap must remain available for the duration in which it could be used β so don't go freeing it, okay? that's the rule π passing NULL lets Allegro revert to its default substitutions, which is lowkey a full factory reset for your cursor vibe.
heads up: the effect of this function will not be apparent untilshow_mouse()is called. so if you're sitting there like "where is my cute cursor π" β callshow_mouse(), bestie. that's the vibe check.
π«Ά SEE ALSO π«Ά
install_mouse(3alleg4)show_mouse(3alleg4)set_mouse_sprite(3alleg4)gfx_capabilities(3alleg4)enable_hardware_cursor(3alleg4)show_os_cursor(3alleg4)
and that's the whole page, no cap π this was brought to you by Allegro, version 4.4.3, serving set_mouse_cursor_bitmap(3alleg4) realness. go make your cursor iconic, bestie β periodt β¨π
π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms