shutdown_menu(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– shutdown_menu(3) πŸ’–

okay bestie, so this one is from the Allegro manual β€” the game programming library β€” and it's the little cleanup goblin that lives at the end of your menu's whole arc. πŸŽ€


✨ NAME ✨

shutdown_menu β€” destroys a menu player object that init_menu() handed you, and tells you what the user actually picked. Allegro game programming library, no cap. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int shutdown_menu(MENU_PLAYER *player);

🌸 DESCRIPTION 🌸

So here's the tea, bestie: shutdown_menu() destroys a menu player object β€” the kind that init_menu() gave you β€” and it also returns the index of the menu item that was selected. πŸ‘‘

If the menu got cancelled instead? You get -1. That's it. That's the whole vibe. 🫢

And like, if you're sitting there thinking "wait, this feels familiar" β€” you're so right, because this return value is the same as the return value from do_menu(). literally identical energy. no cap. 😭


πŸ”₯ SEE ALSO πŸ”₯

  • init_menu(3) β€” where the menu player object comes from in the first place 🌈
  • update_menu(3) β€” the one doing the actual updating while you're in there ⭐

and that's the whole page, bestie, we ate and left no crumbs πŸ’œ

this has been Allegro, version 4.4.3 β€” k bye, go destroy some menu players responsibly πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from