Detect when in system menu...
I have an addon I want to ignore callbacks when the game's system menu is open (the one when you hit Escape, where you log off).
I was going to set a boolean when in the menu, but I need to be able to reliable check specifically when the main system menu is open, and when it is closed in order to toggle it. I was looking through SCENE_MANAGER but so far I am not finding it... |
i use something like this in one of my addonds. maybe it helps:
Lua Code:
|
Quote:
Code:
if SCENE_MANAGER:IsShowing("gameMenuInGame") == false then |
If you ONLY need to detect if someone got the main menu opened (the one at the left if you press ESC) I think you need to do it like you did with the explicit check for the scene / or a fragment.
Lua Code:
If you want to detect if ANY menu was opened (e.g. also if you open the inventory and the top bar menu is shown) you'd need to register a callback function to the HUD_SCENE and/or HUD_UI_SCENE 's "StateChange" like described here: https://wiki.esoui.com/Scene_Manager:_On_scene_change |
All times are GMT -6. The time now is 08:20 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI