View Single Post
05/10/14, 08:22 AM   #1
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
Whats the proper way to hide a window when you enter into a dialog ?

I am trying to hide a window when i enter any form of dialog. Dialogs, as in menus by pressing esc, inventory, character and so forth.

I tried by setting the following drawlevels of my toplevelwindow to several different values, but it has no effect on entering/exiting dialogs. I am not 100% sure if that is the way to go either.
SetDrawLevel(0)
SetDrawLayer(0)
SetDrawTier(0)

I tried hooking into the following events and hide/show my window if layer 6 is popped/pushed
EVENT_ACTION_LAYER_PUSHED
EVENT_ACTION_LAYER_POPPED

this works. However when i do a reloadui or load into the game it stays hidden, while i set it explicitly to be shown in EVENT_ADD_ON_LOADED. I just can't figure out why it is doing this. I added some debug messages and it should show, but it doesn't.

If i disable the functionality in the EVENT_ACTION_LAYER_PUSHED and EVENT_ACTION_LAYER_POPPED then it just shows correct.

I assume there is an EVENT_ACTION_LAYER_PUSHED done somewhere, but it doesn't register if i add some debug messaging to it, most likely cause not everything is loaded @ reload/start

Anyone an idea how to solve this ?
  Reply With Quote