Difference between revisions of "OnMenuClose - Form"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
(Initial page creation)
 
imported>JustinOther
m (Wording)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
[[Category:Scripting]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Papyrus]]
'''SKSE Member of:''' [[UI Script]]
'''SKSE Member of:''' [[Form Script]]


{{SKSEFunction|1.06.00}}
{{SKSEFunction|1.06.00}}


Listens for closing of [[UI Script#Valid Menu Names|given menu(s)]] previously registered [[RegisterForMenu - Form|RegisterForMenu]]. (This function requires SKSE)
Listens for closing of [[UI Script#Valid Menu Names|given menu(s)]] previously registered via [[RegisterForMenu - Form|RegisterForMenu]]. (This function requires SKSE)


== Syntax ==
== Syntax ==
<source lang="papyrus">Event OnMenuOpen(String MenuName)</source>
<source lang="papyrus">Event OnMenuClose(String MenuName)</source>


== Parameters ==
== Parameters ==
Line 37: Line 37:
*[[RegisterForMenu - Form]]
*[[RegisterForMenu - Form]]
*[[UnregisterForMenu - Form]]
*[[UnregisterForMenu - Form]]
*[[UnregisterForAllMenus- Form]]
*[[UnregisterForAllMenus - Form]]
*[[OnMenuOpen - Form]]
*[[OnMenuOpen - Form]]

Latest revision as of 12:51, 11 October 2012

SKSE Member of: Form Script

Minimum required SKSE Version: 1.06.00

Listens for closing of given menu(s) previously registered via RegisterForMenu. (This function requires SKSE)

Syntax[edit | edit source]

Event OnMenuClose(String MenuName)

Parameters[edit | edit source]

  • MenuName: The menu(s) listened for.

Return Value[edit | edit source]

None

Examples[edit | edit source]

Event OnInit()
	RegisterForMenu("ContainerMenu")
EndEvent
 
Event OnMenuClose(String MenuName)
	Debug.Trace("A registered menu has closed.")
	If MenuName == "ContainerMenu"
		Debug.Trace("ContainerMenu has been registered and has closed.")
	EndIf
EndEvent

Notes[edit | edit source]

  • If multiple menus are registered, you'll want to differentiate in the corresponding event body as shown in the example. If only one menu is to be registered, no such differentiation is necessary.

See Also[edit | edit source]