Dialog (MenuMate)

Revision as of 18:12, 6 December 2008 by imported>Speedo (→‎Text: updated)


A component of MenuMate.

The dialog element defines a single screen which is displayed to the player.

Makeup

Name

The name of each dialog element should match the name attribute of a dialog defintion within the menu declaration.

Text

Each dialog must contain a text element which defines the main text of the dialog. This contains a format attribute, which is a format string using OBSE format specifiers in the same manner as functions such as MessageBoxEx.

The text element may contain child param elements. Each one should contain a single name attribute for a variable to be used in the format string. See the main page for information about using variables.

Key Config Info

There are several macros which can be used in any text format string. When the text is processed, the macro will be replaced with the names of the keys that the user currently has defined to perform a particular action.

  • [SCROLLUPKEYS] - keys used to scroll up when a dialog contains more than 10 buttons.
  • [SCROLLDOWNKEYS] - keys used to scroll down in a dialog with more than 10 buttons.
  • [INVERTKEYS] - keys used to invert a counterbutton when held.

Buttons

See the Button page. Each dialog must contain one button element. There is no limit on the number of buttons that a dialog may contain, but if your dialog has more than 10 buttons, you must be sure to use mmUpdate in your script so that the user can scroll through and access all of the buttons.

Example

If we continue our bank example, our mainmenu dialog would look something like:

<mainmenu>
  <text format="Greetings %n!%rYour balance is %.0f, what do you wish to do?">
    <param name="playerRef"/>
    <param name="accountBalance"/>
  </text>

  <!-- buttons here -->
</mainmenu>