mirror of
https://github.com/notwa/mm
synced 2024-11-04 20:19:02 -08:00
abstract brush again, update titles
This commit is contained in:
parent
e75a9be4e3
commit
e6ad4d05d8
2 changed files with 6 additions and 4 deletions
|
@ -114,7 +114,7 @@ local playas_menu = oot and Menu{
|
|||
|
||||
local main_menu = Menu{
|
||||
Screen{
|
||||
Text("Main Menu"),
|
||||
Text("Main Menu #1/2"),
|
||||
Toggle("L to Levitate", levitate),
|
||||
Toggle("A to Run Fast", supersonic),
|
||||
Hold("Levitate", levitate),
|
||||
|
@ -123,6 +123,7 @@ local main_menu = Menu{
|
|||
Back(),
|
||||
},
|
||||
Screen{
|
||||
Text("Main Menu #2/2"),
|
||||
Oneshot("Kill Link", self_destruct),
|
||||
Flags("some flags"),
|
||||
Text("k"),
|
||||
|
@ -138,7 +139,7 @@ local input = InputHandler{
|
|||
right = "P1 DPad R",
|
||||
}
|
||||
|
||||
local handle = MenuHandler(main_menu)
|
||||
local handle = MenuHandler(main_menu, T_TL)
|
||||
|
||||
while mm or oot do
|
||||
local ctrl, pressed = input:update()
|
||||
|
|
|
@ -274,9 +274,10 @@ function Menu:draw(brush, y)
|
|||
end
|
||||
|
||||
MenuHandler = Class()
|
||||
function MenuHandler:init(main_menu)
|
||||
function MenuHandler:init(main_menu, brush)
|
||||
self.main_menu = main_menu
|
||||
self.backstack = {}
|
||||
self.brush = brush
|
||||
self.menu = nil
|
||||
end
|
||||
|
||||
|
@ -306,5 +307,5 @@ function MenuHandler:update(ctrl, pressed)
|
|||
if new_menu and new_menu ~= self.menu then new_menu:focus() end
|
||||
self.menu = new_menu
|
||||
end
|
||||
if self.menu then self.menu:draw(T_TL, 0) end
|
||||
if self.menu then self.menu:draw(self.brush, 0) end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue