al_set_menu_item_caption(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… al_set_menu_item_caption

okay so bestie, welcome to the Allegro 5 API β€” this one lives in the allegro5 manual and it's genuinely one of the cutest little glow-up functions in the whole native dialog lineup ✨


🌸 NAME 🌸

al_set_menu_item_caption β€” she renames your menu items, no cap πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro_native_dialog.h>

void al_set_menu_item_caption(ALLEGRO_MENU *menu, int pos, const char *caption)

like. that's it. that's the whole vibe. three args and a dream 🫢


πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the tea: al_set_menu_item_caption updates the menu item caption with the new caption. That's the whole job, and she does it flawlessly πŸ’…

You hand her a menu, you tell her which pos you're talking about, and you give her the fresh caption you want the world to see. boom. rebranded. main character energy fr fr 🌈

⚠️ BUT. and this is the important part, don't skip it β€” this will invalidate any previous calls to al_get_menu_item_caption. so if you were holding onto a caption you grabbed earlier, that pointer is giving expired, not iconic 😭 go get it again.

⭐ SINCE ⭐

Available since 5.1.0 β€” she's been serving since the old days, a true veteran πŸ’œ


πŸŽ€ SEE ALSO πŸŽ€

  • al_get_menu_item_caption β€” the reader to this writer, the bestie to this bestie πŸ“

and that's the whole page, babe 🌸 this was pulled straight from the Allegro reference manual, and the page itself is al_set_menu_item_caption(3alleg5) β€” go forth and rename things, you've got this πŸ‘‘πŸ’–

πŸ“¦ where this page comes from