From 65f2b156272338f5badde40d5738860d3c247335 Mon Sep 17 00:00:00 2001 From: Eric Mauser Date: Sun, 15 May 2016 23:15:07 +0200 Subject: [PATCH] rename config variable --- modules/actionbar.lua | 72 ++++++++++++++++++++-------------------- modules/bags.lua | 30 ++++++++--------- modules/pet.lua | 8 ++--- modules/player.lua | 34 +++++++++---------- modules/target.lua | 36 ++++++++++---------- modules/targettarget.lua | 8 ++--- modules/uf_tukui.lua | 2 +- pfUI.lua | 2 +- 8 files changed, 96 insertions(+), 96 deletions(-) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index b1e7636b..1112b9ec 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -44,8 +44,8 @@ PetActionBarFrame:SetParent(pfUI.bars.pet) pfUI.bars:SetScript("OnEvent", function() local bpc = 1; if MultiBarBottomLeft:IsShown() then bpc = bpc + 1 end -- bottom panel count - pfUI.bars.bottom:SetWidth(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 12 + pfUI.config.bars.border * 12) - pfUI.bars.bottom:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * bpc + pfUI.config.bars.border * bpc) + pfUI.bars.bottom:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12) + pfUI.bars.bottom:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * bpc + pfUI_config.bars.border * bpc) PetActionBar_Update() if (PetHasActionBar()) then @@ -55,21 +55,21 @@ pfUI.bars:SetScript("OnEvent", function() pfUI.bars.pet:SetFrameStrata("LOW") pfUI.bars.pet:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5) pfUI.bars.pet:SetBackdrop(pfUI.backdrop) - pfUI.bars.pet:SetWidth(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 10 + pfUI.config.bars.border * 10) - pfUI.bars.pet:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 1 + pfUI.config.bars.border) + pfUI.bars.pet:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 10 + pfUI_config.bars.border * 10) + pfUI.bars.pet:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 1 + pfUI_config.bars.border) PetActionBarFrame:ClearAllPoints() PetActionBarFrame:SetAllPoints(pfUI.bars.pet) PetActionButton1:ClearAllPoints() PetActionButton1:SetParent(pfUI.bars.pet) - PetActionButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2, pfUI.config.bars.border*2) + PetActionButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2) for i=2, 10 do local b = getglobal("PetActionButton"..i) local b2 = getglobal("PetActionButton"..i-1) b:SetAllPoints(pfUI.bars.pet) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end else pfUI.bars.pet:Hide() @@ -80,7 +80,7 @@ pfUI.bars:SetScript("OnEvent", function() ShapeshiftButton1:ClearAllPoints() ShapeshiftButton1:SetParent(pfUI.bars.shapeshift) - ShapeshiftButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2, pfUI.config.bars.border*2) + ShapeshiftButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2) local shapeshiftbuttons = 0 if ShapeshiftButton1:IsShown() then shapeshiftbuttons = 1 @@ -94,15 +94,15 @@ pfUI.bars:SetScript("OnEvent", function() b:SetAllPoints(pfUI.bars.shapeshift) b:SetParent(pfUI.bars.shapeshift) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) if b:IsShown() then shapeshiftbuttons = shapeshiftbuttons + 1 end end pfUI.bars.shapeshift:SetFrameStrata("LOW") pfUI.bars.shapeshift:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5) pfUI.bars.shapeshift:SetBackdrop(pfUI.backdrop) - pfUI.bars.shapeshift:SetWidth(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * shapeshiftbuttons + pfUI.config.bars.border * shapeshiftbuttons) - pfUI.bars.shapeshift:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 1 + pfUI.config.bars.border) + pfUI.bars.shapeshift:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * shapeshiftbuttons + pfUI_config.bars.border * shapeshiftbuttons) + pfUI.bars.shapeshift:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 1 + pfUI_config.bars.border) if SHOW_MULTI_ACTIONBAR_1 then MultiBarBottomLeft:SetParent(pfUI.bars.bottom) @@ -110,12 +110,12 @@ pfUI.bars:SetScript("OnEvent", function() MultiBarBottomLeft:SetAllPoints(pfUI.bars.bottom) MultiBarBottomLeftButton1:ClearAllPoints() - MultiBarBottomLeftButton1:SetPoint("BOTTOM", ActionButton1, "TOP", 0, pfUI.config.bars.border) + MultiBarBottomLeftButton1:SetPoint("BOTTOM", ActionButton1, "TOP", 0, pfUI_config.bars.border) for i=2, 12 do local b = getglobal("MultiBarBottomLeftButton"..i) local b2 = getglobal("MultiBarBottomLeftButton"..i-1) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end end @@ -124,26 +124,26 @@ pfUI.bars:SetScript("OnEvent", function() pfUI.bars.bottomleft:SetFrameStrata("LOW") pfUI.bars.bottomleft:SetPoint("BOTTOMRIGHT", pfUI.bars.bottom, "BOTTOMLEFT", -5, 0) pfUI.bars.bottomleft:SetBackdrop(pfUI.backdrop) - pfUI.bars.bottomleft:SetWidth(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 6 + pfUI.config.bars.border * 6) - pfUI.bars.bottomleft:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 2 + pfUI.config.bars.border * 2) + pfUI.bars.bottomleft:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 6 + pfUI_config.bars.border * 6) + pfUI.bars.bottomleft:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 2 + pfUI_config.bars.border * 2) MultiBarBottomRight:SetParent(pfUI.bars.bottomleft) MultiBarBottomRight:ClearAllPoints() MultiBarBottomRight:SetAllPoints(pfUI.bars.bottomleft) MultiBarBottomRightButton1:ClearAllPoints() - MultiBarBottomRightButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2, pfUI.config.bars.border*2) + MultiBarBottomRightButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2) for i=2, 6 do local b = getglobal("MultiBarBottomRightButton"..i) local b2 = getglobal("MultiBarBottomRightButton"..i-1) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end for i=7, 12 do local b = getglobal("MultiBarBottomRightButton"..i) local b2 = getglobal("MultiBarBottomRightButton"..i-6) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", -pfUI.config.bars.icon_size, pfUI.config.bars.icon_size + pfUI.config.bars.border) + b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + pfUI_config.bars.border) end else pfUI.bars.bottomleft:Hide() @@ -154,26 +154,26 @@ pfUI.bars:SetScript("OnEvent", function() pfUI.bars.bottomright:SetFrameStrata("LOW") pfUI.bars.bottomright:SetPoint("BOTTOMLEFT", pfUI.bars.bottom, "BOTTOMRIGHT", 5, 0) pfUI.bars.bottomright:SetBackdrop(pfUI.backdrop) - pfUI.bars.bottomright:SetWidth(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 6 + pfUI.config.bars.border * 6) - pfUI.bars.bottomright:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 2 + pfUI.config.bars.border * 2) + pfUI.bars.bottomright:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 6 + pfUI_config.bars.border * 6) + pfUI.bars.bottomright:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 2 + pfUI_config.bars.border * 2) MultiBarRight:SetParent(pfUI.bars.bottomright) MultiBarRight:ClearAllPoints() MultiBarRight:SetAllPoints(pfUI.bars.bottomright) MultiBarRightButton1:ClearAllPoints() - MultiBarRightButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2, pfUI.config.bars.border*2) + MultiBarRightButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2) for i=2, 6 do local b = getglobal("MultiBarRightButton"..i) local b2 = getglobal("MultiBarRightButton"..i-1) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end for i=7, 12 do local b = getglobal("MultiBarRightButton"..i) local b2 = getglobal("MultiBarRightButton"..i-6) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", -pfUI.config.bars.icon_size, pfUI.config.bars.icon_size + pfUI.config.bars.border) + b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + pfUI_config.bars.border) end else pfUI.bars.bottomright:Hide() @@ -184,20 +184,20 @@ pfUI.bars:SetScript("OnEvent", function() pfUI.bars.vertical:SetFrameStrata("LOW") pfUI.bars.vertical:SetPoint("RIGHT", -5, 0) pfUI.bars.vertical:SetBackdrop(pfUI.backdrop) - pfUI.bars.vertical:SetWidth(pfUI.config.bars.border*4 + pfUI.config.bars.icon_size) - pfUI.bars.vertical:SetHeight(pfUI.config.bars.border*3 + pfUI.config.bars.icon_size * 12 + pfUI.config.bars.border * 12) + pfUI.bars.vertical:SetWidth(pfUI_config.bars.border*4 + pfUI_config.bars.icon_size) + pfUI.bars.vertical:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12) MultiBarLeft:SetParent(pfUI.bars.vertical) MultiBarLeft:ClearAllPoints() MultiBarLeft:SetAllPoints(pfUI.bars.vertical) MultiBarLeftButton1:ClearAllPoints() - MultiBarLeftButton1:SetPoint("TOPLEFT", pfUI.config.bars.border*2, -pfUI.config.bars.border*2) + MultiBarLeftButton1:SetPoint("TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2) for i=2, 12 do local b = getglobal("MultiBarLeftButton"..i) local b2 = getglobal("MultiBarLeftButton"..i-1) b:ClearAllPoints() - b:SetPoint("TOP", b2, "BOTTOM", 0, -pfUI.config.bars.border) + b:SetPoint("TOP", b2, "BOTTOM", 0, -pfUI_config.bars.border) end else pfUI.bars.vertical:Hide() @@ -212,13 +212,13 @@ pfUI.bars.bottom:SetBackdrop(pfUI.backdrop) ActionButton1:SetParent(pfUI.bars.bottom) ActionButton1:ClearAllPoints() -ActionButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2, pfUI.config.bars.border*2) +ActionButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2) for i=2, 12 do local b = getglobal("ActionButton"..i) local b2 = getglobal("ActionButton"..i-1) b:SetParent(pfUI.bars.bottom) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end BonusActionBarFrame:SetParent(pfUI.bars.bottom) @@ -226,20 +226,20 @@ BonusActionBarFrame:ClearAllPoints() BonusActionBarFrame:SetAllPoints(pfUI.bars.bottom) BonusActionButton1:ClearAllPoints() -BonusActionButton1:SetPoint("BOTTOMLEFT", pfUI.config.bars.border*2 -4, pfUI.config.bars.border*2) +BonusActionButton1:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2 -4, pfUI_config.bars.border*2) for i=2, 12 do local b = getglobal("BonusActionButton"..i) local b2 = getglobal("BonusActionButton"..i-1) b:ClearAllPoints() - b:SetPoint("LEFT", b2, "RIGHT", pfUI.config.bars.border, 0) + b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0) end for i = 1, 10 do getglobal("ShapeshiftButton"..i):SetBackdrop(pfUI.backdrop) getglobal("ShapeshiftButton"..i):SetBackdropColor(0,0,0,0) - getglobal("ShapeshiftButton"..i):SetWidth(pfUI.config.bars.icon_size) - getglobal("ShapeshiftButton"..i):SetHeight(pfUI.config.bars.icon_size) + getglobal("ShapeshiftButton"..i):SetWidth(pfUI_config.bars.icon_size) + getglobal("ShapeshiftButton"..i):SetHeight(pfUI_config.bars.icon_size) getglobal("ShapeshiftButton"..i):Show() getglobal("ShapeshiftButton"..i).showgrid = 1 getglobal("ShapeshiftButton"..i..'Icon'):SetAllPoints(getglobal("ShapeshiftButton"..i)) @@ -264,8 +264,8 @@ end for i = 1, 10 do getglobal("PetActionButton"..i):SetBackdrop(pfUI.backdrop) getglobal("PetActionButton"..i):SetBackdropColor(0,0,0,0) - getglobal("PetActionButton"..i):SetWidth(pfUI.config.bars.icon_size) - getglobal("PetActionButton"..i):SetHeight(pfUI.config.bars.icon_size) + getglobal("PetActionButton"..i):SetWidth(pfUI_config.bars.icon_size) + getglobal("PetActionButton"..i):SetHeight(pfUI_config.bars.icon_size) getglobal("PetActionButton"..i):Show() getglobal("PetActionButton"..i).showgrid = 1 getglobal("PetActionButton"..i..'AutoCast'):SetScale(.75) @@ -303,8 +303,8 @@ for i = 1, 12 do getglobal(button..i):SetBackdrop(pfUI.backdrop) getglobal(button..i):SetBackdropColor(0,0,0,0) - getglobal(button..i):SetWidth(pfUI.config.bars.icon_size) - getglobal(button..i):SetHeight(pfUI.config.bars.icon_size) + getglobal(button..i):SetWidth(pfUI_config.bars.icon_size) + getglobal(button..i):SetHeight(pfUI_config.bars.icon_size) getglobal(button..i):Show() getglobal(button..i).showgrid = 1 diff --git a/modules/bags.lua b/modules/bags.lua index 414fefe8..d907be79 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -52,7 +52,7 @@ end pfUI.bag.close = CreateFrame("Button") pfUI.bag.close:SetParent(pfUI.bag) -pfUI.bag.close:SetPoint("TOPRIGHT", -pfUI.config.bars.border*2,-pfUI.config.bars.border*2 ) +pfUI.bag.close:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2,-pfUI_config.bars.border*2 ) pfUI.bag.close:SetBackdrop(pfUI.backdrop) pfUI.bag.close:SetHeight(15) pfUI.bag.close:SetWidth(15) @@ -75,7 +75,7 @@ pfUI.bag.search = CreateFrame("Frame", pfUI.bag) pfUI.bag.search:SetParent(pfUI.bag) pfUI.bag.search:SetHeight(15) pfUI.bag.search:SetWidth(100) -pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI.config.bars.border*2, -pfUI.config.bars.border*2) +pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2) pfUI.bag.search:SetBackdrop(pfUI.backdrop) pfUI.bag.search:SetBackdropBorderColor(0,0,0,1) @@ -89,8 +89,8 @@ pfUI.bag.search.edit:SetScript("OnEditFocusGained", function() pfUI.bag.search:SetBackdropBorderColor(1,1,1,1) this:SetText("") - pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI.config.bars.border*2, -pfUI.config.bars.border*2) - pfUI.bag.search:SetPoint("TOPRIGHT", pfUI.bag, "TOPRIGHT", -pfUI.config.bars.border*2 - 16, -pfUI.config.bars.border*2) + pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2) + pfUI.bag.search:SetPoint("TOPRIGHT", pfUI.bag, "TOPRIGHT", -pfUI_config.bars.border*2 - 16, -pfUI_config.bars.border*2) pfUI.bag.money:Hide() end) @@ -101,7 +101,7 @@ pfUI.bag.search.edit:SetScript("OnEditFocusLost", function() pfUI.bag.search:ClearAllPoints() pfUI.bag.search:SetWidth(100) - pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI.config.bars.border*2, -pfUI.config.bars.border*2) + pfUI.bag.search:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2) for j=1, 12 do local frame, container = nil @@ -120,8 +120,8 @@ pfUI.bag.search.edit:SetScript("OnEditFocusLost", function() pfUI.bag.money:Show() end) -pfUI.bag.search.edit:SetPoint("TOPLEFT", pfUI.bag.search, "TOPLEFT", pfUI.config.bars.border*2, 0) -pfUI.bag.search.edit:SetPoint("BOTTOMRIGHT", pfUI.bag.search, "BOTTOMRIGHT", -pfUI.config.bars.border*2, 0) +pfUI.bag.search.edit:SetPoint("TOPLEFT", pfUI.bag.search, "TOPLEFT", pfUI_config.bars.border*2, 0) +pfUI.bag.search.edit:SetPoint("BOTTOMRIGHT", pfUI.bag.search, "BOTTOMRIGHT", -pfUI_config.bars.border*2, 0) pfUI.bag.search.edit:SetFont("Interface\\AddOns\\pfUI\\fonts\\arial.ttf", 10, "OUTLINE") pfUI.bag.search.edit:SetAutoFocus(false) @@ -176,7 +176,7 @@ pfUI.bag:SetScript("OnEvent", function() local y = 0 local x_max = 10 - local button_size = (this:GetWidth() - pfUI.config.bars.border*3) / x_max - pfUI.config.bars.border + local button_size = (this:GetWidth() - pfUI_config.bars.border*3) / x_max - pfUI_config.bars.border for j=1, 5 do for i=1, GetContainerNumSlots(j-1) do @@ -187,7 +187,7 @@ pfUI.bag:SetScript("OnEvent", function() f = getglobal("ContainerFrame" .. j .. "Item" .. i) f:SetParent(pfUI.bag[j]) f:SetID(i) - f:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI.config.bars.border*2 + x*button_size + x*pfUI.config.bars.border, -pfUI.config.bars.border*2 - y*button_size - y * pfUI.config.bars.border - 17) + f:SetPoint("TOPLEFT", pfUI.bag, "TOPLEFT", pfUI_config.bars.border*2 + x*button_size + x*pfUI_config.bars.border, -pfUI_config.bars.border*2 - y*button_size - y * pfUI_config.bars.border - 17) f:Show() f:SetHeight(button_size) f:SetWidth(button_size) @@ -195,7 +195,7 @@ pfUI.bag:SetScript("OnEvent", function() f:SetNormalTexture(nil) f:SetBackdrop( - { bgFile = texture, tile = false, tileSize = pfUI.config.unitframes.buff_size, + { bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.buff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) @@ -228,7 +228,7 @@ pfUI.bag:SetScript("OnEvent", function() end end y = y + 1 - pfUI.bag:SetHeight( y * button_size + y * pfUI.config.bars.border + pfUI.config.bars.border*3 + 17 + 17) + pfUI.bag:SetHeight( y * button_size + y * pfUI_config.bars.border + pfUI_config.bars.border*3 + 17 + 17) end) pfUI.bank:RegisterEvent("BAG_UPDATE"); @@ -252,7 +252,7 @@ pfUI.bank:SetScript("OnEvent", function() local y = 0 local x_max = 10 - local button_size = (this:GetWidth() - pfUI.config.bars.border*3) / x_max - pfUI.config.bars.border + local button_size = (this:GetWidth() - pfUI_config.bars.border*3) / x_max - pfUI_config.bars.border for j=5, 11 do local frame, container = nil @@ -272,7 +272,7 @@ pfUI.bank:SetScript("OnEvent", function() if j == 5 then f:SetParent(pfUI.bank[12]) else f:SetParent(pfUI.bank[j]) end f:Show() f:SetID(i) - f:SetPoint("TOPLEFT", pfUI.bank, "TOPLEFT", pfUI.config.bars.border*2 + x*button_size + x*pfUI.config.bars.border, -pfUI.config.bars.border*2 - y*button_size - y * pfUI.config.bars.border) + f:SetPoint("TOPLEFT", pfUI.bank, "TOPLEFT", pfUI_config.bars.border*2 + x*button_size + x*pfUI_config.bars.border, -pfUI_config.bars.border*2 - y*button_size - y * pfUI_config.bars.border) f:SetAlpha(1) f:SetHeight(button_size) f:SetWidth(button_size) @@ -280,7 +280,7 @@ pfUI.bank:SetScript("OnEvent", function() f:SetNormalTexture(nil) f:SetBackdrop( - { bgFile = texture, tile = false, tileSize = pfUI.config.unitframes.buff_size, + { bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.buff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) @@ -314,5 +314,5 @@ pfUI.bank:SetScript("OnEvent", function() end end y = y + 1 - pfUI.bank:SetHeight( y * button_size + y * pfUI.config.bars.border + pfUI.config.bars.border*3 + 17) + pfUI.bank:SetHeight( y * button_size + y * pfUI_config.bars.border + pfUI_config.bars.border*3 + 17) end) diff --git a/modules/pet.lua b/modules/pet.lua index 9ee30748..c804094b 100644 --- a/modules/pet.lua +++ b/modules/pet.lua @@ -65,9 +65,9 @@ pfUI.uf.pet:SetScript("OnUpdate", function() local hpDiff = abs(hpReal - hpDisplay) if hpDisplay < hpReal then - pfUI.uf.pet.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.pet.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed)) elseif hpDisplay > hpReal then - pfUI.uf.pet.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.pet.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed)) end -- animation power @@ -76,9 +76,9 @@ pfUI.uf.pet:SetScript("OnUpdate", function() local powerDiff = abs(powerReal - powerDisplay) if powerDisplay < powerReal then - pfUI.uf.pet.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.pet.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed)) elseif hpDisplay > hpReal then - pfUI.uf.pet.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.pet.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed)) end end) diff --git a/modules/player.lua b/modules/player.lua index 10b611b5..056b4fba 100644 --- a/modules/player.lua +++ b/modules/player.lua @@ -2,8 +2,8 @@ PlayerFrame:Hide() PlayerFrame:UnregisterAllEvents() pfUI.uf.player = CreateFrame("Button",nil,UIParent) -pfUI.uf.player:SetWidth(pfUI.config.unitframes.player.width) -pfUI.uf.player:SetHeight(pfUI.config.unitframes.player.height+pfUI.config.unitframes.player.pheight) +pfUI.uf.player:SetWidth(pfUI_config.unitframes.player.width) +pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height+pfUI_config.unitframes.player.pheight) pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125) pfUI.uf.player:RegisterForClicks('LeftButtonUp', 'RightButtonUp') pfUI.uf.player:SetScript("OnClick", function () @@ -85,9 +85,9 @@ pfUI.uf.player:SetScript("OnUpdate", function() local hpDiff = abs(hpReal - hpDisplay) if hpDisplay < hpReal then - pfUI.uf.player.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.player.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed)) elseif hpDisplay > hpReal then - pfUI.uf.player.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.player.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed)) end local powerDisplay = pfUI.uf.player.power.bar:GetValue() @@ -95,15 +95,15 @@ pfUI.uf.player:SetScript("OnUpdate", function() local powerDiff = abs(powerReal - powerDisplay) if powerDisplay < powerReal then - pfUI.uf.player.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.player.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed)) elseif powerDisplay > powerReal then - pfUI.uf.player.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.player.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed)) end end) pfUI.uf.player.hp = CreateFrame("Frame",nil, pfUI.uf.player) pfUI.uf.player.hp:SetBackdrop(pfUI.backdrop) -pfUI.uf.player.hp:SetHeight(pfUI.config.unitframes.player.height) +pfUI.uf.player.hp:SetHeight(pfUI_config.unitframes.player.height) pfUI.uf.player.hp:SetPoint("TOPRIGHT",pfUI.uf.player,"TOPRIGHT") pfUI.uf.player.hp:SetPoint("TOPLEFT",pfUI.uf.player,"TOPLEFT") @@ -195,9 +195,9 @@ for i=1, 16 do pfUI.uf.player.buff.buffs[i]:RegisterForClicks("RightButtonUp") pfUI.uf.player.buff.buffs[i]:ClearAllPoints() - pfUI.uf.player.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.buff_size - pfUI.config.unitframes.buff_size -1 , 1*row + pfUI.config.unitframes.buff_size*row +1) - pfUI.uf.player.buff.buffs[i]:SetWidth(pfUI.config.unitframes.buff_size) - pfUI.uf.player.buff.buffs[i]:SetHeight(pfUI.config.unitframes.buff_size) + pfUI.uf.player.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.buff_size - pfUI_config.unitframes.buff_size -1 , 1*row + pfUI_config.unitframes.buff_size*row +1) + pfUI.uf.player.buff.buffs[i]:SetWidth(pfUI_config.unitframes.buff_size) + pfUI.uf.player.buff.buffs[i]:SetHeight(pfUI_config.unitframes.buff_size) pfUI.uf.player.buff.buffs[i]:SetNormalTexture(nil) pfUI.uf.player.buff.buffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -228,7 +228,7 @@ function pfUI.uf.player.buff.RefreshBuffs() for i=1, 16 do local stacks = GetPlayerBuffApplications(GetPlayerBuff(i-1,"HELPFUL")) pfUI.uf.player.buff.buffs[i]:SetBackdrop( - { bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")), tile = false, tileSize = pfUI.config.unitframes.buff_size, + { bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")), tile = false, tileSize = pfUI_config.unitframes.buff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) @@ -282,10 +282,10 @@ for i=1, 16 do if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end - pfUI.uf.player.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.debuff_size - pfUI.config.unitframes.debuff_size -1 , 1*row + pfUI.config.unitframes.debuff_size*row +1) + pfUI.uf.player.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 , 1*row + pfUI_config.unitframes.debuff_size*row +1) - pfUI.uf.player.debuff.debuffs[i]:SetWidth(pfUI.config.unitframes.debuff_size) - pfUI.uf.player.debuff.debuffs[i]:SetHeight(pfUI.config.unitframes.debuff_size) + pfUI.uf.player.debuff.debuffs[i]:SetWidth(pfUI_config.unitframes.debuff_size) + pfUI.uf.player.debuff.debuffs[i]:SetHeight(pfUI_config.unitframes.debuff_size) pfUI.uf.player.debuff.debuffs[i]:SetNormalTexture(nil) pfUI.uf.player.debuff.debuffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -321,13 +321,13 @@ function pfUI.uf.player.debuff.RefreshBuffs() if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end pfUI.uf.player.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", - (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.debuff_size - pfUI.config.unitframes.debuff_size -1 , - 1*row + pfUI.config.unitframes.debuff_size*row +1 + (top*(pfUI.config.unitframes.debuff_size+1)) + (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 , + 1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1)) ) local stacks = GetPlayerBuffApplications(GetPlayerBuff(i-1,"HARMFUL")) pfUI.uf.player.debuff.debuffs[i]:SetBackdrop( - { bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HARMFUL")), tile = false, tileSize = pfUI.config.unitframes.debuff_size, + { bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HARMFUL")), tile = false, tileSize = pfUI_config.unitframes.debuff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) diff --git a/modules/target.lua b/modules/target.lua index 2d0cc9f7..c9a256e1 100644 --- a/modules/target.lua +++ b/modules/target.lua @@ -11,8 +11,8 @@ pfUI.uf.target:SetScript("OnEvent", function() pfUI.uf.target:Hide() end end) -pfUI.uf.target:SetWidth(pfUI.config.unitframes.target.width) -pfUI.uf.target:SetHeight(pfUI.config.unitframes.target.height+pfUI.config.unitframes.target.pheight) +pfUI.uf.target:SetWidth(pfUI_config.unitframes.target.width) +pfUI.uf.target:SetHeight(pfUI_config.unitframes.target.height+pfUI_config.unitframes.target.pheight) pfUI.uf.target:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 75, 125) pfUI.uf.target:RegisterForClicks('LeftButtonUp', 'RightButtonUp') @@ -132,9 +132,9 @@ pfUI.uf.target:SetScript("OnUpdate", function() local hpDiff = abs(hpReal - hpDisplay) if hpDisplay < hpReal then - pfUI.uf.target.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.target.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed)) elseif hpDisplay > hpReal then - pfUI.uf.target.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.target.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed)) end local powerDisplay = pfUI.uf.target.power.bar:GetValue() @@ -142,15 +142,15 @@ pfUI.uf.target:SetScript("OnUpdate", function() local powerDiff = abs(powerReal - powerDisplay) if powerDisplay < powerReal then - pfUI.uf.target.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.target.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed)) elseif powerDisplay > powerReal then - pfUI.uf.target.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.target.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed)) end end) pfUI.uf.target.hp = CreateFrame("Frame",nil, pfUI.uf.target) pfUI.uf.target.hp:SetBackdrop(pfUI.backdrop) -pfUI.uf.target.hp:SetHeight(pfUI.config.unitframes.target.height) +pfUI.uf.target.hp:SetHeight(pfUI_config.unitframes.target.height) pfUI.uf.target.hp:SetPoint("TOPLEFT",pfUI.uf.target,"TOPLEFT") pfUI.uf.target.hp:SetPoint("TOPRIGHT",pfUI.uf.target,"TOPRIGHT") @@ -289,9 +289,9 @@ for i=1, 16 do pfUI.uf.target.buff.buffs[i]:RegisterForClicks("RightButtonUp") pfUI.uf.target.buff.buffs[i]:ClearAllPoints() - pfUI.uf.target.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.buff_size - pfUI.config.unitframes.buff_size -1 , 1*row + pfUI.config.unitframes.buff_size*row +1) - pfUI.uf.target.buff.buffs[i]:SetWidth(pfUI.config.unitframes.buff_size) - pfUI.uf.target.buff.buffs[i]:SetHeight(pfUI.config.unitframes.buff_size) + pfUI.uf.target.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.buff_size - pfUI_config.unitframes.buff_size -1 , 1*row + pfUI_config.unitframes.buff_size*row +1) + pfUI.uf.target.buff.buffs[i]:SetWidth(pfUI_config.unitframes.buff_size) + pfUI.uf.target.buff.buffs[i]:SetHeight(pfUI_config.unitframes.buff_size) pfUI.uf.target.buff.buffs[i]:SetNormalTexture(nil) pfUI.uf.target.buff.buffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -307,7 +307,7 @@ function pfUI.uf.target.buff.RefreshBuffs() for i=1, 16 do local texture, stacks = UnitBuff("target",i) pfUI.uf.target.buff.buffs[i]:SetBackdrop( - { bgFile = texture, tile = false, tileSize = pfUI.config.unitframes.buff_size, + { bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.buff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) @@ -354,12 +354,12 @@ for i=1, 16 do if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end pfUI.uf.target.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT", - (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.debuff_size - pfUI.config.unitframes.debuff_size -1 , - 1*row + pfUI.config.unitframes.debuff_size*row +1 + (top*(pfUI.config.unitframes.debuff_size+1)) + (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 , + 1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1)) ) - pfUI.uf.target.debuff.debuffs[i]:SetWidth(pfUI.config.unitframes.debuff_size) - pfUI.uf.target.debuff.debuffs[i]:SetHeight(pfUI.config.unitframes.debuff_size) + pfUI.uf.target.debuff.debuffs[i]:SetWidth(pfUI_config.unitframes.debuff_size) + pfUI.uf.target.debuff.debuffs[i]:SetHeight(pfUI_config.unitframes.debuff_size) pfUI.uf.target.debuff.debuffs[i]:SetNormalTexture(nil) pfUI.uf.target.debuff.debuffs[i]:SetScript("OnEnter", function() GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT") @@ -382,12 +382,12 @@ function pfUI.uf.target.debuff.RefreshBuffs() if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end pfUI.uf.target.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT", - (i-8*row)*1 + (i-8*row)*pfUI.config.unitframes.debuff_size - pfUI.config.unitframes.debuff_size -1 , - 1*row + pfUI.config.unitframes.debuff_size*row +1 + (top*(pfUI.config.unitframes.debuff_size+1)) + (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 , + 1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1)) ) local texture, stacks = UnitDebuff("target",i) pfUI.uf.target.debuff.debuffs[i]:SetBackdrop( - { bgFile = texture, tile = false, tileSize = pfUI.config.unitframes.debuff_size, + { bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.debuff_size, edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8, insets = { left = 0, right = 0, top = 0, bottom = 0} }) diff --git a/modules/targettarget.lua b/modules/targettarget.lua index 0924a2cf..d9f67f89 100644 --- a/modules/targettarget.lua +++ b/modules/targettarget.lua @@ -43,9 +43,9 @@ pfUI.uf.targettarget:SetScript("OnUpdate", function() real = UnitHealth("targettarget") diff = abs(real - display) if display < real then - pfUI.uf.targettarget.hp.bar:SetValue(display + ceil(diff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.targettarget.hp.bar:SetValue(display + ceil(diff / pfUI_config.unitframes.animation_speed)) elseif display > real then - pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed)) end PowerColor = ManaBarColor[UnitPowerType("targettarget")]; @@ -57,9 +57,9 @@ pfUI.uf.targettarget:SetScript("OnUpdate", function() real = UnitMana("targettarget") diff = abs(real - display) if display < real then - pfUI.uf.targettarget.power.bar:SetValue(display + ceil(diff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.targettarget.power.bar:SetValue(display + ceil(diff / pfUI_config.unitframes.animation_speed)) elseif display > real then - pfUI.uf.targettarget.power.bar:SetValue(display - ceil(diff / pfUI.config.unitframes.animation_speed)) + pfUI.uf.targettarget.power.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed)) end end) diff --git a/modules/uf_tukui.lua b/modules/uf_tukui.lua index 9aed8201..78b82524 100644 --- a/modules/uf_tukui.lua +++ b/modules/uf_tukui.lua @@ -1,4 +1,4 @@ -if pfUI.config.unitframes.layout == "tukui" then +if pfUI_config.unitframes.layout == "tukui" then pfUI.uf.player.caption = CreateFrame("Frame",nil, pfUI.uf.player) pfUI.uf.player.caption:SetBackdrop(pfUI.backdrop) pfUI.uf.player.caption:SetHeight(18) diff --git a/pfUI.lua b/pfUI.lua index 64200347..643b76e4 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -36,7 +36,7 @@ pfUI.backdrop_underline = { pfUI.playerDB = {} -pfUI.config = { +pfUI_config = { ["unitframes"] = { animation_speed = 1, buff_size = "22",