Сделал нормальный селектор, т.к. старый - говно говна

This commit is contained in:
IgorTimofeev 2024-01-03 11:13:18 +03:00
parent 66a09b5080
commit 6c01071548

View File

@ -172,6 +172,7 @@ end
selector.eventHandler = tool.eventHandler selector.eventHandler = tool.eventHandler
selector.draw = function() selector.draw = function()
-- Border
local temp = true local temp = true
for x = selector.x + 1, selector.x + selector.width - 2 do for x = selector.x + 1, selector.x + selector.width - 2 do
@ -194,9 +195,11 @@ selector.draw = function()
screen.drawText(selector.x + selector.width - 1, selector.y, 0x0, "") screen.drawText(selector.x + selector.width - 1, selector.y, 0x0, "")
screen.drawText(selector.x, selector.y + selector.height - 1, 0x0, "") screen.drawText(selector.x, selector.y + selector.height - 1, 0x0, "")
screen.drawText(selector.x, selector.y, 0x66FF80, "") -- Corners
screen.drawText(selector.x + selector.width - 1, selector.y + selector.height - 1, 0x66FF80, "") screen.drawText(touchX, touchY, 0x66FF80, "")
screen.drawText(dragX, dragY, 0x66FF80, "")
-- Size
temp = selector.width .. " px" temp = selector.width .. " px"
screen.drawText(math.floor(selector.x + selector.width / 2 - #temp / 2), selector.y + selector.height, 0xFFFFFF, temp) screen.drawText(math.floor(selector.x + selector.width / 2 - #temp / 2), selector.y + selector.height, 0xFFFFFF, temp)