roll: add loot roll frame

This commit is contained in:
shagu
2016-12-28 22:09:18 +01:00
parent 0e33c04b34
commit d61582b887
3 changed files with 218 additions and 0 deletions
+31
View File
@@ -192,6 +192,11 @@ pfUI:RegisterModule("gui", function ()
local frame = getglobal("pfGroup" .. i)
pfUI.gui:SaveScale(frame, scale)
end
elseif IsShiftKeyDown() and strsub(frame:GetName(),0,15) == "pfLootRollFrame" then
for i=1,4 do
local frame = getglobal("pfLootRollFrame" .. i)
pfUI.gui:SaveScale(frame, scale)
end
else
pfUI.gui:SaveScale(frame, scale)
end
@@ -220,6 +225,14 @@ pfUI:RegisterModule("gui", function ()
cframe.drag.backdrop:SetBackdropBorderColor(1,1,1,1)
end
end
if strsub(frame:GetName(),0,15) == "pfLootRollFrame" then
for i=1,4 do
local cframe = getglobal("pfLootRollFrame" .. i)
cframe:StartMoving()
cframe:StopMovingOrSizing()
cframe.drag.backdrop:SetBackdropBorderColor(1,1,1,1)
end
end
_, _, _, xpos, ypos = frame:GetPoint()
frame.oldPos = { xpos, ypos }
else
@@ -270,6 +283,24 @@ pfUI:RegisterModule("gui", function ()
pfUI_config.position[cframe:GetName()] = {}
end
pfUI_config.position[cframe:GetName()]["xpos"] = xpos
pfUI_config.position[cframe:GetName()]["ypos"] = ypos
end
end
elseif strsub(frame:GetName(),0,15) == "pfLootRollFrame" then
for i=1,4 do
local cframe = getglobal("pfLootRollFrame" .. i)
cframe.drag.backdrop:SetBackdropBorderColor(.2,1,.8,1)
if cframe:GetName() ~= frame:GetName() then
local _, _, _, xpos, ypos = cframe:GetPoint()
cframe:SetPoint("TOPLEFT", xpos - diffxpos, ypos - diffypos)
local _, _, _, xpos, ypos = cframe:GetPoint()
if not pfUI_config.position[cframe:GetName()] then
pfUI_config.position[cframe:GetName()] = {}
end
pfUI_config.position[cframe:GetName()]["xpos"] = xpos
pfUI_config.position[cframe:GetName()]["ypos"] = ypos
end