do_menu(3alleg4)
β¨ NAME β¨
hiii bestie π welcome to the do_menu page from the Allegro manual β it's giving game programming library realness β¨
do_menuβ displays and animates a popup menu. Allegro game programming library.
πΈ SYNOPSIS πΈ
okay so the vibe check is: you include allegro, and then you call it like this π
#include <allegro.h>
int do_menu(MENU *menu, int x, int y);
π DESCRIPTION π
okay so picture this: you got a popup menu and you want it to pop <em>off</em> π
. do_menu displays and animates that popup menu right at the screen coordinates you pass in with x and y. but heads up β if the menu does not entirely fit on the screen, those coordinates get adjusted for you, no cap. β¨
it returns the index of the menu item that was selected, or -1 if the menu was cancelled. that's the tea. π«
but wait β plot twist π: the return value <strong>cannot</strong> indicate selection from child menus. so if you want multi-level menus, you're gonna have to use the callback functions. iykyk. π§
π¦ SEE ALSO π¦
go check out these besties, they're all part of the same friend group π«Ά:
k that's the whole page π this was do_menu(3alleg4) from the Allegro manual, version 4.4.3 β slay, 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