diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-24 22:14:10 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-24 22:14:10 +0200 |
commit | 65e2f701a6c0cfbf53506678771839f7f6d12cbf (patch) | |
tree | 8f25a5ea731ef69c316b9eac89c609ac4a868690 /config | |
parent | b19ec990880a3f2529ac8a7833337a0984094a23 (diff) | |
download | roflnauts-65e2f701a6c0cfbf53506678771839f7f6d12cbf.zip roflnauts-65e2f701a6c0cfbf53506678771839f7f6d12cbf.tar.gz roflnauts-65e2f701a6c0cfbf53506678771839f7f6d12cbf.tar.bz2 |
map selection
Diffstat (limited to 'config')
-rw-r--r-- | config/menuhost.lua | 13 | ||||
-rw-r--r-- | config/menuselect.lua | 2 |
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 |