mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
api: clean up and documentation
This commit is contained in:
+6
-6
@@ -17,7 +17,7 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player:SetWidth(pfUI_config.unitframes.player.width)
|
||||
pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height + pfUI_config.unitframes.player.pheight + 2*default_border + pfUI_config.unitframes.player.pspace)
|
||||
pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.player)
|
||||
pfUI.api:UpdateMovable(pfUI.uf.player)
|
||||
pfUI.uf.player:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
pfUI.uf.player:SetScript("OnEnter", function()
|
||||
GameTooltip_SetDefaultAnchor(GameTooltip, this)
|
||||
@@ -246,7 +246,7 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.uf.player.hp:SetWidth(pfUI_config.unitframes.player.width)
|
||||
pfUI.uf.player.hp:SetHeight(pfUI_config.unitframes.player.height)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.hp, default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.player.hp, default_border)
|
||||
|
||||
pfUI.uf.player.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.hp)
|
||||
pfUI.uf.player.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
@@ -300,7 +300,7 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.uf.player.power:SetWidth(pfUI_config.unitframes.player.width)
|
||||
pfUI.uf.player.power:SetHeight(pfUI_config.unitframes.player.pheight)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.power, default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.player.power, default_border)
|
||||
|
||||
pfUI.uf.player.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.power)
|
||||
pfUI.uf.player.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
@@ -338,7 +338,7 @@ pfUI:RegisterModule("player", function ()
|
||||
|
||||
this.energy = UnitMana("player")
|
||||
|
||||
local value = round((GetTime() - this.lastTick) * 100)
|
||||
local value = pfUI.api.round((GetTime() - this.lastTick) * 100)
|
||||
local pos = pfUI_config.unitframes.player.width / 200 * value
|
||||
this.spark:SetPoint("LEFT", pos-((pfUI_config.unitframes.player.pheight+5)/2), 0)
|
||||
end)
|
||||
@@ -458,7 +458,7 @@ pfUI:RegisterModule("player", function ()
|
||||
function pfUI.uf.player.buff.RefreshBuffs()
|
||||
for i=1, 16 do
|
||||
local stacks = GetPlayerBuffApplications(GetPlayerBuff(i-1,"HELPFUL"))
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.buff.buffs[i], default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.player.buff.buffs[i], default_border)
|
||||
pfUI.uf.player.buff.buffs[i]:SetNormalTexture(GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")))
|
||||
for i,v in ipairs({pfUI.uf.player.buff.buffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
@@ -582,7 +582,7 @@ pfUI:RegisterModule("player", function ()
|
||||
|
||||
local bid = GetPlayerBuff(i-1, "HARMFUL");
|
||||
local stacks = GetPlayerBuffApplications(bid)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.debuff.debuffs[i], default_border)
|
||||
pfUI.api:CreateBackdrop(pfUI.uf.player.debuff.debuffs[i], default_border)
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetNormalTexture(GetPlayerBuffTexture(bid))
|
||||
for i,v in ipairs({pfUI.uf.player.debuff.debuffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
|
||||
Reference in New Issue
Block a user