Merge template-live-editor-mobile
This commit is contained in:
commit
827a162a1b
6
app.lua
6
app.lua
|
@ -70,10 +70,12 @@ function love.run()
|
|||
-- other methods dispatch to real hardware
|
||||
|
||||
App.screen.resize = function(width, height, flags)
|
||||
local has_text_input = love.keyboard.hasTextInput()
|
||||
love.window.setMode(width, height, flags)
|
||||
if OS == 'iOS' then
|
||||
love.keyboard.setTextInput(true) -- magic. iOS seems to lose textinput events after calls to setMode.
|
||||
-- https://github.com/love2d/love/issues/1959
|
||||
love.keyboard.setTextInput(has_text_input) -- iOS recreates the window on setMode
|
||||
-- this property is part of the window
|
||||
-- https://github.com/love2d/love/issues/1959
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
end
|
||||
end
|
||||
|
|
1
edit.lua
1
edit.lua
|
@ -153,7 +153,6 @@ function edit.quit(State)
|
|||
end
|
||||
|
||||
function edit.mouse_press(State, x,y, mouse_button)
|
||||
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
|
||||
if State.search_term then return end
|
||||
State.mouse_down = mouse_button
|
||||
--? print_and_log(('edit.mouse_press: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))
|
||||
|
|
Loading…
Reference in New Issue