Dialog (MenuMate)

From the Oblivion ConstructionSet Wiki
Revision as of 12:09, 17 December 2008 by imported>Speedo (→‎Example: updated)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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.

Reset

If a dialog has more than 10 buttons, you may include an optional dialog attribute, resetonlink. If this attribute is non-zero, when a linkbutton in the dialog is pressed, the button diaply will be reset so that the first button is shown if the user comes back to this dialog later on. This attribute is ignored unless the dialog has more than 10 buttons and at least one of them is a linkbutton.

Example

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

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

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