diff options
| author | 1029chris <1029chris@gmail.com> | 2016-02-18 12:17:39 -0800 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-02-18 12:17:39 -0800 |
| commit | e3e8ff9601db614914bf6a07ea40ad456b98ae3f (patch) | |
| tree | c1fdbaff5fce304c2646257df4a98d873ec6d5ad | |
| parent | f9553d579e1da5b07a7327450204f96b0c41becc (diff) | |
Added fullscreen support
F4 to fullscreen, F5 to go back to windowed.
| -rw-r--r-- | conf.lua | 1 | ||||
| -rw-r--r-- | main.lua | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -4,5 +4,6 @@ function love.conf(t) t.version = "0.10.0" t.modules.joystick = false t.window.title = "Don't Get a Virus" + t.window.fullscreentype = "exclusive" t.window.fullscreen = false end @@ -22,12 +22,18 @@ function love.update(dt) sys.mouse.x = love.mouse.getX() sys.mouse.y = love.mouse.getY() if love.keyboard.isDown("escape") == true then + love.window.setMode(800, 600, {fullscreen=false}) love.event.quit() end if love.keyboard.isDown("u") == true and win[1].min == true then win[1].min = false win[2].min = false end + if love.keyboard.isDown("f4") == true then + love.window.setMode(800, 600, {fullscreen=true, fullscreentype="exclusive"}) + elseif love.keyboard.isDown("f5") == true then + love.window.setMode(800, 600, {fullscreen=false}) + end end function love.mousepressed(x, y, button) sys.mouse.p.x = x |
