WoWInterface SVN TipTop

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 104 to Rev 105
    Reverse comparison

Rev 104 → Rev 105

trunk/TipTop/tiptop.lua
268,11 → 268,12
end
end
 
local function BorderClassColor() --colors tip border
local function BorderClassColor() --colors tip border and adds class icon
local _,class = UnitClass("mouseover")
local level = UnitLevel("mouseover")
local isNPC = not UnitIsPlayer("mouseover")
if db.diffColor and level then --if coloring by difficulty
if db.classColor and class and UnitIsFriend("player", "mouseover") then --if class enabled, too, use that if unit is friendly
if db.classColor and class and UnitIsFriend("player", "mouseover") and ((isNPC and db.npcClassColor) or not isNPC) then --if class enabled, too, use that if unit is friendly
TipTop:SetBackdropBorderColor(color[class].r - .2, color[class].g - .2, color[class].b - .2, db.borderColor.a)
else --all else, color by difficulty
if level == -1 then --where a skull might show instead of a level # (account for bosses and elites being harder)
285,13 → 286,13
level = GetQuestDifficultyColor(level)
TipTop:SetBackdropBorderColor(level.r, level.g, level.b, db.borderColor.a)
end
elseif db.classColor and class then --if just coloring by class
elseif db.classColor and class and ((isNPC and db.npcClassColor) or not isNPC) then --if just coloring by class
TipTop:SetBackdropBorderColor(color[class].r - .2, color[class].g - .2, color[class].b - .2, db.borderColor.a)
else --default border color
local borderColor = db.borderColor
TipTop:SetBackdropBorderColor(borderColor.r, borderColor.g, borderColor.b, borderColor.a)
end
if db.classIcon and class then
if db.classIcon and class and ((isNPC and db.npcClassIcon) or not isNPC)then
local text = nil --reset text var to maybe, hopefully quell repeating icon issue...
text = GameTooltipTextLeft1:GetText()
if text then
trunk/TipTop/TipTop.toc
2,7 → 2,7
## Title: TipTop
## Author: Seerah
## Notes: Tooltip enhancement
## Version: 2.17
## Version: 2.18
## SavedVariables: TipTopDB
## SavedVariablesPerCharacter: TipTopPCDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
trunk/TipTop/TipTopOptions.lua
24,7 → 24,9
inset = 0,
diffColor = true,
classColor = true,
npcClassColor = true,
classIcon = false,
npcClassIcon = true,
classIconStyle = "Default UI",
guildRank = false,
itemColor = true,
579,6 → 581,17
end,
order = 7,
},
npcClassColor = {
name = "NPCs too",
desc = "If checked, the border of NPCs will also be colored by class.\n\nIf difficulty-colored is also checked, difficulty coloring has priority for hostile units.",
type = "toggle",
disabled = function() return not db.classColor end,
get = function() return db.npcClassColor end,
set = function()
db.npcClassColor = not db.npcClassColor
end,
order = 7.5,
},
diffColor = {
name = "Difficulty-colored borders",
desc = "If checked, the border is colored by level difficulty when mousing over a unit.\n\nIf class-colored is also checked, class coloring has priority for friendly units.",
601,8 → 614,8
},
},
},
riconopts = {
name = "Raid Icon",
iconopts = {
name = "Icons",
type = "group",
args = {
header4 = {
610,177 → 623,71
type = "header",
order = 1,
},
raidIconSize = {
name = "Raid icon size",
desc = "Width and height of the raid icon on the tooltip",
type = "range",
min = 8,
max = 32,
step = 1,
get = function() return db.raidIconSize end,
set = function(_, raidIconSize)
db.raidIconSize = raidIconSize
TipTop:RaidIcon()
end,
cIconOpts = {
name = "Class Icon Settings",
type = "group",
inline = true,
order = 2,
},
raidIconPosition = {
name = "Raid icon position",
desc = "What side of the tip you would like the icon located at.",
type = "select",
values = positions,
get = function()
for k, v in pairs(positions) do
if db.raidIconPosition == v then
return k
args = {
classIcon = {
name = "Display Class Icon",
desc = "Display a class icon next to the unit's name in the tooltip.",
type = "toggle",
get = function() return db.classIcon end,
set = function()
db.classIcon = not db.classIcon
end,
order = 1,
},
npcClassIcon = {
name = "NPCs too",
desc = "Display a class icon next to the unit's name in the tooltip for NPCs also.",
type = "toggle",
disabled = function() return not db.classIcon end,
get = function() return db.npcClassIcon end,
set = function()
db.npcClassIcon = not db.npcClassIcon
end,
order = 2,
},
classIconStyle = {
name = "Class Icon Style",
desc = "Select the style of class icon displayed.",
type = "select",
disabled = function() return not db.classIcon end,
values = classIconStyles,
get = function()
for k, v in pairs(classIconStyles) do
if db.classIconStyle == v then
return k
end
end
end
end,
set = function(_, raidIconPosition)
db.raidIconPosition = positions[raidIconPosition]
TipTop:RaidIcon()
end,
order = 3,
end,
set = function(_, style)
db.classIconStyle = classIconStyles[style]
end,
order = 3,
},
},
},
empty1 = {
name = " ",
type = "description",
order = 4,
},
raidIconX = {
name = "X Offset",
desc = "Offsets from the icon's position left/right",
type = "input",
get = function() return db.raidIconX end,
set = function(_,raidIconX)
if raidIconX == nil or raidIconX == "" then
raidIconX = "0"
end
db.raidIconX = raidIconX
TipTop:RaidIcon()
end,
order = 5,
},
raidIconY = {
name = "Y Offset",
desc = "Offsets from the icon's position up/down",
type = "input",
get = function() return db.raidIconY end,
set = function(_,raidIconY)
if raidIconY == nil or raidIconY == "" then
raidIconY = "0"
end
db.raidIconY = raidIconY
TipTop:RaidIcon()
end,
order = 6,
},
},
},
extraopts = {
name = "Extra Stuff",
type = "group",
args = {
header6 = {
name = "",
type = "header",
order = 37,
},
showTargetText = {
name = "Target text",
desc = "Whether you wish to view the mouseover unit's target in the tooltip",
type = "toggle",
get = function() return db.showTargetText end,
set = function()
db.showTargetText = not db.showTargetText
end,
order = 38,
},
you = {
name = "Target emphasis",
desc = "When checked, if the mouseover unit's target is you, it will be displayed as |c00E30016<<YOU>>|r.",
type = "toggle",
disabled = function() return not db.showTargetText end,
get = function() return db.you end,
set = function()
db.you = not db.you
end,
order = 39,
},
elite = {
name = "Elite graphic",
desc = "Will display the gold and silver elite dragons for elites and rare elites at the top left of the tooltip.",
type = "toggle",
get = function() return db.elite end,
set = function()
db.elite = not db.elite
end,
order = 40,
},
showTalentText = {
name = "Talent text",
desc = "Whether you wish to view the mouseover unit's talent specialization in the tooltip",
type = "toggle",
get = function() return db.showTalentText end,
set = function()
db.showTalentText = not db.showTalentText
end,
order = 41,
},
classIcon = {
name = "Class Icon",
desc = "Display a class icon next to the unit's name in the tooltip.",
type = "toggle",
get = function() return db.classIcon end,
set = function()
db.classIcon = not db.classIcon
end,
order = 42,
},
classIconStyle = {
name = "Class Icon Style",
desc = "Select the style of class icon displayed.",
type = "select",
values = classIconStyles,
get = function()
for k, v in pairs(classIconStyles) do
if db.classIconStyle == v then
return k
end
end
end,
set = function(_, style)
db.classIconStyle = classIconStyles[style]
end,
order = 42.5,
},
guildRank = {
name = "Guild Rank",
desc = "Display the unit's rank next to the guild name in the tooltip.",
type = "toggle",
get = function() return db.guildRank end,
set = function()
db.guildRank = not db.guildRank
end,
order = 43,
},
factionIcon = {
name = "Faction Icon",
desc = "Display the faction icon for player controlled characters.",
type = "toggle",
get = function() return db.factionIcon end,
set = function()
db.factionIcon = not db.factionIcon
TipTop:FactionIcon()
end,
order = 44,
},
fIconOpts = {
name = "Faction Icon Settings",
type = "group",
inline = true,
order = 45,
order = 3,
args = {
factionIcon = {
name = "Display Faction Icon",
desc = "Display the faction icon for player controlled characters.",
type = "toggle",
width = "full",
get = function() return db.factionIcon end,
set = function()
db.factionIcon = not db.factionIcon
TipTop:FactionIcon()
end,
order = 1,
},
factionIconSize = {
name = "Faction icon size",
desc = "Width and height of the faction icon on the tooltip",
794,7 → 701,7
db.factionIconSize = factionIconSize
TipTop:FactionIcon()
end,
order = 1,
order = 2,
},
factionIconPosition = {
name = "Faction icon position",
813,7 → 720,7
db.factionIconPosition = positions[factionIconPosition]
TipTop:FactionIcon()
end,
order = 2,
order = 3,
},
factionIconX = {
name = "X Offset",
829,7 → 736,7
db.factionIconX = factionIconX
TipTop:FactionIcon()
end,
order = 3,
order = 4,
},
factionIconY = {
name = "Y Offset",
845,12 → 752,144
db.factionIconY = factionIconY
TipTop:FactionIcon()
end,
order = 5,
},
},
},
rIconOpts = {
name = "Raid Icon Settings",
type = "group",
inline = true,
order = 4,
args = {
raidIconSize = {
name = "Raid icon size",
desc = "Width and height of the raid icon on the tooltip",
type = "range",
min = 8,
max = 32,
step = 1,
get = function() return db.raidIconSize end,
set = function(_, raidIconSize)
db.raidIconSize = raidIconSize
TipTop:RaidIcon()
end,
order = 1,
},
raidIconPosition = {
name = "Raid icon position",
desc = "What side of the tip you would like the icon located at.",
type = "select",
values = positions,
get = function()
for k, v in pairs(positions) do
if db.raidIconPosition == v then
return k
end
end
end,
set = function(_, raidIconPosition)
db.raidIconPosition = positions[raidIconPosition]
TipTop:RaidIcon()
end,
order = 2,
},
raidIconX = {
name = "X Offset",
desc = "Offsets from the icon's position left/right",
type = "input",
width = "half",
get = function() return db.raidIconX end,
set = function(_,raidIconX)
if raidIconX == nil or raidIconX == "" then
raidIconX = "0"
end
db.raidIconX = raidIconX
TipTop:RaidIcon()
end,
order = 3,
},
raidIconY = {
name = "Y Offset",
desc = "Offsets from the icon's position up/down",
type = "input",
width = "half",
get = function() return db.raidIconY end,
set = function(_,raidIconY)
if raidIconY == nil or raidIconY == "" then
raidIconY = "0"
end
db.raidIconY = raidIconY
TipTop:RaidIcon()
end,
order = 4,
},
},
},
},
},
extraopts = {
name = "Extra Stuff",
type = "group",
args = {
header6 = {
name = "",
type = "header",
order = 37,
},
showTargetText = {
name = "Target text",
desc = "Whether you wish to view the mouseover unit's target in the tooltip",
type = "toggle",
get = function() return db.showTargetText end,
set = function()
db.showTargetText = not db.showTargetText
end,
order = 38,
},
you = {
name = "Target emphasis",
desc = "When checked, if the mouseover unit's target is you, it will be displayed as |c00E30016<<YOU>>|r.",
type = "toggle",
disabled = function() return not db.showTargetText end,
get = function() return db.you end,
set = function()
db.you = not db.you
end,
order = 39,
},
showTalentText = {
name = "Talent text",
desc = "Whether you wish to view the mouseover unit's talent specialization in the tooltip",
type = "toggle",
get = function() return db.showTalentText end,
set = function()
db.showTalentText = not db.showTalentText
end,
order = 40,
},
elite = {
name = "Elite graphic",
desc = "Will display the gold and silver elite dragons for elites and rare elites at the top left of the tooltip.",
type = "toggle",
get = function() return db.elite end,
set = function()
db.elite = not db.elite
end,
order = 44,
},
guildRank = {
name = "Guild Rank",
desc = "Display the unit's rank next to the guild name in the tooltip.",
type = "toggle",
get = function() return db.guildRank end,
set = function()
db.guildRank = not db.guildRank
end,
order = 45,
},
},
},
profile = {
name = "Profile",
type = "group",
918,7 → 957,7
TipTop.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "TipTop", nil, "general")
TipTop.optionsFrame.baropts = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Health Bar", "TipTop", "baropts")
TipTop.optionsFrame.borderopts = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Borders", "TipTop", "borderopts")
TipTop.optionsFrame.riconopts = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Raid Icon", "TipTop", "riconopts")
TipTop.optionsFrame.iconopts = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Icons", "TipTop", "iconopts")
TipTop.optionsFrame.extraopts = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Extra Stuff", "TipTop", "extraopts")
TipTop.optionsFrame.profile = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("TipTop", "Profile", "TipTop", "profile")