mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
wipsshit
This commit is contained in:
parent
2bc9152514
commit
00fe7f2617
12
main.lua
12
main.lua
@ -1,12 +1,8 @@
|
|||||||
local pop = require "pop" --TODO tell user that pop must be required with SLASHES
|
local pop = require "pop" --TODO tell user that pop must be required with SLASHES
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
local box = pop.box() -- returns the box element
|
pop.box() -- returns the box element
|
||||||
-- or pop.create("box") (this is what is actually called when you call pop.box())
|
-- or pop.create("box") (this is what is actually called when you call pop.box())
|
||||||
|
|
||||||
--TODO uncomment these once text is implemented!
|
|
||||||
--local text = pop.text(box) -- box will become the parent element of text
|
|
||||||
--text:setText("Hello and welcome to an example of Pop.Box, a very small shitty example.")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.draw()
|
function love.draw()
|
||||||
@ -22,13 +18,7 @@ function love.mousereleased(button, x, y)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function love.keypressed(key)
|
function love.keypressed(key)
|
||||||
if not pop.keypressed(key, unicode) then
|
|
||||||
if key == "escape" then
|
if key == "escape" then
|
||||||
love.event.quit()
|
love.event.quit()
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function love.keyreleased(key)
|
|
||||||
pop.keyreleased(key)
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user