Difference between revisions of "Dialog (MenuMate)"
imported>Speedo (→Buttons: updated) |
imported>Speedo (→Example: updated) |
||
Line 31: | Line 31: | ||
<pre> | <pre> | ||
<mainmenu> | <mainmenu resetonlink="0"> | ||
<text format="Greetings %n!%rYour balance is %.0f, what do you wish to do?"> | <text format="Greetings %n!%rYour balance is %.0f, what do you wish to do?"> | ||
<param name="playerRef"/> | <param name="playerRef"/> |
Latest revision as of 12:09, 17 December 2008
A component of MenuMate.
The dialog element defines a single screen which is displayed to the player.
Makeup[edit | edit source]
Name[edit | edit source]
The name of each dialog element should match the name attribute of a dialog defintion within the menu declaration.
Text[edit | edit source]
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[edit | edit source]
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[edit | edit source]
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[edit | edit source]
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[edit | edit source]
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>