Difference between revisions of "MenuData Struct - UI"
Jump to navigation
Jump to search
no edit summary
imported>Qazaaq (added details) |
imported>Qazaaq |
||
Line 1: | Line 1: | ||
'''Member of:''' [[UI Script]] | '''Member of:''' [[UI Script]] | ||
{{Template:Papyrus:RequiredF4SE|version=0.6.5}} | {{Template:Papyrus:RequiredF4SE|version=0.6.5}} | ||
The '''MenuData''' structure is used to register a custom menu. | |||
The values used will determine how the menu will be initialized when opened. | |||
This includes things like pausing the game, preventing the game from being saved, blurring the game, and more. | |||
== Syntax == | == Syntax == | ||
Line 38: | Line 39: | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Scriptname Example extends Quest | |||
string MyCustomMenuName = "MyCustomMenuName" const | |||
Event OnQuestInit() | |||
If (!IsMenuRegistered(MyCustomMenuName)) | |||
UI:MenuData data = new UI:MenuData | |||
data.MenuFlags = PauseGame | DoNotPreventGameSave | BlurBackground | |||
data.ExtendedFlags = FlagNone | |||
UI.RegisterCustomMenu(MyCustomMenuName, "My\Path\To\FileNameWithoutExtension", "root1", data) | |||
EndIf | |||
EndEvent | |||
Group MenuFlags | |||
int Property FlagNone = 0x0 AutoReadOnly | |||
int Property PauseGame = 0x01 AutoReadOnly | |||
int Property DoNotPreventGameSave = 0x800 AutoReadOnly | |||
int Property BlurBackground = 0x400000 AutoReadOnly | |||
EndGroup | |||
</source> | </source> | ||
== Notes == | |||
As of at least :[[Category:F4SE]] v0.6.13, not all of the menu flags are known or what combinations may need to be used for some menu features. | |||
== See Also == | == See Also == | ||
*[[UI Script]] | *[[UI Script]] | ||
* [[RegisterCustomMenu - UI]] | |||