summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-07-15 01:00:06 +0200
committerAki <nthirtyone@gmail.com>2017-07-15 01:00:06 +0200
commit64adda89b9c1c53827d56391d5ccd9f0e9a4e93c (patch)
tree7bb9d4450df4aa2da1481d2c95a1590b5dcb6c3d
parent96fef88f56fdcdf95bc5783eb2b3b881ff435ba0 (diff)
downloadroflnauts-64adda89b9c1c53827d56391d5ccd9f0e9a4e93c.zip
roflnauts-64adda89b9c1c53827d56391d5ccd9f0e9a4e93c.tar.gz
roflnauts-64adda89b9c1c53827d56391d5ccd9f0e9a4e93c.tar.bz2
Making new win screen based on Menu and SceneManager
-rw-r--r--config/menus/win.lua22
-rw-r--r--not/Menu.lua1
2 files changed, 23 insertions, 0 deletions
diff --git a/config/menus/win.lua b/config/menus/win.lua
new file mode 100644
index 0000000..1d0918d
--- /dev/null
+++ b/config/menus/win.lua
@@ -0,0 +1,22 @@
+local menu = ...
+
+local Header = require "not.Header"
+local Element = require "not.Element"
+
+local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale()
+
+return {
+ Element(menu)
+ :setPosition(width/2, 18)
+ :set("draw", function (self, scale)
+ local x,y = self:getPosition()
+ love.graphics.setColor(255, 255, 255, 255)
+ love.graphics.printf("rofl, now kill yourself", x*scale, y*scale, 160, "center", 0, scale, scale, 80, 3)
+ end)
+ :set("focus", function () return true end)
+ ,
+ Header(menu)
+ :setText("WINNER")
+ :setPosition(width/2,40)
+ ,
+}
diff --git a/not/Menu.lua b/not/Menu.lua
index a837045..e0e4064 100644
--- a/not/Menu.lua
+++ b/not/Menu.lua
@@ -31,6 +31,7 @@ function Menu:new (name)
if Menu.sprite == nil then
Menu.sprite = love.graphics.newImage("assets/menu.png")
end
+ -- musicPlayer calls should be moved to menu files; see issue with new win screen
musicPlayer:setTrack("menu.ogg")
musicPlayer:play()
self.elements = {}