Difference between revisions of "MenuData Struct - UI"
Jump to navigation
Jump to search
Scrivener07 (talk | contribs) (Edited incorrect adder on menu flags. Use a bitwise OR, which despite it's name, uses the Math.LogicalOr function.) |
Scrivener07 (talk | contribs) m (→Examples: copy-paste error on property name for ShaderdWorld) |
||
Line 66: | Line 66: | ||
int Property ShowCursor = 0x04 AutoReadOnly | int Property ShowCursor = 0x04 AutoReadOnly | ||
int Property EnableMenuControl = 0x08 AutoReadOnly | int Property EnableMenuControl = 0x08 AutoReadOnly | ||
int Property | int Property ShaderdWorld = 0x20 AutoReadOnly | ||
int Property FlagOpen = 0x40 AutoReadOnly | int Property FlagOpen = 0x40 AutoReadOnly | ||
int Property DoNotPreventGameSave = 0x800 AutoReadOnly | int Property DoNotPreventGameSave = 0x800 AutoReadOnly |
Latest revision as of 21:15, 3 April 2024
Member of: UI Script
Requires F4SE version 0.6.5 or higher.
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[edit | edit source]
Struct MenuData
int MenuFlags = 0x801849D
int MovieFlags = 3
int ExtendedFlags = 3
int Depth = 6
EndStruct
Members[edit | edit source]
- MenuFlags:
- Default Flags: 0x801849D
0x01
PauseGame: Pauses the game world behind the menu.0x02
DoNotDeleteOnClose: The menu instance will persist even after the menu is closed.0x04
ShowCursor: Shows the mouse cursor.0x08
EnableMenuControl: Allows the menu to receive and handleProcessUserEvent
in ActionScript.0x20
ShaderdWorld:0x40
FlagOpen:0x800
DoNotPreventGameSave: Allows the game to be saved. Without this flag the save button is greyed out while this menu is open.0x8000
ApplyDropDownFilter:0x400000
BlurBackground: Blurs the game world behind the menu.
- MovieFlags:
- Default Flags: 3
1
2
- ExtendedFlags: These bit flags are implemented by F4SE.
1
2
- Default Flags: 3
1
InheritColors: Enables color scheme matching.2
CheckForGamepad: Auto-detects any connected gamepad and disables the mouse cursor.
- Depth:
- Default: 6
Examples[edit | edit source]
Scriptname Example extends Quest
string MyCustomMenuName = "MyCustomMenuName" const
Event OnQuestInit()
If (!IsMenuRegistered(MyCustomMenuName))
UI:MenuData data = new UI:MenuData
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
UI.RegisterCustomMenu(MyCustomMenuName, "My\Path\To\FileNameWithoutExtension", "root1", data)
EndIf
EndEvent
; An example of menu flag definitions.
Group MenuFlags
int Property FlagNone = 0x0 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 ApplyDropDownFilter = 0x8000 AutoReadOnly
int Property BlurBackground = 0x400000 AutoReadOnly
EndGroup
Notes[edit | edit source]
- As of at least 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
0x8018499
.