al_set_display_menu(3alleg5)
β¨ NAME β¨
al_set_display_menu β the Allegro 5 API girlies know π
This one lives in the Allegro 5 manual, bestie, and it's about giving your display a menu.
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_native_dialog.h>
bool al_set_display_menu(ALLEGRO_DISPLAY *display, ALLEGRO_MENU *menu)
π DESCRIPTION π
okay so basically: this function associates the menu with the display and shows it. that's the whole vibe. menu goes on display, menu appears, slay. β¨
but here's the plot twist π β if there was a previous menu associated with the display, it will be destroyed. like, gone. no cap. if you are NOT about that life, you should first remove the menu with al_remove_display_menu(3alleg5). protect your menu, bestie, it's the main character. π«Ά
and another thing: if the menu is already attached to a display, it will not be attached to the new display. it's loyal like that. π
also if menu is NULL, the current menu will still be destroyed. yes even then. the destruction does not care. π
Note: attaching a menu may cause the window as available to your application to be resized! you should listen for a resize event, check how much space was lost, and resize the window accordingly if you want to maintain your window's prior size. like, your window's available area can literally change out from under you, so keep an eye on it. π
Returns true if successful. (and if it's not successful⦠well, it's not true, iykyk.)
β SINCE β
5.1.0 β she's been iconic since 5.1.0, periodt. π
π¦ SEE ALSO π¦
and that's the page, bestie β brought to you by the Allegro reference manual and its al_set_display_menu(3alleg5) era. mwah. πβ¨π
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms