summaryrefslogtreecommitdiffhomepage
path: root/config/menus/main.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-07-14 21:54:46 +0200
committerAki <nthirtyone@gmail.com>2017-07-14 21:54:46 +0200
commit96fef88f56fdcdf95bc5783eb2b3b881ff435ba0 (patch)
treea07a06c784b1768b323e4bfd551676c1052e617f /config/menus/main.lua
parent9af261cd204b999e6b2b5a44d5c5eb768f84c49d (diff)
downloadroflnauts-96fef88f56fdcdf95bc5783eb2b3b881ff435ba0.zip
roflnauts-96fef88f56fdcdf95bc5783eb2b3b881ff435ba0.tar.gz
roflnauts-96fef88f56fdcdf95bc5783eb2b3b881ff435ba0.tar.bz2
Background in menu moved to separate class
Weird noise added to menu configs to use single MenuBackground instance Initial pause menu added
Diffstat (limited to 'config/menus/main.lua')
-rw-r--r--config/menus/main.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/menus/main.lua b/config/menus/main.lua
index d65c57d..85e926f 100644
--- a/config/menus/main.lua
+++ b/config/menus/main.lua
@@ -1,4 +1,4 @@
-local menu = ...
+local menu, background = ...
local Button = require "not.Button"
local Header = require "not.Header"
@@ -9,7 +9,12 @@ local bx = width/2-29
local awesometwo = love.graphics.newImage("assets/two.png")
+if background == nil or not background:is(require "not.MenuBackground") then
+ background = require "not.MenuBackground"(menu)
+end
+
return {
+ background,
Button(menu)
:setText("Start")
:setPosition(bx, 80)
@@ -56,4 +61,4 @@ return {
:setText("Roflnauts")
:setPosition(width/2,40)
,
-} \ No newline at end of file
+}