mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 21:41:53 -05:00
- If the mouseover unit doesn't exist, prevent any updates to related fontstrings, so that fadeouts of tooltips and the like work properly
- use the boolean type instead of string;nil - add Characteristics module.
This commit is contained in:
@ -206,6 +206,7 @@ end)
|
||||
local fsToKwargs = DogTag.fsToKwargs
|
||||
local fsToNSList = DogTag.fsToNSList
|
||||
local fsNeedUpdate = DogTag.fsNeedUpdate
|
||||
local fsNeedQuickUpdate = DogTag.fsNeedQuickUpdate
|
||||
local unpackNamespaceList = DogTag.unpackNamespaceList
|
||||
|
||||
local nsListHasUnit = setmetatable({}, { __index = function(self, key)
|
||||
@ -221,8 +222,9 @@ end })
|
||||
|
||||
local nextUpdateWackyUnitsTime = 0
|
||||
DogTag:AddTimerHandler(function(num, currentTime)
|
||||
if inMouseover and not UnitExists("mouseover") then
|
||||
inMouseover = false
|
||||
local exists = not not UnitExists("mouseover")
|
||||
if inMouseover ~= exists then
|
||||
inMouseover = exists
|
||||
DogTag:FireEvent("UnitChanged", "mouseover")
|
||||
end
|
||||
if currentTime >= nextUpdateWackyUnitsTime then
|
||||
@ -239,6 +241,21 @@ DogTag:AddTimerHandler(function(num, currentTime)
|
||||
end
|
||||
end)
|
||||
|
||||
DogTag:AddTimerHandler(function(num, currentTime)
|
||||
local exists = not not UnitExists("mouseover")
|
||||
if not exists then
|
||||
for fs, nsList in pairs(fsToNSList) do
|
||||
if nsListHasUnit[nsList] then
|
||||
local kwargs = fsToKwargs[fs]
|
||||
if kwargs and kwargs["unit"] == "mouseover" then
|
||||
fsNeedUpdate[fs] = nil
|
||||
fsNeedQuickUpdate[fs] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end, 9)
|
||||
|
||||
DogTag:AddCompilationStep("Unit", "tagevents", function(ast, t, tag, tagData, kwargs, extraKwargs, compiledKwargs, events)
|
||||
if compiledKwargs["unit"] then
|
||||
events["UnitChanged#$unit"] = true
|
||||
|
Reference in New Issue
Block a user