mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-23 12:30:50 +00:00
gui: use cluster scaling on shift key down
This commit is contained in:
+33
-16
@@ -21,6 +21,27 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
pfUI.gui:StopMovingOrSizing()
|
pfUI.gui:StopMovingOrSizing()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
function pfUI.gui:SaveScale(frame, scale)
|
||||||
|
frame:SetScale(scale)
|
||||||
|
|
||||||
|
if not pfUI_config.position[frame:GetName()] then
|
||||||
|
pfUI_config.position[frame:GetName()] = {}
|
||||||
|
end
|
||||||
|
pfUI_config.position[frame:GetName()]["scale"] = scale
|
||||||
|
|
||||||
|
frame.drag.text:SetText("Scale: " .. scale)
|
||||||
|
frame.drag.text:SetAlpha(1)
|
||||||
|
|
||||||
|
frame.drag:SetScript("OnUpdate", function()
|
||||||
|
this.text:SetAlpha(this.text:GetAlpha() -0.05)
|
||||||
|
if this.text:GetAlpha() < 0.1 then
|
||||||
|
this.text:SetText(strsub(this:GetParent():GetName(),3))
|
||||||
|
this.text:SetAlpha(1)
|
||||||
|
this:SetScript("OnUpdate", function() return end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
pfUI.gui.reloadDialog = CreateFrame("Frame","pfReloadDiag",UIParent)
|
pfUI.gui.reloadDialog = CreateFrame("Frame","pfReloadDiag",UIParent)
|
||||||
pfUI.gui.reloadDialog:SetFrameStrata("TOOLTIP")
|
pfUI.gui.reloadDialog:SetFrameStrata("TOOLTIP")
|
||||||
pfUI.gui.reloadDialog:SetWidth(300)
|
pfUI.gui.reloadDialog:SetWidth(300)
|
||||||
@@ -159,24 +180,20 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
|
|
||||||
frame.drag:SetScript("OnMouseWheel", function()
|
frame.drag:SetScript("OnMouseWheel", function()
|
||||||
local scale = round(frame:GetScale() + arg1/10, 1)
|
local scale = round(frame:GetScale() + arg1/10, 1)
|
||||||
frame:SetScale(scale)
|
|
||||||
|
|
||||||
if not pfUI_config.position[frame:GetName()] then
|
if IsShiftKeyDown() and strsub(frame:GetName(),0,6) == "pfRaid" then
|
||||||
pfUI_config.position[frame:GetName()] = {}
|
for i=1,40 do
|
||||||
end
|
local frame = getglobal("pfRaid" .. i)
|
||||||
pfUI_config.position[frame:GetName()]["scale"] = scale
|
pfUI.gui:SaveScale(frame, scale)
|
||||||
|
|
||||||
frame.drag.text:SetText("Scale: " .. scale)
|
|
||||||
frame.drag.text:SetAlpha(1)
|
|
||||||
|
|
||||||
frame.drag:SetScript("OnUpdate", function()
|
|
||||||
this.text:SetAlpha(this.text:GetAlpha() -0.05)
|
|
||||||
if this.text:GetAlpha() < 0.1 then
|
|
||||||
this.text:SetText(strsub(this:GetParent():GetName(),3))
|
|
||||||
this.text:SetAlpha(1)
|
|
||||||
this:SetScript("OnUpdate", function() return end)
|
|
||||||
end
|
end
|
||||||
end)
|
elseif IsShiftKeyDown() and strsub(frame:GetName(),0,7) == "pfGroup" then
|
||||||
|
for i=1,4 do
|
||||||
|
local frame = getglobal("pfGroup" .. i)
|
||||||
|
pfUI.gui:SaveScale(frame, scale)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
pfUI.gui:SaveScale(frame, scale)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user