al_remove_menu_item(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸŽ€ NAME πŸŽ€

okay so this page is al_remove_menu_item(3), straight out of the Library Functions Manual, and it's all about the Allegro 5 API bestie πŸ’…

al_remove_menu_item β€” removes one item from a menu and destroys it. gone, bye, no cap ✨


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_native_dialog.h>

bool al_remove_menu_item(ALLEGRO_MENU *menu, int pos)

πŸ’– DESCRIPTION πŸ’–

So like, al_remove_menu_item removes the specified item from the menu and destroys it β€” not just unlinks it, not just hides it, destroys it πŸ”₯

And if that item contains a sub-menu? bestie, the sub-menu gets destroyed too 😭 the whole little family tree is coming down with it. Any references to it are invalidated. do not touch them after this, fr fr πŸ™ˆ

If you actually want to preserve that sub-menu, you have to make a copy first with al_clone_menu(3) β€” that's the move, okay? 🫢

⚠️ important vibe check: removing an item destroys it and any sub-menu inside it, and any references to it become invalidated. if you need the sub-menu later, clone it before you remove anything πŸ’€

This is safe to call on a menu that is currently being displayed β€” yes, even while it's literally on screen, she's fine with that πŸ‘‘

Returns true if an item was removed 🌟


⭐ SINCE ⭐

5.1.0 β€” iconic behavior since 5.1.0, periodt πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹


xoxo, source: Allegro reference manual πŸ’– β€” and the date? this copy didn't give me one, so that's all I have, bestie 🫢✨

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms