---
name: "do_menu"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/do_menu/3alleg4"
---

# do\_menu(3alleg4)

Displays an animates a popup menu. Allegro game programming library.

## NAME

do\_menu - Displays an animates a popup menu. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int do\_menu(MENU \*menu, int x, int y);**

## DESCRIPTION

Displays and animates a popup menu at the specified screen coordinates  (these will be adjusted if the menu does not entirely fit on the screen).  Returns the index of the menu item that was selected, or -1 if the menu  was cancelled. Note that the return value cannot indicate selection from  child menus, so you will have to use the callback functions if you want  multi-level menus.

## SEE ALSO

**d\_menu\_proc**(3alleg4), **active\_menu**(3alleg4), **gui\_menu\_draw\_menu**(3alleg4), **update\_menu**(3alleg4)
