Check for Esc press
Does anyone have any clever tricks for detecting this? I'm using EVENT_GAME_CAMERA_UI_MODE_CHANGED as a catch all, but I was hoping that since Esc is a special system-only key that it'd have some sort of additional detection.
|
Where, when, why?
You have RegisterTopLevel to handle ESC, EditBox has an event "OnEscape". And pressing ESC can cause GAME_MENU_SCENE gets shown. |
The goal was to make all of the windows of the addon close when Esc is pressed.
|
In this case my first approach would be:
SCENE_MANAGER:RegisterTopLevel(topLevel, locksUIMode) Like in AI Research Grid. |
One of my UIs I want to ensure the close of is for blueprints, so I did it like so:
SCENE_MANAGER:RegisterTopLevel(CraftStoreFixed_Blueprint_Window, false) This does close it, but it will not let Esc clear cursor mode anymore. I'm not sure what I'm doing incorrectly. |
Add this to the function that fires when the scene pops:
SCENE_MANAGER:ToggleTopLevel(CraftStoreFixed_Blueprint_Window) From /internalingame/scenes/internalingamescenemanager.lua.html: Code:
function ZO_InternalIngameSceneManager:ToggleTopLevel(topLevel) |
In order to HideTopLevel you have to RegisterTopLevel (it seems; which makes sense), but if you register it, it breaks Esc being able to get you out of mouse mode. I'm a little confused here.
|
Quote:
|
I use register/toggle top level for the display/hiding of ESO Master Recipe List and never had a problem using escape to return to game mode.
|
All times are GMT -6. The time now is 10:41 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI