From e6ad4d05d804553bbdf5e1f84486d6af1ea0999f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 26 May 2015 08:43:23 -0700 Subject: [PATCH] abstract brush again, update titles --- Lua/cheat menu.lua | 5 +++-- Lua/menu classes.lua | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Lua/cheat menu.lua b/Lua/cheat menu.lua index 032267c..e0eab85 100755 --- a/Lua/cheat menu.lua +++ b/Lua/cheat menu.lua @@ -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() diff --git a/Lua/menu classes.lua b/Lua/menu classes.lua index e5fcc05..c616dd8 100644 --- a/Lua/menu classes.lua +++ b/Lua/menu classes.lua @@ -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