WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/preview/Aloft/AloftFrame
    from Rev 1885 to Rev 1990
    Reverse comparison

Rev 1885 → Rev 1990

AloftFrame.lua
317,13 → 317,14
 
local layoutFrame = Aloft:AcquireLayoutFrame(aloftData)
if layoutFrame then
-- place the reference frame
layoutFrame:ClearAllPoints()
layoutFrame:SetPoint("CENTER", nameplateFrame, "CENTER", self.db.profile.offsetX, self.db.profile.offsetY)
 
-- size the reference frame
layoutFrame:SetWidth(self.db.profile.width)
layoutFrame:SetHeight(self.db.profile.height)
 
-- place the reference frame
layoutFrame:SetPoint("CENTER", nameplateFrame, "CENTER", self.db.profile.offsetX, self.db.profile.offsetY)
else
-- ChatFrame7:AddMessage("AloftFrame:SetupFrame(): nil layoutFrame " .. tostring(aloftData.name))
end
338,11 → 339,12
backdropFrame:SetAlpha(1)
backdropFrame:Hide()
 
backdropFrame:ClearAllPoints()
 
-- always place the backdrop frame relative to the nameplate frame
backdropFrame:SetWidth(self.db.profile.width + (2 * inset))
backdropFrame:SetHeight(self.db.profile.height + (2 * inset))
 
backdropFrame:ClearAllPoints()
backdropFrame:SetPoint("CENTER", nameplateFrame, "CENTER", self.db.profile.offsetX, self.db.profile.offsetY) -- NOTE: positionally coupling layoutFrame to backdropFrame seems to result in display artifacts
 
backdropTable.insets.left = inset
362,8 → 364,8
-- bgFile = [[Interface\AddOns\Forte_Core\Textures\Minimalist]], } )
 
backdropFrame:SetBackdrop(backdropTable)
backdropFrame:SetBackdropBorderColor(unpack(self.db.profile.borderColor))
self:ClearBackdropColor(aloftData)
-- backdropFrame:SetBackdropBorderColor(unpack(self.db.profile.borderColor))
-- self:ClearBackdropColor(aloftData)
-- ChatFrame7:AddMessage("AloftFrame:SetupFrame(): backdrop cleared")
 
--[[
489,9 → 491,29
.. "/" .. ("|c%02x%02x%02x%02xcolor|r"):format(floor(255*a), floor(255*r), floor(255*g), floor(255*b)))
]]
 
backdropFrame:SetBackdropColor(r, g, b, a)
backdropFrame:Show()
 
-- NOTE: really CRYPTIC frame-delay workaround for an apparent Blizzard problem; lots of time spent on this issue
--
-- what we apparently have to do here, to prevent graphic artifacts in the backdrop frame border, is set the backdrop frame
-- backdrop color to something bogus, wait a game frame (no show needed yet?!?), and then set the backdrop frame backdrop
-- color to what we actually want, and THEN show; needs a temporary table to pass the arguments, and the whole circus;
-- blech, i HATE this
--
-- NOTE: this weirdness was noticed by mousing over PC nameplates that evinced a malformed border, with class colors enabled,
-- which resets the backdrop frame backdrop color, and coincidentally also cleared the malformed border... hence the
-- redundant flipping of backdrop color on every nameplate when its backdrop color is set
--
-- TODO: arrange for this flipping to happen only on nameplates on which the frame border is visible? seems harmless, but would
-- save a little heap overhead
 
backdropFrame:SetBackdropColor(0, 0, 0, 0.1) -- set a bogus color (basically clears the default/residual color), non-transparent (to force a draw)
backdropFrame:SetBackdropBorderColor(0, 0, 0, 0.1) -- set a bogus color (basically clears the default/residual color), non-transparent (to force a draw)
-- backdropFrame:SetBackdropColor(r, g, b, a) -- we delay applying the actual color we want
backdropFrame:Show() -- show, just to make sure?
 
-- frame delay to set the real color and show; 2010/11/05 frame delay verified as required, flipping the color inline does not have any effect
self:ScheduleTimer(function(arg) AloftFrame:DoSetAtomicBackgroundColor(arg) end, 0.15, { backdropFrame = backdropFrame, r = r, g = g, b = b, a = a, }) -- a bit more than one frame
 
--[[
ChatFrame7:AddMessage("AloftFrame:SetAtomicBackgroundColor(): backdrop #regions " .. tostring(backdropFrame:GetNumRegions()))
local bdfR1, bdfR2, bdfR3, bdfR4, bdfR5, bdfR6, bdfR7, bdfR8, bdfR9 = backdropFrame:GetRegions()
516,12 → 538,42
end
end
 
function AloftFrame:DoSetAtomicBackgroundColor(arg)
local backdropFrame = arg.backdropFrame
backdropFrame:SetBackdropColor(arg.r, arg.g, arg.b, arg.a)
backdropFrame:SetBackdropBorderColor(unpack(self.db.profile.borderColor))
backdropFrame:Show()
-- NOTE: this show works here, apparently the nameplate backdrop does not need to be visible in order to goose the border graphics;
-- also seems to avoid flickering resulting from the malformed border showing for a frame and then the fixed border appearing
end
 
-----------------------------------------------------------------------------
 
--[[
function AloftFrame:DumpCoords(aloftData)
local nameplateFrame = aloftData.nameplateFrame
 
local nLeft = nameplateFrame:GetLeft()
local nRight = nameplateFrame:GetRight()
local nTop = nameplateFrame:GetTop()
local nBottom = nameplateFrame:GetBottom()
ChatFrame7:AddMessage("AloftFrame:DumpCoords(): nmplat " .. tostring(aloftData.name) .. "/" .. tostring(floor(nTop)) .. "/" .. tostring(floor(nLeft)) .. "/" .. tostring(floor(nBottom)) .. "/" .. tostring(floor(nRight)))
 
local layoutFrame = aloftData.layoutFrame
 
local lLeft = layoutFrame:GetLeft()
local lRight = layoutFrame:GetRight()
local lTop = layoutFrame:GetTop()
local lBottom = layoutFrame:GetBottom()
ChatFrame7:AddMessage("AloftFrame:DumpCoords(): layout " .. tostring(aloftData.name) .. "/" .. tostring(floor(lTop)) .. "/" .. tostring(floor(lLeft)) .. "/" .. tostring(floor(lBottom)) .. "/" .. tostring(floor(lRight)))
end
]]
 
function AloftFrame:OnNameplateShow(message, aloftData)
-- ChatFrame7:AddMessage("AloftFrame:OnNameplateShow(): " .. tostring(message))
self:DoNameplateShow(aloftData)
-- self:ScheduleTimer(function(aloftData) AloftFrame:DoNameplateShow(aloftData) end, 0.0, aloftData) -- next frame
-- self:DoNameplateShow(aloftData)
self:ScheduleTimer(function(aloftData) AloftFrame:DoNameplateShow(aloftData) end, 0.0, aloftData) -- next frame
-- self:ScheduleTimer(function(aloftData) AloftFrame:DumpCoords(aloftData) end, 0.3, aloftData)
end
 
function AloftFrame:OnNameplateHide(message, aloftData)