diff options
author | Rui914 <rui914t@gmail.com> | 2016-03-31 17:26:39 +0900 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-04-08 02:25:04 -0400 |
commit | 92d4a738435c4b8d5944375c596befcc15b3f47c (patch) | |
tree | dd536cc1559cecc52da61c1b87f1519eceb0a664 /builtin/mainmenu/tab_texturepacks.lua | |
parent | 27ee8d8943080a5dd735c9faa47c726604bafdff (diff) | |
download | minetest-92d4a738435c4b8d5944375c596befcc15b3f47c.tar.gz minetest-92d4a738435c4b8d5944375c596befcc15b3f47c.tar.bz2 minetest-92d4a738435c4b8d5944375c596befcc15b3f47c.zip |
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
Diffstat (limited to 'builtin/mainmenu/tab_texturepacks.lua')
-rw-r--r-- | builtin/mainmenu/tab_texturepacks.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/mainmenu/tab_texturepacks.lua b/builtin/mainmenu/tab_texturepacks.lua index 2b0c77afc..a102fd61d 100644 --- a/builtin/mainmenu/tab_texturepacks.lua +++ b/builtin/mainmenu/tab_texturepacks.lua @@ -123,10 +123,10 @@ local function main_button_handler(tabview, fields, name, tabdata) end -------------------------------------------------------------------------------- -tab_texturepacks = { +return { name = "texturepacks", caption = fgettext("Texturepacks"), cbf_formspec = get_formspec, cbf_button_handler = main_button_handler, on_change = nil - } +} |