Background for Skyrim SE
Member of the Form script
eventOnMenuOpen(stringmenuName)

Description

Wiki Description

Listens for opening of UI previously registered via Form.RegisterForMenu(...). (This function requires SKSE)


Caveats

CK Wiki - 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.

Parameters

stringmenuName

CK Wiki Description

The UI listened for.


Examples

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

Auto-Generated Example

Scriptname MyCoolScript extends Form

event OnMenuOpen(string menuName)
    Debug.trace("Event received - OnMenuOpen: menuName = " + menuName)
endEvent

Related Pages


Additional References

View this event’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.