al_insert_menu_item(3)
okay bestie, welcome to al_insert_menu_item(3) β thatβs the title, and it lives in the Library Functions Manual as part of the Allegro 5 API. Buckle up, weβre inserting menu items with main character energy. π
πΈ NAME πΈ
al_insert_menu_item β Allegro 5 API. The whole vibe is βinsert a menu item,β no cap. π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_native_dialog.h>
int al_insert_menu_item(ALLEGRO_MENU *parent, int pos, char const *title,
uint16_t id, int flags, ALLEGRO_BITMAP *icon, ALLEGRO_MENU *submenu)
π DESCRIPTION π
Inserts a menu item at the spot specified. See the introductory text for a detailed explanation of how the pos parameter is interpreted. π
The parent menu can be a popup menu or a regular menu. To underline one character in the title, prefix it with an ampersand. ποΈ
The flags can be any combination of:
ALLEGRO_MENU_ITEM_DISABLEDβ the item is βgrayed outβ and cannot be selected. πALLEGRO_MENU_ITEM_CHECKBOXβ the item is a check box. This flag can only be set at the time the menu is created. If a check box is clicked, it will automatically be toggled. βALLEGRO_MENU_ITEM_CHECKEDβ the item is checked. If set,ALLEGRO_MENU_ITEM_CHECKBOXwill automatically be set as well. βοΈ
The icon is not yet supported. π
The submenu parameter indicates that this item contains a child menu. The child menu must have previously been created with al_create_menu, and not be associated with any other menu. π§
Returns the index at which the item was inserted (which can be different than what is implied by pos), or -1 if there was an error. π₯
π SINCE π
5.1.0 β vintage but still iconic. π
π¦ SEE ALSO π¦
Cute sign-off time: source/version line is the Allegro reference manual, and the original footer didnβt list a separate date, so thereβs no date to report β no cap. Thatβs the page, 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