aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorChris B <1029chris@gmail.com>2015-12-29 21:52:38 -0800
committerChris B <1029chris@gmail.com>2015-12-29 21:52:38 -0800
commitd37cb881d850c5a210ed318f994e8e4780aaec9d (patch)
tree141cfd1625e8f6552529692c4427a21d95b98b8a /main.lua
parent7fabb1dec5631871ecc32ed0593638c8df19bb37 (diff)
Set variables, added escape, added rectangle
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.lua b/main.lua
index 16f6b18..bbc1c58 100644
--- a/main.lua
+++ b/main.lua
@@ -1,9 +1,19 @@
function love.load()
-
+ system = {}
+ system.width = love.graphics.getWidth()
+ system.height = love.graphics.getHeight()
+ system.mouse = {}
+ system.mouse.x = love.mouse.getX
+ system.mouse.y = love.mouse.getY
+ love.graphics.setBackgroundColor(0, 128, 128)
end
function love.update(dt)
-
+ system.mouse.x = love.mouse.getX
+ system.mouse.y = love.mouse.getY
+ if love.keyboard.isDown("escape") == true then
+ love.event.quit()
+ end
end
function love.draw()
-
+ love.graphics.rectangle("fill", 0, system.height-26, system.width, 26)
end