Difference between revisions of "Options Menu"
Jump to navigation
Jump to search
no edit summary
imported>JustinOther m |
imported>Cdcooley |
||
Line 14: | Line 14: | ||
If akNewContainer == PlayerREF ; Only the player | If akNewContainer == PlayerREF ; Only the player | ||
Int iButton = OptionsMESG.Show() ; Shows your menu. iButton == -1 until input | Int iButton = OptionsMESG.Show() ; Shows your menu. iButton == -1 until input | ||
PlayerREF.RemoveItem(MenuARMO, 1, True) ; Silently remove token | |||
If iButton == 0 ; Mage | |||
Debug.Notification("Mage selected") | |||
ElseIf iButton == 1 ; Thief | |||
Debug.Notification("Thief selected") | |||
ElseIf iButton == 2 ; Warrior | |||
Debug.Notification("Warrior selected") | |||
EndIf | EndIf | ||
EndIf | EndIf | ||
Line 45: | Line 43: | ||
Function Menu(Bool abMenu = True, Int aiButton = 0) | Function Menu(Bool abMenu = True, Int aiButton = 0) | ||
While abMenu | While abMenu | ||
aiButton = MainMenuMESG.Show() ; Main Menu | |||
abMenu = False ; End the function | |||
If aiButton == 0 ; Breakfast | |||
aiButton = BreakfastMESG.Show() | |||
If aiButton == 0 ; Sweet Roll & Coffee | |||
ElseIf aiButton == 1 ; Pancakes, Bacon & Eggs | |||
ElseIf aiButton == 2 ; Chicken Fried Pony Steak | |||
EndIf | |||
ElseIf aiButton == 1 ; Lunch | |||
aiButton = LunchMESG.Show() | |||
If aiButton == 0 ; Glazed Turkey Sandwich | |||
ElseIf aiButton == 1 ; Grilled Ham Sandwich | |||
ElseIf aiButton == 2 ; Shredded Pony Sandwich | |||
EndIf | |||
ElseIf aiButton == 2 ; Dinner | |||
aiButton = DinnerMESG.Show() | |||
If aiButton == 0 ; Filet Mignon | |||
ElseIf aiButton == 1 ; Pony Fajitas | |||
ElseIf aiButton == 2 ; Lobster | |||
EndIf | EndIf | ||
EndIf | EndIf | ||
Line 92: | Line 88: | ||
Function Menu(Int aiMessage = 0, Int aiButton = 0, Bool abMenu = True) | Function Menu(Int aiMessage = 0, Int aiButton = 0, Bool abMenu = True) | ||
While abMenu | While abMenu | ||
If | If aiMessage == 0 | ||
aiButton = OptionsMenu00MESG.Show() | aiButton = OptionsMenu00MESG.Show() | ||
If aiButton == 0 | If aiButton == 0 | ||
Line 149: | Line 144: | ||
* Conditionalizing MessageBox buttons will not change their indices such that, for instance, button 9 will still execute the "Done" code in the last example even if buttons 0-8 are hidden. | * Conditionalizing MessageBox buttons will not change their indices such that, for instance, button 9 will still execute the "Done" code in the last example even if buttons 0-8 are hidden. | ||
* To learn how to assign user-created messageboxes as values to the message box properties defined in the above scripts, see [[Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions#Hooking_up_the_message_boxes_to_the_properties_in_the_script|the Papyrus tutorial's page on Properties and Functions]] | * To learn how to assign user-created messageboxes as values to the message box properties defined in the above scripts, see [[Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions#Hooking_up_the_message_boxes_to_the_properties_in_the_script|the Papyrus tutorial's page on Properties and Functions]] | ||
*If the Message property isn't filled in the CK the Show() will always return a 0. | |||
*If the Message is a Notification (without buttons) instead of a Message Box the Show() will return a -1. | |||
== See Also == | == See Also == | ||
[[Show - Message]] | [[Show - Message]] |