UI (functions)/Choice Menu

From PMDOWiki
Revision as of 03:47, 18 January 2026 by Imbion (talk | contribs) (Created page with "== UI:SetChoiceLoc(System.Int32,System.Int32) == Sets the position of the choices for a question dialog. === Arguments === * <code>x</code>: The X position * <code>y</code>: The Y position == UI:ResetChoiceLoc == Sets the position of the choices for a question dialog back to default. == UI:ChoiceMenuYesNo(System.String,System.Boolean,NLua.LuaTable) == Ask a question answered by yes or no via character dialogue to the player. UI:WaitForChoice() must be called...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI:SetChoiceLoc(System.Int32,System.Int32)

Sets the position of the choices for a question dialog.


Arguments

  • x: The X position
  • y: The Y position

UI:ResetChoiceLoc

Sets the position of the choices for a question dialog back to default.


UI:ChoiceMenuYesNo(System.String,System.Boolean,NLua.LuaTable)

Ask a question answered by yes or no via character dialogue to the player. 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.

The Yes/No menu returns 1 for yes, and 0 for no.


Arguments

  • message: Question to be asked to the user.
  • bdefaultstono: Whether the cursor starts on no by default
  • callbacks: The Lua table of callbacks for the textbox to call.