1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-12-12 16:58:05 +00:00

Window.reposition now allow changing the redirect buffer

See #270
This commit is contained in:
SquidDev
2019-09-13 20:55:20 +01:00
parent a802f25dd6
commit 49c37857d4
2 changed files with 25 additions and 1 deletions

View File

@@ -431,16 +431,20 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
return nX, nY
end
function window.reposition( nNewX, nNewY, nNewWidth, nNewHeight )
function window.reposition( nNewX, nNewY, nNewWidth, nNewHeight, newParent )
if type(nNewX) ~= "number" then expect(1, nNewX, "number") end
if type(nNewY) ~= "number" then expect(2, nNewY, "number") end
if nNewWidth ~= nil or nNewHeight ~= nil then
expect(3, nNewWidth, "number")
expect(4, nNewHeight, "number")
end
if newParent ~= nil and type(newParent) ~= "table" then expect(5, newParent, "table") end
nX = nNewX
nY = nNewY
if newParent then parent = newParent end
if nNewWidth and nNewHeight then
local tNewLines = {}
createEmptyLines( nNewWidth )