Difference between revisions of "OnMenuClose - Form"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
m (UI Script Δ Form Script)
imported>JustinOther
m (→‎Syntax: Copypasta mishap when creating page)
Line 9: Line 9:


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


== Parameters ==
== Parameters ==

Revision as of 12:14, 11 October 2012

SKSE Member of: Form Script

Minimum required SKSE Version: 1.06.00

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

Syntax

Event OnMenuClose(String MenuName)

Parameters

  • MenuName: The menu(s) listened for.

Return Value

None

Examples

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

  • 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