summaryrefslogtreecommitdiffhomepage
path: root/config/menumain.lua
blob: 629284c13378433f4be372192b1b0bc3e4ffe5f2 (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 header = require "header"

local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
local button_x = width/2-29

return {
	button:new(menu)
		:setText("Start")
		:setPosition(button_x, 80)
		:set("active", function (self)
				self.parent:load("menustart")
			end)
	,
	button:new(menu)
		:setText("Join")
		:setPosition(button_x, 96)
	,
	button:new(menu)
		:setText("Settings")
		:setPosition(button_x, 112)
	,
	button:new(menu)
		:setText("Credits")
		:setPosition(button_x, 128)
	,
	button:new(menu)
		:setText("Exit")
		:setPosition(button_x, 144)
		:set("active", love.event.quit)
	,
	header:new(menu)
		:setText("Roflnauts")
		:setPosition(width/2,40)
	,
}