Commit 5280f72f authored by Merathilis's avatar Merathilis
Browse files

Options for the Role in the Tooltip.

parent a0780588
......@@ -361,19 +361,21 @@ function TT:GameTooltip_OnTooltipSetUnit(tt)
levelLine:SetFormattedText("|cff%02x%02x%02x%s|r %s |c%s%s|r", diffColor.r * 255, diffColor.g * 255, diffColor.b * 255, level > 0 and level or "??", race or '', color.colorStr, localeClass)
end
if IsInGroup() and (UnitInParty(unit) or UnitInRaid(unit)) then
local role, r, g, b = UnitGroupRolesAssigned(unit), 1, 1, 1
if role == "HEALER" then
role, r, g, b = L["Healer"], 0, 1, .59
elseif role == "TANK" then
role, r, g, b = L["Tank"], .16, .31, .61
elseif role == "DAMAGER" then
role, r, g, b = L["DPS"], .77, .12, .24
else
role = LOCALE.NONE
end
if E.db.tooltip.role then
if IsInGroup() and (UnitInParty(unit) or UnitInRaid(unit)) then
local role, r, g, b = UnitGroupRolesAssigned(unit), 1, 1, 1
if role == "HEALER" then
role, r, g, b = L["Healer"], 0, 1, .59
elseif role == "TANK" then
role, r, g, b = L["Tank"], .16, .31, .61
elseif role == "DAMAGER" then
role, r, g, b = L["DPS"], .77, .12, .24
else
role = LOCALE.NONE
end
GameTooltip:AddDoubleLine(ROLE, role, nil, nil, nil, r, g, b)
GameTooltip:AddDoubleLine(ROLE, role, nil, nil, nil, r, g, b)
end
end
--High CPU usage, restricting it to shift key down only.
......
......@@ -1035,6 +1035,7 @@ P['tooltip'] = {
['inspectInfo'] = true,
['itemCount'] = 'BAGS_ONLY',
['spellID'] = true,
['role'] = true,
['font'] = 'PT Sans Narrow',
['fontOutline'] = 'NONE',
['headerFontSize'] = 12,
......
......@@ -959,6 +959,7 @@ L["Display how many of a certain item you have in your possession."] = "显示
L["Display player titles."] = "显示玩家头衔"
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "当按住shift时展示该玩家的专精和装等,由于需要读取所以不会在指向某玩家时立即更新"
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "在鼠标提示中显示技能或物品的ID."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "公会等级"
L["Header Font Size"] = "标题名字大小"
L["Health Bar"] = "生命条"
......
......@@ -949,6 +949,7 @@ L["Display how many of a certain item you have in your possession."] = true
L["Display player titles."] = true
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = true
L["Display the spell or item ID when mousing over a spell or item tooltip."] = true
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = true
L["Header Font Size"] = true
L["Health Bar"] = true
......
......@@ -961,6 +961,7 @@ L["Display how many of a certain item you have in your possession."] = "Affiche
L["Display player titles."] = "Affiche le titre du joueur"
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "Affiche la spécialisation et le niveau d'équipement dans l'info-bulle, ceci peut ne pas être mis à jour immédiatement au premier survol de la souris sur l'unité."
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "Affiche le sort ou l'ID de l'objet dans une infobulle quand vous passez votre souris sur le sort ou l'objet."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "Rangs de la guilde"
L["Header Font Size"] = true
L["Health Bar"] = "Barre de vie"
......
......@@ -964,6 +964,7 @@ L["Display how many of a certain item you have in your possession."] = "Zeige wi
L["Display player titles."] = "Zeige Spielertitel."
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "Zeige die Spezialisierung und das Itemlevel des Spielers im Tooltip an, wird vielleicht nicht direkt aktualisiert"
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "Zeige die ID des Zaubers oder des Gegenstands an, wenn du mit der Maus über einen Zauber oder Fegenstand ziehst."
L["Display the unit role in the tooltip."] = "Zeigt die Rolle des Spielers im Tooltip an."
L["Guild Ranks"] = "Gildenränge"
L["Header Font Size"] = "Kopfzeile Schriftgröße"
L["Health Bar"] = "Lebensleiste"
......
......@@ -1009,6 +1009,7 @@ L["Display how many of a certain item you have in your possession."] = "현재
L["Display player titles."] = "이름에 칭호도 표시합니다."
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "Shift를 누른 상태로 유저에게 마우스를 대면 특성과 아이템레벨도 표시합니다. 표시하는데 시간이 조금 필요합니다."
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "아이템과 주문 툴팁에 각각의 ID를 표시합니다."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "길드 내 등급 표시"
L["Header Font Size"] = "제목 글씨 크기"
L["Health Bar"] = "생명력막대"
......
......@@ -961,6 +961,7 @@ L["Display how many of a certain item you have in your possession."] = "Mostra q
L["Display player titles."] = "Mostrar títulos dos jogadores."
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = true
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "Quando pairar o rato (mouse) sobre Itens ou Feitiços, mostra o ID destes na tooltip."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "Posto na Guilda"
L["Header Font Size"] = true
L["Health Bar"] = true
......
......@@ -960,6 +960,7 @@ L["Display how many of a certain item you have in your possession."] = "Отоб
L["Display player titles."] = "Отображать звания"
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "Показывать специализацию и уровень предметов в подсказке. Может обновиться не сразу после наведения курсора."
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "Отображать ID заклинания или предмета в подсказке при наведении мыши."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "Ранги гильдии"
L["Header Font Size"] = "Размер шрифта заголовка"
L["Health Bar"] = "Полоса здоровья"
......
......@@ -960,6 +960,7 @@ L["Display how many of a certain item you have in your possession."] = "Desplieg
L["Display player titles."] = "Mostrar los títulos de los jugadores"
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = true
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "Despliega el ID de hechizo u objeto cuando pasas el ratón sobre un hechizo o un ojbeto."
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "Rangos de Hermandad"
L["Header Font Size"] = true
L["Health Bar"] = true
......
......@@ -961,6 +961,7 @@ L["Display how many of a certain item you have in your possession."] = "顯示
L["Display player titles."] = "顯示玩家稱號."
L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."] = "當按住shift時展示該玩家的專精和裝等,由於需要讀取所以不會在指向某玩家時立即更新."
L["Display the spell or item ID when mousing over a spell or item tooltip."] = "滑鼠提示中顯示技能或物品的ID"
L["Display the unit role in the tooltip."] = true
L["Guild Ranks"] = "公會會階"
L["Header Font Size"] = "標題名字大小"
L["Health Bar"] = "生命條"
......
......@@ -101,8 +101,14 @@ E.Options.args.tooltip = {
name = L["Spell/Item IDs"],
desc = L["Display the spell or item ID when mousing over a spell or item tooltip."],
},
itemCount = {
role = {
order = 11,
type = 'toggle',
name = ROLE,
desc = L["Display the unit role in the tooltip."],
},
itemCount = {
order = 12,
type = 'select',
name = L["Item Count"],
desc = L["Display how many of a certain item you have in your possession."],
......@@ -114,14 +120,14 @@ E.Options.args.tooltip = {
},
},
colorAlpha = {
order = 12,
order = 13,
type = "range",
name = OPACITY,
isPercent = true,
min = 0, max = 1, step = 0.01,
},
fontGroup = {
order = 13,
order = 14,
type = "group",
guiInline = true,
name = L["Tooltip Font Settings"],
......@@ -180,7 +186,7 @@ E.Options.args.tooltip = {
},
},
factionColors = {
order = 14,
order = 15,
type = "group",
name = L["Custom Faction Colors"],
guiInline = true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment