UI (functions)/Custom Menus

From PMDOWiki

SetCustomMenu

Displays a custom menu of the caller's choice.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.

BeginMultiPageMenu

Marks the start of a multi-paged choice menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned.

Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.

Arguments

Name Type Technical Type Purpose
x Integer System.Int32 X position of the menu
y Integer System.Int32 Y position of the menu
width Integer System.Int32 Width of the menu
title String System.String The title of the page
choices Table NLua.LuaTable A table of choices. Each choice can be either a string, or { string, bool } representing the text and enabled status.
linesPerPage Integer System.Int32 Number of choices per page
defaultChoice Object System.Object The cursor starts on this choice.
cancelChoice Object System.Object This choice is chosen if the player presses the cancel button.