Mod:Creation Kit/MenuData Struct - UI

Member of: Mod:Creation Kit/UI Script

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
Struct MenuData int MenuFlags = 0x801849D int MovieFlags = 3 int ExtendedFlags = 3 int Depth = 6 EndStruct

Members

 * MenuFlags:
 * Default Flags: 0x801849D
 * PauseGame: Pauses the game world behind the menu.
 * DoNotDeleteOnClose:
 * ShowCursor: Shows the mouse cursor.
 * EnableMenuControl:
 * ShaderdWorld:
 * Open:
 * DoNotPreventGameSave: Allows the game to be saved. Without this flag the save button is greyed out.
 * ApplyDropDownFilter:
 * BlurBackground: Blurs the game world behind the menu.
 * MovieFlags:
 * Default Flags: 3
 * ExtendedFlags: These bit flags are implemented by F4SE.
 * Default Flags: 3
 * InheritColors: Enables color scheme matching.
 * CheckForGamepad: Auto-detects any connected gamepad and disables the mouse cursor.
 * Depth:
 * Default: 6
 * InheritColors: Enables color scheme matching.
 * CheckForGamepad: Auto-detects any connected gamepad and disables the mouse cursor.
 * Depth:
 * Default: 6

Examples
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