Difference between revisions of "MessageBox Tutorial/Centralized Decision Catching"
Jump to navigation
Jump to search
imported>Haama (New page: For 99.9% of your menus, you won't need to differentiate the decision catching: <pre> Elseif (Choosing == 1) If (Choice == -1) ;No choice yet Set Choice to GetButtonPressed ...) |
imported>Haama |
||
Line 24: | Line 24: | ||
if (Choice == 0) ;first choice, "25" in the example | if (Choice == 0) ;first choice, "25" in the example | ||
</pre> | </pre> | ||
*Editor's Note: This needs to be added to the [[MesssageBox Tutorial]] |
Revision as of 09:26, 30 June 2007
For 99.9% of your menus, you won't need to differentiate the decision catching:
Elseif (Choosing == 1) If (Choice == -1) ;No choice yet Set Choice to GetButtonPressed Return ... Elseif (Choosing == 2) If (Choice == -1) ;No choice yet Set Choice to GetButtonPressed Return ...
To reduce the lines used, and to centralize the decision catching, try this instead:
if (Choosing == 0) ... elseif (Choosing > 0) && (Choice == -1) Set Choice to GetButtonPressed Return ... elseif (Choosing == 2) if (Choice == 0) ;first choice, "Gold" in the example ... elseif (Choosing == 3) if (Choice == 0) ;first choice, "25" in the example
- Editor's Note: This needs to be added to the MesssageBox Tutorial