Сууука

This commit is contained in:
IgorTimofeev 2024-01-29 15:28:45 +03:00
parent 53e98b6636
commit 5adaa7664f

View File

@ -395,7 +395,8 @@ local function workspaceStart(workspace, eventPullTimeout)
if isScreenEvent then if isScreenEvent then
if workspace.capturedObject then if workspace.capturedObject then
if workspace.capturedObject == object then if workspace.capturedObject == object then
govno = object.blockScreenEvents
elseif object.ignoresCapturedObject then elseif object.ignoresCapturedObject then
if not boundsX1 or not ( if not boundsX1 or not (
roundedX >= boundsX1 roundedX >= boundsX1
@ -2926,7 +2927,7 @@ local function inputCursorBlink(workspace, input, state)
workspace:draw() workspace:draw()
end end
local function inputStopInput(workspace, input) local function inputStopInput(input)
input.workspace.capturedObject = nil input.workspace.capturedObject = nil
input.workspace.focusedObject = nil input.workspace.focusedObject = nil
@ -2938,12 +2939,12 @@ local function inputStopInput(workspace, input)
input:setCursorPosition(unicode.len(input.text) + 1) input:setCursorPosition(unicode.len(input.text) + 1)
end end
end end
inputCursorBlink(input.workspace, input, false)
if input.onInputFinished then if input.onInputFinished then
input.onInputFinished(workspace, input) input.onInputFinished(workspace, input)
end end
inputCursorBlink(workspace, input, false)
end end
local function inputStartInput(input) local function inputStartInput(input)
@ -2976,7 +2977,9 @@ local function inputEventHandler(workspace, input, e1, e2, e3, e4, e5, e6, ...)
input:startInput() input:startInput()
end end
else else
inputStopInput(workspace, input) if focused then
inputStopInput(input)
end
end end
elseif e1 == "key_down" and focused then elseif e1 == "key_down" and focused then
@ -2992,10 +2995,11 @@ local function inputEventHandler(workspace, input, e1, e2, e3, e4, e5, e6, ...)
if input.history[#input.history] ~= input.text and unicode.len(input.text) > 0 then if input.history[#input.history] ~= input.text and unicode.len(input.text) > 0 then
table.insert(input.history, input.text) table.insert(input.history, input.text)
end end
input.historyIndex = #input.history input.historyIndex = #input.history
end end
inputStopInput(workspace, input) inputStopInput(input)
if input.onKeyDown then if input.onKeyDown then
input.onKeyDown(workspace, input, e1, e2, e3, e4, e5, e6, ...) input.onKeyDown(workspace, input, e1, e2, e3, e4, e5, e6, ...)