al_popup_menu man page

al_popup_menu — Allegro 5 API

Synopsis

#include <allegro5/allegro_native_dialog.h>

bool al_popup_menu(ALLEGRO_MENU *popup, ALLEGRO_DISPLAY *display)

Description

Displays a context menu next to the mouse cursor. The menu must have been created with al_create_popup_menu(3). It generates events just like a regular display menu does. It is possible that the menu will be canceled without any selection being made.

The display parameter indicates which window the menu is associated with (when you process the menu click event), but does not actually affect where the menu is located on the screen.

Returns true if the context menu was displayed.

Since

5.1.0

See Also

al_create_popup_menu(3)

Info

Allegro reference manual