View Single Post
04/16/14, 07:58 AM   #2
Vicster0
 
Vicster0's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 82
There are a few ways to acomplish this but what I see is most common is to register a function in your addon with the event manager to be ran when the action layer is pushed, then check that the inventory frame (or whicher you like) is show, and lastly show your control window. You can also do the same to hide the window when done using the action layer popped event.

Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("youraddonpusheventname", EVENT_ACTION_LAYER_PUSHED, YourAddonPushFunction)
  2.  
  3. EVENT_MANAGER:RegisterForEvent("youraddonpusheventname", EVENT_ACTION_LAYER_POPPED, YourAddonPopFunction)

Last edited by Vicster0 : 04/16/14 at 08:17 AM. Reason: Fixed a few logical things for clarification.
  Reply With Quote