Thread Tools Display Modes
04/07/14, 12:27 AM   #1
Edda
 
Edda's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Detecting interface open

Hello there.

How to detect if 'any' of the interface layer is popped open ? I.e. inventory or team window or any other window including the 'esc' menu. Do I have to check for every one of it ? And which event(s) is that related to ?

I would like to fire an event if any UI window is open to hide my AddOn.

And by the way, is there a function to hide/show a control 'smoothly' - that is to have it fade to transparent or pop visible elegantly like you could do in JQuery ? Is this integrated or requires to code a function for that ?

A nice day to you - thanks for any feedback.

*edit* I forgot to ask : I want to detect if the player sheathed/unsheathed his/her weapon (~combat mode) to hide/unhide my UI. I checked the doc but didn't find anything so far.

Last edited by Edda : 04/07/14 at 12:53 AM. Reason: moar
  Reply With Quote
04/07/14, 02:29 AM   #2
Wukar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 27
I assume, every TopLevelControl has the function :IsHidden(), for example
lua Code:
  1. if (ZO_PlayerInventory:IsHidden() == false) then { doMyStuff } end
  Reply With Quote
04/07/14, 03:25 AM   #3
Edda
 
Edda's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Okay fine - where can I get a list of all the ZO_ top level controls ? I need to check if *any* is not hidden.

Thanks
  Reply With Quote
04/07/14, 03:31 AM   #4
vapakule
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
Thumbs up

Originally Posted by Edda View Post
ZO_ top level controls
You can find them here http://wiki.esoui.com/Raw_globals_dump

btw, does any one know is there any possibility to change Key Icon:
For example Key icon under cursor, when mouse over on NPC to interact with, and other key icons throw all UI? Thnaks

Last edited by vapakule : 04/07/14 at 03:37 AM. Reason: add. question
  Reply With Quote
04/07/14, 03:54 AM   #5
Edda
 
Edda's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Okay that's a big list :|

I will try to trigger some events that may return the names of the windows.

Thanks tho.
  Reply With Quote
04/07/14, 04:18 AM   #6
Kith
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 49
Originally Posted by Edda View Post
Okay that's a big list :|

I will try to trigger some events that may return the names of the windows.

Thanks tho.
An easier way to do this would be to download Zgoo http://www.esoui.com/downloads/info24-Zgoo.html and then once in-game, place the mouse cursor out in the world and type "/zgoo mouse". It should bring up the specifics of GuiRoot (the frame the whole UI is parented to), then you can go down to GetChildren() and expand it to see the list of TopLevel frames.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Detecting interface open


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off