From 422ca54ba26852cdf45398b6cc1d8bbbacb5c2e0 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 27 Aug 2020 11:54:31 +0200 Subject: [PATCH] unitframes: add new happiness indicator icons --- api/config.lua | 2 +- api/unitframes.lua | 6 +++--- img/{happy.tga => happy1.tga} | Bin img/happy2.tga | Bin 0 -> 750 bytes img/{neutral.tga => neutral1.tga} | Bin img/neutral2.tga | Bin 0 -> 660 bytes img/{sad.tga => sad1.tga} | Bin img/sad2.tga | Bin 0 -> 750 bytes modules/gui.lua | 7 ++++++- 9 files changed, 10 insertions(+), 5 deletions(-) rename img/{happy.tga => happy1.tga} (100%) create mode 100644 img/happy2.tga rename img/{neutral.tga => neutral1.tga} (100%) create mode 100644 img/neutral2.tga rename img/{sad.tga => sad1.tga} (100%) create mode 100644 img/sad2.tga diff --git a/api/config.lua b/api/config.lua index 7ea75974..5e04794c 100644 --- a/api/config.lua +++ b/api/config.lua @@ -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") diff --git a/api/unitframes.lua b/api/unitframes.lua index f77716c5..1d5738f9 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -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() diff --git a/img/happy.tga b/img/happy1.tga similarity index 100% rename from img/happy.tga rename to img/happy1.tga diff --git a/img/happy2.tga b/img/happy2.tga new file mode 100644 index 0000000000000000000000000000000000000000..09c8d0dc927feed7b3b0685db4dab7b57c48631d GIT binary patch literal 750 zcmYjPO-lk%6n*0tF)ROp(K4`2%bKNu5CwhF($zpeAc$6(ebCaK11((k6AbztqTpge z!G+@p<`ciCbM9EqgZsSi+;i@`bDm0>>Tji0T5WH|s@1AFola{(5Lj=l#hCfNUu(5m z$@p@)`~VQFRx91mhbZLSHNvyNI8#6vx~K{j}yBGK>n%d7*X0iOsnskQz>!bL|c5_-L!QzDW?D<>im&!|WZhryIesEQQ7|90bxg3)MHNUDjc+s>hr}s&gi){8Ey(3oUgo-P z#M8-SvVJzS^=GqLHuQ8n9`A3S4JSL|DSC$@x*)cTr)`;;m@S^li^@?7+}5^}BGo6( zO3IB`C7EFI=TVs8A#94t?*)6Iz<{Nd!C+946A`Y9v&-C7{ycwrlD$64ALsVeFX%|g AivR!s literal 0 HcmV?d00001 diff --git a/img/neutral.tga b/img/neutral1.tga similarity index 100% rename from img/neutral.tga rename to img/neutral1.tga diff --git a/img/neutral2.tga b/img/neutral2.tga new file mode 100644 index 0000000000000000000000000000000000000000..3afd29df5137705938920d7e8a9563a41835916f GIT binary patch literal 660 zcmY+B&q@MO6vodTDZ-U+V6+VC1!9&4LKO6mo}f1f+NznjbUDz%Wsl&Kh=Pj=1s9GA z<`s3+>3rWMrv~oj{P~^loHs@5D{D+RSrkPL z78qa(IMj^C;|3H-inZ2RtQn0)K}GSzXm#+PGPBuC^p^yp;thvG&ZSPkHlF5KvS*CW zEc5wX4nd+or@+vntCdctLje>AB--sZ8-RdF7>17Ey<9F`Ys#+IYqw3aSS&;z#^nTF zy0to_xEH=k4KA%WNLJxGiycxGbmz0bBY|bebUGD!MD@DAeJDH@?}|6qXHS>KtHQbb E0GI+`O#lD@ literal 0 HcmV?d00001 diff --git a/img/sad.tga b/img/sad1.tga similarity index 100% rename from img/sad.tga rename to img/sad1.tga diff --git a/img/sad2.tga b/img/sad2.tga new file mode 100644 index 0000000000000000000000000000000000000000..58618352e1ef12bb86da1c476e161921b728ba84 GIT binary patch literal 750 zcmY*XO-lk%6rITr!j=EPXc^e1WzEt+h=RUo>1v=K5JaoYK4|Gqp@qwSfTb{*Vu_ zjM;4VDA=BVB*OJ-h=leOygO~hiY=ao7l1Fi-|!Ta&{JeBL`r+g z46$)*8V`>QHTc*c#Gc$J2i!$?dR(Z*M^3nLZH-35lAp(PUH6d2uV=L*pnf2@6z