unitframes: add new happiness indicator icons

This commit is contained in:
shagu
2020-08-27 11:54:31 +02:00
parent e32b5982ae
commit 422ca54ba2
9 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "tttarget", "txthpright", "none")
pfUI:UpdateConfig("unitframes", "tttarget", "overhealperc", "10")
pfUI:UpdateConfig("unitframes", "pet", "happinessicon", "0")
pfUI:UpdateConfig("unitframes", "pet", "happinessicon", "2")
pfUI:UpdateConfig("unitframes", "pet", "happinesssize", "12")
pfUI:UpdateConfig("unitframes", "pet", "width", "100")
pfUI:UpdateConfig("unitframes", "pet", "height", "14")
+3 -3
View File
@@ -1157,13 +1157,13 @@ function pfUI.uf:RefreshIndicators(unit)
if UnitIsVisible("pet") then
local happiness = GetPetHappiness()
if happiness == 1 then
unit.happinessIcon.texture:SetTexture(pfUI.media["img:sad"])
unit.happinessIcon.texture:SetTexture(pfUI.media["img:sad"..unit.config.happinessicon])
unit.happinessIcon.texture:SetVertexColor(1, 0, 0, 1)
elseif happiness == 2 then
unit.happinessIcon.texture:SetTexture(pfUI.media["img:neutral"])
unit.happinessIcon.texture:SetTexture(pfUI.media["img:neutral"..unit.config.happinessicon])
unit.happinessIcon.texture:SetVertexColor(1, 1, 0, 1)
else
unit.happinessIcon.texture:SetTexture(pfUI.media["img:happy"])
unit.happinessIcon.texture:SetTexture(pfUI.media["img:happy"..unit.config.happinessicon])
unit.happinessIcon.texture:SetVertexColor(0, 1, 0, 1)
end
unit.happinessIcon:Show()
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
View File
Binary file not shown.
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
View File
Binary file not shown.
+6 -1
View File
@@ -948,6 +948,11 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
"right:" .. T["Right"],
"off:" .. T["Disabled"]
},
["uf_happiness"] = {
"0:" .. T["Disabled"],
"1:" .. T["Face"],
"2:" .. T["Rank"]
},
["uf_buff_position"] = {
"TOPLEFT:" .. T["Top Left"],
"TOPRIGHT:" .. T["Top Right"],
@@ -1642,7 +1647,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U[c], T["Show Loot Icon"], C.unitframes[c], "looticon", "checkbox")
CreateConfig(U[c], T["Show Leader Icon"], C.unitframes[c], "leadericon", "checkbox")
if c == "pet" then
CreateConfig(U[c], T["Show Happiness Icon"], C.unitframes[c], "happinessicon", "checkbox")
CreateConfig(U[c], T["Show Happiness Icon"], C.unitframes[c], "happinessicon", "dropdown", pfUI.gui.dropdowns.uf_happiness)
CreateConfig(U[c], T["Happiness Icon Size"], C.unitframes[c], "happinesssize")
end
CreateConfig(U[c], T["Show Raid Mark"], C.unitframes[c], "raidicon", "checkbox")