Difference between revisions of "MmUpdate"
Jump to navigation
Jump to search
updated
imported>Speedo m |
imported>Speedo (updated) |
||
Line 5: | Line 5: | ||
mmGetStatus | mmGetStatus | ||
Updates a loaded menu. Must be called from the same script which called [[mmLoadMenu]]. | Updates a loaded menu. Must be called from the same script which called [[mmLoadMenu]]. | ||
This | Every time you display a menu, you should call this function regularly, preferably every frame. This is necessary for several reasons: | ||
* | *If another script or mod displays a MessageBox, it may overwrite the active dialog being shown my MenuMate. mmUpdate will detect this and redisplay your active dialog. | ||
* | *counterbuttons which may be inverted by key press will not have thier display updated properly if mmUpdate is not called | ||
*dialogs with more than 10 buttons can not work without mmUpdate | |||
==Example== | ==Example== | ||
Generally, a script which displays a menu | Generally, a script which displays a MenuMate menu should look something like: | ||
<pre> | <pre> | ||
Line 39: | Line 40: | ||
endif | endif | ||
elseif (mmGetStatus = | elseif (mmGetStatus >= 0) | ||
set displayStatus to 0 | set displayStatus to 0 | ||
StopQuest MenuDisplayQuest | StopQuest MenuDisplayQuest |