From 1942b08762d369f44cebc877e957ee76893a9fea Mon Sep 17 00:00:00 2001 From: Eric Mauser Date: Tue, 3 May 2016 18:27:57 +0200 Subject: [PATCH] custom settings for player and target --- modules/player.lua | 6 +++--- modules/target.lua | 6 +++--- pfUI.lua | 13 ++++++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/modules/player.lua b/modules/player.lua index c364aeca..b9658400 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.width) -pfUI.uf.player:SetHeight(pfUI.config.unitframes.height+pfUI.config.unitframes.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 () @@ -103,7 +103,7 @@ pfUI.uf.player:SetScript("OnUpdate", function() 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.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") diff --git a/modules/target.lua b/modules/target.lua index fe1bb1aa..78eb8dcb 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.width) -pfUI.uf.target:SetHeight(pfUI.config.unitframes.height+pfUI.config.unitframes.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') @@ -150,7 +150,7 @@ pfUI.uf.target:SetScript("OnUpdate", function() 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.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") diff --git a/pfUI.lua b/pfUI.lua index 2712cc76..bfd02efc 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -28,9 +28,16 @@ pfUI.config = { buff_size = "22", debuff_size = "22", layout = "default", - width = 200, - height = 50, - pheight = 10, + ["player"] = { + width = 200, + height = 50, + pheight = 10, + }, + ["target"] = { + width = 200, + height = 50, + pheight = 10, + }, }, ["bars"] = { icon_size = "22",