OnMenuOpenCloseEvent - ScriptObject
Revision as of 13:58, 24 October 2014 by imported>Headbomb
Member of: ScriptObject
Event called when menus are opened or closed - if this active magic effect/alias/form is registered for it.
This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.
Syntax
Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
Parameters
- asMenuName: Name of the menu opening / closing. E.g. "LockpickingMenu", "ContainerMenu", etc.
- abOpening: True if the menu is opening, false if the menu is closing
Example
Function SomeFunction()
RegisterForMenuOpenCloseEvent() ; Before we can use OnMenuOpenCloseEvent we must register.
EndFunction
Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
if (asMenuName== "LockpickingMenu")
if (abOpening)
Debug.Trace("Lockpicking menu is open!")
endif
endif
endEvent
Notes
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
- Valid menu names:
- BarterMenu
- BookMenu
- BSOverlayMenu
- CompanionMenu
- Console
- ConsoleNativeUIMenu
- ContainerMenu
- CookingMenu
- CreditsMenu
- CursorMenu
- DebugTextMenu
- DialogueMenu
- ExamineMenu
- FaderMenu
- FavoritesMenu
- GenericMenu
- GiftMenu
- HUDMenu
- InventoryMenu
- LevelUpMenu
- LoadingMenu
- LockpickingMenu
- LooksMenu
- MagicMenu
- MainMenu
- MessageBoxMenu
- MultiActivateMenu
- PauseMenu
- PipboyMenu
- PromptMenu
- QuantityMenu
- QuickContainerMenu
- ScopeMenu
- SitWaitMenu
- SleepWaitMenu
- SPECIALMenu
- StatsMenu
- SWFLoaderMenu
- TerminalHolotapeMenu
- TerminalMenu
- VATSMenu
- VignetteMenu
- WorkshopMenu
- Workshop_CaravanMenu