Difference between revisions of "MmUpdate"

Jump to navigation Jump to search
30 bytes removed ,  11:58, 17 December 2008
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]].  When used, it should be called from a script which will run as often as possible, preferably every frame.
Updates a loaded menu.  Must be called from the same script which called [[mmLoadMenu]].   


This function is necessary to update two aspects of menus:
Every time you display a menu, you should call this function regularly, preferably every frame.  This is necessary for several reasons:
*Button scrollingA dialog which has more than 10 buttons '''must''' use mmUpdate to allow the player to scroll through the buttons.
*If another script or mod displays a MessageBox, it may overwrite the active dialog being shown my MenuMatemmUpdate will detect this and redisplay your active dialog.
*Counterbutton updating.  If any of your counterbuttons use key inversion, their state text will not update when the invert key is pressed unless mmUpdate is used.
*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 which needs to use mmUpdate will look something like the following example quest script example:
Generally, a script which displays a MenuMate menu should look something like:


<pre>
<pre>
Line 39: Line 40:
     endif
     endif
      
      
   elseif (mmGetStatus == 1)
   elseif (mmGetStatus >= 0)
     set displayStatus to 0
     set displayStatus to 0
     StopQuest MenuDisplayQuest
     StopQuest MenuDisplayQuest
Anonymous user

Navigation menu