|
|
@ -40,17 +40,17 @@ function test.editfield_click()
|
|
|
|
expect.eq(5, e.cursor)
|
|
|
|
expect.eq(5, e.cursor)
|
|
|
|
|
|
|
|
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(0), function()
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(0), function()
|
|
|
|
e:onInput{_MOUSE_L_DOWN=true}
|
|
|
|
e:onInput{_MOUSE_L=true}
|
|
|
|
expect.eq(1, e.cursor)
|
|
|
|
expect.eq(1, e.cursor)
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(20), function()
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(20), function()
|
|
|
|
e:onInput{_MOUSE_L_DOWN=true}
|
|
|
|
e:onInput{_MOUSE_L=true}
|
|
|
|
expect.eq(5, e.cursor, 'should only seek to end of text')
|
|
|
|
expect.eq(5, e.cursor, 'should only seek to end of text')
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(2), function()
|
|
|
|
mock.patch(e, 'getMousePos', mock.func(2), function()
|
|
|
|
e:onInput{_MOUSE_L_DOWN=true}
|
|
|
|
e:onInput{_MOUSE_L=true}
|
|
|
|
expect.eq(3, e.cursor)
|
|
|
|
expect.eq(3, e.cursor)
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
end
|
|
|
|