Originally Posted by Fyrakin
I use
Lua Code:
ZO_GameMenu_InGame:IsHidden()
to know when Menu is open.
|
If you just want to know if the game menu scene is active, you can also use:
Lua Code:
GAME_MENU_SCENE:IsShowing()
If you use this function or callback mentioned above depends on how you want to use it.
Callback is automatically fired every time when scene state is changed, so it is probably easier method how to show or hide your window:
lua Code:
GAME_MENU_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
yourWindow:SetHidden(true)
elseif newState == SCENE_HIDDEN then
yourWindow:SetHidden(false)
end
end)
But if you already have function which shows/hides window eg. some kind of OnUpdate handler, you might want to use function posted by Fyrakin.