View Single Post
08/20/17, 02:31 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
I think there is a fragment inside the inventory scene which tells you that the quickslot is active.
If you register a callback funciton to this fragment's (if it exists) onStateChange function (like scenes provide too) you could be able to solve your problem.

Check the esoui source code and search for inventory and inside the lua files for quickslot (or the other way around).
http://www.esoui.com/downloads/info1...ourcecode.html

https://github.com/esoui/esoui/tree/master/esoui

Edit:
Found a quickslot framgent:
https://github.com/esoui/esoui/searc...fragment&type=

-

You need tor egister a callback function to:
Lua Code:
  1. QUICKSLOT_FRAGMENT:RegisterCallback("StateChange",  function(oldState, newState)
  2. -[[ possible states are:
  3.                 SCENE_FRAGMENT_SHOWN = "shown"
  4.                 SCENE_FRAGMENT_HIDDEN = "hidden"
  5.                 SCENE_FRAGMENT_SHOWING = "showing"
  6.                 SCENE_FRAGMENT_HIDING = "hiding"
  7.             ]]--
  8. if newState == SCENE_FRAGMENT_SHOWN then
  9.  --YourCotrol:SetHidden(false)
  10. elseif newState == SCENE_FRAGMENT_HIDING then
  11.  --YourCotrol:SetHidden(true)
  12. end
  13. end) -- function

Be sure to check direct scene changes from mail send to inventory (or the other way around by using a keaybind!) as sometimes the scenes and fragment callback functions will not be called properly then. Maybe you need to check this somehow via scene changes and hide your control again then.

Last edited by Baertram : 08/20/17 at 02:38 PM.
  Reply With Quote