al_set_menu_item_icon(3)

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

πŸ’… al_set_menu_item_icon(3) πŸ’…

okay so we're in the Library Functions Manual, bestie, and this is the Allegro 5 API page for giving a menu item an icon. very main character energy ✨


πŸŽ€ NAME πŸŽ€

al_set_menu_item_icon β€” the Allegro 5 API function that sets a menu item's icon, periodt πŸ’…


πŸ“œ SYNOPSIS πŸ“œ

copy this exactly, no cap:

#include <allegro5/allegro_native_dialog.h>

void al_set_menu_item_icon(ALLEGRO_MENU *menu, int pos, ALLEGRO_BITMAP *icon)

🌸 DESCRIPTION 🌸

okay so this one sets the icon for the specified menu item. iconic, literally.

but bestie, listen: the menu assumes ownership of the ALLEGRO_BITMAP and may invalidate the pointer, so you must clone it if you wish to continue using it. no cap, that part is important 😭

⚠️ ownership vibe check: the menu takes the bitmap, and that pointer can get invalidated. clone it if you still wanna keep using it. fr fr.

if a video bitmap is passed, it will automatically be converted to a memory bitmap, so it is preferable to pass a memory bitmap. highkey the move is a memory bitmap 🫢


⭐ SINCE ⭐

5.1.0 β€” she's been serving since 5.1.0, and that's that on that πŸŽ€


πŸ”₯ SEE ALSO πŸ”₯


πŸ’– okay that's the whole tea, bestie β€” source: Allegro reference manual, page: al_set_menu_item_icon(3), and the footer doesn't show a date, so no date to spill πŸŒˆπŸ’…

πŸ“¦ 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