init_menu(3alleg4)
π init_menu β it's giving "build your own menu loop" β¨
okay bestie, welcome to the Allegro manual β yes, init_menu(3alleg4), the Allegro game programming library, we're doing this π
πΈ NAME πΈ
init_menu β low level initialisation of a menu. Allegro game programming library. no cap, that's literally the whole vibe π
π¦ SYNOPSIS π¦
#include <allegro.h>
MENU_PLAYER *init_menu(MENU *menu, int x, int y);
β¨ DESCRIPTION β¨
so like. this function gives you lower level access to the exact same functionality as do_menu(), except β and this is the iconic part β it lets you combine a popup menu with your own program control structures. main character energy fr fr π
it initialises a menu, and returns a pointer to a menu player object that you can use with update_menu() and shutdown_menu(). those two are your new besties, keep them close π«Ά
and the way that you could implement your own version of do_menu() with these functions?? obsessed. it's literally these lines:
MENU_PLAYER *player = init_menu(menu, x, y);
while (update_menu(player))
;
return shutdown_menu(player);
like. that's it. that's the whole loop. ate and left no crumbs π
π SEE ALSO π
go read those too, bestie, iykyk π
β reminder: this is the low level one. if you just want the menu to do its thing without babysitting it, do_menu() is right there and it's slaying on your behalf.
okay that's the whole page π this was Allegro version 4.4.3, page init_menu(3alleg4) β mwah, go forth and pop up some menus πβ¨π
π¦ 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