WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 130 to Rev 131
    Reverse comparison

Rev 130 → Rev 131

NeedyGreedy.lua
261,6 → 261,7
detachedTooltipOptions = {
name = L["Detached Tooltip"],
type = "group",
childGroups = "tab",
args = {
detachedTooltip = {
name = L["Detach Tooltip"],
326,6 → 327,42
width = "full",
},
 
detachedTooltipUIOptions = {
name = L["UI options"],
type = "group",
args = {
useTooltipDefaults = {
name = L["Default Style"],
desc = L["Use the default tooltip background and border style for detached tooltip"],
type = "toggle",
order = 200,
get = "GetUseTooltipDefault",
set = "SetUseTooltipDefault",
width = "full",
},
bgColor = {
name = L["Background Color"],
desc = L["Change the background color of the detached tooltip"],
type = "color",
order = 210,
get = "GetBackgroundColor",
set = "SetBackgroundColor",
hasAlpha = true,
disabled = function() return NeedyGreedy.db.profile.useTooltipDefaults end,
},
borderColor = {
name = L["Border Color"],
desc = L["Change the border color of the detached tooltip"],
type = "color",
order = 220,
get = "GetBorderColor",
set = "SetBorderColor",
hasAlpha = true,
disabled = function() return NeedyGreedy.db.profile.useTooltipDefaults end,
},
}
}
 
},
},
 
379,6 → 416,9
highlightWinnerChat = false,
highlightWinnerChatColor = {0, 1, 0, 1},
showLootMethod = false,
useTooltipDefaults = true,
bgColor = GameTooltip:GetBackdrop(),
borderColor = {GameTooltip:GetBackdropBorderColor()},
}
}
 
1557,8 → 1597,34
self:RefreshTooltip()
end
 
function NeedyGreedy:GetUseTooltipDefault(info)
return self.db.profile.useTooltipDefaults
end
 
function NeedyGreedy:SetUseTooltipDefault(info, useTooltipDefaults)
self.db.profile.useTooltipDefaults = useTooltipDefaults
self:RefreshTooltip()
end
 
function NeedyGreedy:GetBackgroundColor(info)
return unpack(self.db.profile.bgColor)
end
 
function NeedyGreedy:SetBackgroundColor(info, r, g, b, a)
self.db.profile.bgColor = {r, g, b, a}
self:RefreshTooltip()
end
 
function NeedyGreedy:GetBorderColor(info)
return unpack(self.db.profile.borderColor)
end
 
function NeedyGreedy:SetBorderColor(info, r, g, b, a)
self.db.profile.borderColor = {r, g, b, a}
self:RefreshTooltip()
end
 
 
-- QTip Frames
local LibQTip = LibStub('LibQTip-1.0')
local COL_MIN_WIDTH = 60
1642,6 → 1708,19
self.detachedTooltip = LibQTip:Acquire("NeedyGreedyReport", 1, "LEFT")
self.detachedTooltip:SetScale(self.db.profile.tooltipScale)
 
local r, g, b, a
if self.db.profile.useTooltipDefaults then
r, g, b, a = unpack(GameTooltip:GetBackdrop())
self.detachedTooltip:SetBackdropColor(r, g, b, a)
r, g, b, a = GameTooltip:GetBackdropBorderColor()
self.detachedTooltip:SetBackdropBorderColor(r, g, b, a)
else
r, g, b, a = unpack(self.db.profile.bgColor)
self.detachedTooltip:SetBackdropColor(r, g, b, a)
r, g, b, a = unpack(self.db.profile.borderColor)
self.detachedTooltip:SetBackdropBorderColor(r, g, b, a)
end
 
-- Add columns here because tooltip:Clear() preserves columns
for i = 1, self.db.profile.nItems do
self.detachedTooltip:AddColumn("LEFT")
Localization/enUS.lua
76,5 → 76,11
L["Chat options"] = true
L["Show Loot Method"] = true
L["Display the loot method as a databroker feed"] = true
L["Background Color"] = true
L["Change the background color of the detached tooltip"] = true
L["Default Style"] = true
L["Use the default tooltip background and border style for detached tooltip"] = true
L["Border Color"] = true
L["Change the border color of the detached tooltip"] = true
 
end