Fixed copy/cut with scrolling

This commit is contained in:
LDDestroier 2018-11-16 00:01:50 -05:00 committed by GitHub
parent 4a58601ab0
commit 502e1771da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -2118,6 +2118,10 @@ local selectRegion = function()
end
end
local output = {}
pos[1][1] = pos[1][1] + paint.scrollX
pos[2][1] = pos[1][1] + paint.scrollX
pos[1][2] = pos[1][1] + paint.scrollY
pos[2][2] = pos[1][1] + paint.scrollY
for k,v in pairs(paintEncoded[frame]) do
if v.x >= pos[1][1] and v.x <= pos[2][1] then
if v.y >= pos[1][2] and v.y <= pos[2][2] then
@ -2178,7 +2182,7 @@ end
local editCut = function()
local board = bottomPrompt("Cut to board: ")
renderAllPAIN()
renderBottomBar("Select region to copy.")
renderBottomBar("Select region to cut.")
local selectedDots, x1, y1, x2, y2 = selectRegion()
theClipboard[board] = selectedDots
local dot