52 lines
915 B
Lua
52 lines
915 B
Lua
require 'menu.state'
|
|
require 'button'
|
|
require 'text'
|
|
require 'point'
|
|
require 'config'
|
|
|
|
local common = require 'menu.common'
|
|
|
|
local versionPos = Point:new( 0, 468 )
|
|
local versionSize = Point:new( 800 )
|
|
|
|
local startButton = Button:new(
|
|
common.buttonTopPos,
|
|
common.buttonSize,
|
|
'Start',
|
|
nil,
|
|
nil,
|
|
function()
|
|
Menu.current_state = MenuStateIndex.hidden
|
|
GameGrid = LevelHandler:first()
|
|
Menu.updateCellSize()
|
|
end
|
|
)
|
|
|
|
local exitGameButton = Button:new(
|
|
common.buttonBotPos,
|
|
common.buttonSize,
|
|
'Exit',
|
|
nil,
|
|
nil,
|
|
function()
|
|
love.event.quit()
|
|
end
|
|
)
|
|
|
|
local title = Text:new(
|
|
common.titlePos,
|
|
common.buttonSize,
|
|
'Lines'
|
|
)
|
|
|
|
local versionText = Text:new(
|
|
versionPos,
|
|
versionSize,
|
|
string.format("Version %s", VERSION),
|
|
'left'
|
|
)
|
|
|
|
return MenuState:new(
|
|
{ startButton, exitGameButton },
|
|
{ title, versionText }
|
|
)
|