- 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:
ckknight
2008-03-16 16:22:48 +00:00
parent 05c436fca0
commit 472a057309
5 changed files with 722 additions and 12 deletions

View File

@ -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