mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 11:10:00 +00:00
api: merge api calls into environment
This commit is contained in:
+6
-6
@@ -17,7 +17,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet:SetHeight(20 + 2*default_border + spacing)
|
||||
pfUI.uf.pet:ClearAllPoints()
|
||||
pfUI.uf.pet:SetPoint("BOTTOM", UIParent , "BOTTOM", 0, 163)
|
||||
pfUI.api:UpdateMovable(pfUI.uf.pet)
|
||||
UpdateMovable(pfUI.uf.pet)
|
||||
|
||||
pfUI.uf.pet:RegisterForClicks('LeftButtonUp', 'RightButtonUp', 'MiddleButtonUp', 'Button4Up', 'Button5Up')
|
||||
pfUI.uf.pet:SetScript("OnEnter", function()
|
||||
@@ -93,7 +93,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
end
|
||||
|
||||
if C.unitframes.custom == "1" then
|
||||
local cr, cg, cb, ca = pfUI.api.strsplit(",", C.unitframes.customcolor)
|
||||
local cr, cg, cb, ca = strsplit(",", C.unitframes.customcolor)
|
||||
pfUI.uf.pet.hp.bar:SetStatusBarColor(tonumber(cr), tonumber(cg), tonumber(cb), hp / hpmax / 4 + .75)
|
||||
else
|
||||
pfUI.uf.pet.hp.bar:SetStatusBarColor(r, g, b, hp / hpmax / 4 + .75)
|
||||
@@ -143,7 +143,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.hp:SetWidth(100)
|
||||
pfUI.uf.pet.hp:SetHeight(16)
|
||||
pfUI.uf.pet.hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.pet.hp, default_border)
|
||||
CreateBackdrop(pfUI.uf.pet.hp, default_border)
|
||||
|
||||
pfUI.uf.pet.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.pet.hp)
|
||||
pfUI.uf.pet.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
@@ -165,7 +165,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.uf.pet.power:SetWidth(100)
|
||||
pfUI.uf.pet.power:SetHeight(4)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.pet.power, default_border)
|
||||
CreateBackdrop(pfUI.uf.pet.power, default_border)
|
||||
|
||||
pfUI.uf.pet.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.pet.power)
|
||||
pfUI.uf.pet.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
@@ -230,7 +230,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
local buffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
for i=1, 16 do
|
||||
local texture, stacks = UnitBuff("pet",i)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.pet.buff.buffs[i], default_border)
|
||||
CreateBackdrop(pfUI.uf.pet.buff.buffs[i], default_border)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.pet.buff.buffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
@@ -304,7 +304,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
(row)*((2*default_border) + buffsize + 1) + (2*default_border + 1))
|
||||
|
||||
local texture, stacks = UnitDebuff("pet",i)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.pet.debuff.debuffs[i], default_border)
|
||||
CreateBackdrop(pfUI.uf.pet.debuff.debuffs[i], default_border)
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.pet.debuff.debuffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
|
||||
Reference in New Issue
Block a user