You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
822 B
37 lines
822 B
MoveIt.Modules.Resize = {}
|
|
|
|
function MoveIt.Modules.Resize:Apply(frameName)
|
|
|
|
local modSettings = MoveIt:GetFrameSettings(frameName, "Resize")
|
|
local handle = MoveIt:GetFrameHandle(frameName)
|
|
|
|
handle:SetWidth(modSettings.Width)
|
|
handle:SetHeight(modSettings.Height)
|
|
|
|
end
|
|
|
|
function MoveIt.Modules.Resize:Revert(frameName)
|
|
|
|
local originalSettings = MoveIt.originalSettings[frameName].Resize
|
|
|
|
MoveIt:SetFrameSettings(frameName, "Resize",
|
|
{
|
|
Width = originalSettings.Width,
|
|
Height = originalSettings.Height,
|
|
Enabled = false
|
|
})
|
|
self:Apply(frameName)
|
|
|
|
end
|
|
|
|
function MoveIt.Modules.Resize:GetOriginalSettings(frameName)
|
|
|
|
local handle = MoveIt:GetFrameHandle(frameName)
|
|
|
|
return
|
|
{
|
|
Width = handle:GetWidth(),
|
|
Height = handle:GetHeight()
|
|
}
|
|
|
|
end
|