Difference between revisions of "MenuData Struct - UI"

m
→‎Examples: copy-paste error on property name for ShaderdWorld
imported>Qazaaq
m (→‎Examples: copy-paste error on property name for ShaderdWorld)
 
(5 intermediate revisions by 2 users not shown)
Line 20: Line 20:
**'''Default Flags:''' 0x801849D
**'''Default Flags:''' 0x801849D
**<code>0x01</code> PauseGame: Pauses the game world behind the menu.
**<code>0x01</code> PauseGame: Pauses the game world behind the menu.
**<code>0x02</code> DoNotDeleteOnClose:  
**<code>0x02</code> DoNotDeleteOnClose: The menu instance will persist even after the menu is closed.
**<code>0x04</code> ShowCursor: Shows the mouse cursor.
**<code>0x04</code> ShowCursor: Shows the mouse cursor.
**<code>0x08</code> EnableMenuControl:  
**<code>0x08</code> EnableMenuControl: Allows the menu to receive and handle <code>ProcessUserEvent</code> in ActionScript.
**<code>0x20</code> ShaderdWorld:  
**<code>0x20</code> ShaderdWorld:  
**<code>0x40</code> Open:  
**<code>0x40</code> FlagOpen:  
**<code>0x800</code> DoNotPreventGameSave: Allows the game to be saved. Without this flag the save button is greyed out.
**<code>0x800</code> DoNotPreventGameSave: Allows the game to be saved. Without this flag the save button is greyed out while this menu is open.
**<code>0x8000</code> ApplyDropDownFilter:  
**<code>0x8000</code> ApplyDropDownFilter:  
**<code>0x400000</code> BlurBackground: Blurs the game world behind the menu.
**<code>0x400000</code> BlurBackground: Blurs the game world behind the menu.
*MovieFlags:  
*MovieFlags:  
**'''Default Flags:''' 3
**'''Default Flags:''' 3
**<code>1</code>
**<code>2</code>
*ExtendedFlags: These bit flags are implemented by F4SE.
*ExtendedFlags: These bit flags are implemented by F4SE.
**<code>1</code>
**<code>2</code>
**'''Default Flags:''' 3
**'''Default Flags:''' 3
**<code>1</code> InheritColors: Enables color scheme matching.
**<code>1</code> InheritColors: Enables color scheme matching.
Line 46: Line 50:
If (!IsMenuRegistered(MyCustomMenuName))
If (!IsMenuRegistered(MyCustomMenuName))
UI:MenuData data = new UI:MenuData
UI:MenuData data = new UI:MenuData
data.MenuFlags = PauseGame | DoNotPreventGameSave | BlurBackground
data.MenuFlags = FlagNone ; clears all the flags and adds these three
data.MenuFlags = Math.LogicalOr(data.MenuFlags, PauseGame)
data.MenuFlags = Math.LogicalOr(data.MenuFlags, DoNotPreventGameSave)
data.MenuFlags = Math.LogicalOr(data.MenuFlags, BlurBackground)
data.ExtendedFlags = FlagNone
data.ExtendedFlags = FlagNone
UI.RegisterCustomMenu(MyCustomMenuName, "My\Path\To\FileNameWithoutExtension", "root1", data)
UI.RegisterCustomMenu(MyCustomMenuName, "My\Path\To\FileNameWithoutExtension", "root1", data)
Line 52: Line 59:
EndEvent
EndEvent


; An example of menu flag definitions.
Group MenuFlags
Group MenuFlags
int Property FlagNone = 0x0 AutoReadOnly
int Property FlagNone = 0x0 AutoReadOnly
int Property PauseGame = 0x01 AutoReadOnly
int Property PauseGame = 0x01 AutoReadOnly
int Property DoNotDeleteOnClose = 0x02 AutoReadOnly
int Property ShowCursor = 0x04 AutoReadOnly
int Property EnableMenuControl = 0x08 AutoReadOnly
int Property ShaderdWorld = 0x20 AutoReadOnly
int Property FlagOpen = 0x40 AutoReadOnly
int Property DoNotPreventGameSave = 0x800 AutoReadOnly
int Property DoNotPreventGameSave = 0x800 AutoReadOnly
int Property ApplyDropDownFilter = 0x8000 AutoReadOnly
int Property BlurBackground = 0x400000 AutoReadOnly
int Property BlurBackground = 0x400000 AutoReadOnly
EndGroup
EndGroup
Line 61: Line 75:


== Notes ==
== 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.
*As of at least [[:Category:F4SE|F4SE]] v0.6.13, not all of the menu flags are known or what combinations may need to be used for some menu features.
*The ''MessageBoxMenu'' uses the combined menu flags of <code>0x8018499</code>.


== See Also ==
== See Also ==
*[[Menu]]
*[[User Interface]]
*[[UI Script]]
*[[UI Script]]
* [[RegisterCustomMenu - UI]]
*[[RegisterCustomMenu - UI]]




147

edits