show_mouse(3alleg4)
π show_mouse β Allegro manual, bestie edition π¦
ok so like. this is show_mouse(3alleg4) from the Allegro manual and it's literally the function that makes a lil mouse pointer show up on your screen. that's the whole vibe. let's get into it β¨
πΈ NAME πΈ
show_mouse β tells Allegro to display a mouse pointer on the screen. yes queen, that's it, that's the job π
β¨ SYNOPSIS β¨
#include <allegro.h>
void show_mouse(BITMAP *bmp);
π DESCRIPTION π
okay so show_mouse tells Allegro to display a mouse pointer on the screen. heads up tho: this will only work if the timer module has been installed. no timer module, no pointer. that's the rules bestie π
the mouse pointer gets drawn onto the bitmap you specify, which should normally be screen (peep later in the docs for the whole bitmaps situation if you're curious). and if you wanna hide the pointer? you just hit it with show_mouse(NULL). gone. poof. π«Ά
β οΈ Warning: if you draw anything onto the screen while the pointer is visible, a mouse movement interrupt could occur in the middle of your drawing operation. and if that happens, the mouse buffering and graphics drawing code will get confused and will leave 'mouse droppings' all over the screen ππ not cute!! to prevent this, you must make sure you turn off the mouse pointer whenever you draw onto the screen. the one exception: this is not needed if you are using a hardware cursor. slay.
π Note: you must not be showing a mouse pointer on a bitmap at the time that the bitmap is destroyed withdestroy_bitmap(). like, for real, callshow_mouse(NULL);before destroying the bitmap. this does not apply toscreen, since you never destroyscreenwithdestroy_bitmap().screenis forever, main character energy fr fr π
π SEE ALSO π
install_mouse(3alleg4)install_timer(3alleg4)set_mouse_sprite(3alleg4)scare_mouse(3alleg4)freeze_mouse_flag(3alleg4)show_os_cursor(3alleg4)exmouse(3alleg4)expal(3alleg4)exshade(3alleg4)exspline(3alleg4)exsyscur(3alleg4)
ok that's the whole page bestie, go forth and show that mouse πβ¨
this was Allegro version 4.4.3, show_mouse(3alleg4), and yes the manual page itself is also called show_mouse(3alleg4) because consistency is iconic π
π bye!! π¦
π¦ 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