From 0c2629ada1ba0f310c2e2c0ee307ab4719298a9a Mon Sep 17 00:00:00 2001 From: "theo@manjaro" Date: Fri, 4 Mar 2022 14:17:14 +0100 Subject: [PATCH] Tried Push library on mobile --- main.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/main.lua b/main.lua index 86578d1..c2ed43c 100644 --- a/main.lua +++ b/main.lua @@ -23,7 +23,7 @@ function love.load() lg.setDefaultFilter("nearest") if game.OS ~= "Horizon" then game:changesize(416,234) - love.window.setTitle('Overflown') + love.window.setTitle('Neutron') w,h = love.window.getDesktopDimensions() res = game.OSTYPE=="PC" push:setupScreen(game.WIDTH, game.HEIGHT, w, h, {fullscreen = true,resizable = res, pixelperfect = true}) @@ -34,9 +34,9 @@ function love.load() end function love.draw(screen) - if game.OSTYPE=="PC" then push:start() end + if game.OSTYPE~="Horizon" then push:start() end game:draw(screen) - if game.OSTYPE=="PC" then push:finish() end + if game.OSTYPE~="Horizon" then push:finish() end end function love.update() @@ -47,9 +47,7 @@ end function love.keypressed(key,scancode) game.inputs.keys[scancode] = true end - -function love.gamepadpressed(joystick, button) - game.inputs.buttons[button] = true +function love.gamepadpressed(joystick, button) game.inputs.buttons[button] = true end function love.keyreleased(key,scancode) @@ -70,7 +68,6 @@ end function love.mousepressed(x,y,button,istouch,presses) -- Format positions according to screen - if game.OS ~= "Horizon" then x,y = push:toGame(x,y) end