summaryrefslogtreecommitdiffhomepage
path: root/config/menuhost.lua
blob: 878ec71bce4fea570d86392e761d11bcca0b5a47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local menu = ...

local button = require "button"
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("icons_i", love.graphics.newImage("assets/placeholder-map-icon.png"))
		:set("icons_q", require "mapicons")
		:set("shape", "panorama")
		: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)
	,
	button:new(menu)
		:setText("Go back")
		:setPosition(bx,117)
		:set("active", function (self)
				self.parent:load("menumain")
			end)
	,
}