more modular menu
This commit is contained in:
parent
d091f3a6bc
commit
7df0478890
6 changed files with 178 additions and 117 deletions
24
menu/common.lua
Normal file
24
menu/common.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
require 'point'
|
||||
require 'button'
|
||||
|
||||
local buttonTopPos = Point:new( 240, 160 )
|
||||
local buttonBotPos = Point:new( 240, 280 )
|
||||
local buttonSize = Point:new( 320, 80 )
|
||||
local titlePos = Point:new( 240, 80 )
|
||||
|
||||
return {
|
||||
buttonTopPos = buttonTopPos,
|
||||
buttonBotPos = buttonBotPos,
|
||||
buttonSize = buttonSize,
|
||||
titlePos = titlePos,
|
||||
exitToMenuButton = Button:new(
|
||||
buttonBotPos,
|
||||
buttonSize,
|
||||
'Return to menu',
|
||||
nil,
|
||||
nil,
|
||||
function()
|
||||
Menu.current_state = MenuStateIndex.start
|
||||
end
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue