mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
unitframes: add new happiness indicator icons
This commit is contained in:
+1
-1
@@ -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
@@ -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()
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
+6
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user