summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/menuhost.lua13
-rw-r--r--config/menuselect.lua2
2 files changed, 14 insertions, 1 deletions
diff --git a/config/menuhost.lua b/config/menuhost.lua
index 3ad10db..53972b3 100644
--- a/config/menuhost.lua
+++ b/config/menuhost.lua
@@ -6,11 +6,24 @@ local selector = require "selector"
local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
local bx = width/2-29
+local map_selector = selector:new(menu)
+
return {
+ map_selector
+ :setPosition(width/2, 10)
+ :setSize(80, 42)
+ :setMargin(0)
+ :set("global", true)
+ :set("list", require "maplist")
+ :set("sprite", love.graphics.newImage("assets/placeholder-map-icon.png"))
+ :set("quads", require "mapicons")
+ :init()
+ ,
button:new(menu)
:setText("Select")
:setPosition(bx,101)
:set("active", function (self)
+ MAP = map_selector:getFullSelection(true)[1][1]
self.parent:load("menuselect")
end)
,
diff --git a/config/menuselect.lua b/config/menuselect.lua
index af71b5f..20ea607 100644
--- a/config/menuselect.lua
+++ b/config/menuselect.lua
@@ -27,7 +27,7 @@ return {
:set("active", function (self)
local nauts = naut_selector:getFullSelection(false)
if #nauts > 1 then
- changeScene(World:new(nil, nauts))
+ changeScene(World:new(MAP, nauts))
else
self:blink()
end