/branches/preview/Aloft/AloftAlpha
local AloftAlpha = Aloft:NewModule("Alpha", Aloft, "AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0") |
AloftAlpha.dynamic = "AloftAlpha" |
local AloftVisibility = nil |
----------------------------------------------------------------------------- |
AloftAlpha.namespace = "alpha" |
function AloftAlpha:OnEnable() |
self:RegisterEvents() |
self:AdjustOptionValues() |
AloftVisibility = Aloft:GetModule("Visibility", true) |
end |
function AloftAlpha:OnDisable() |
end |
-- ChatFrame7:AddMessage("AloftAlpha:GetTargetNameplate(): seek " .. (targetName or "<NOTARGET>")) |
targetNameplate = Aloft:GetNameplateByAlpha(targetName, targetAlpha) |
local original = AloftVisibility and AloftVisibility:IsEnabled() and AloftVisibility.db and AloftVisibility.db.profile and AloftVisibility.db.profile.useAlpha and AloftVisibility.db.profile.target |
targetNameplate = Aloft:GetNameplateByAlpha(targetName, targetAlpha, original) |
end |
-- ChatFrame7:AddMessage("AloftAlpha:GetTargetNameplate(): " .. (targetNameplate and targetNameplate.name or "<NOTARGET>")) |
-- return aloftData and aloftData.alphaOverride |
end |
-- NOTE: the nameplate original alpha is reset by Blizzard on every frame |
local function setFrameAlpha(frame, alphaOverride, alpha) |
frame.originalAlpha = frame:GetAlpha() |
if alphaOverride ~= nil then |
frame:SetAlpha(alphaOverride) |
else |