From 92d4a738435c4b8d5944375c596befcc15b3f47c Mon Sep 17 00:00:00 2001 From: Rui914 Date: Thu, 31 Mar 2016 17:26:39 +0900 Subject: Mainmenu: Refactor tab UI code - Use local variables for tabs in place of globals - Merge together if statements where possible - Replace manual table searching code with indexof where possible --- builtin/mainmenu/tab_simple_main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin/mainmenu/tab_simple_main.lua') diff --git a/builtin/mainmenu/tab_simple_main.lua b/builtin/mainmenu/tab_simple_main.lua index 434113b5f..b32418938 100644 --- a/builtin/mainmenu/tab_simple_main.lua +++ b/builtin/mainmenu/tab_simple_main.lua @@ -196,10 +196,10 @@ local function on_activate(type,old_tab,new_tab) end -------------------------------------------------------------------------------- -tab_simple_main = { +return { name = "main", caption = fgettext("Main"), cbf_formspec = get_formspec, cbf_button_handler = main_button_handler, on_change = on_activate - } +} -- cgit v1.2.3