al_remove_menu_item(3)
π 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 π¦
al_append_menu_item(3)β when you wanna add an item insteadal_insert_menu_item(3)β when you wanna slide one in at a specific spotal_destroy_menu(3)β when the whole menu needs to go π
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