diff options
author | rubenwardy <rubenwardy@gmail.com> | 2016-12-27 23:26:36 +0000 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-02-10 17:59:17 +0000 |
commit | bb4db84bdbc7038a6ac495dd5f732f89ac40bfcc (patch) | |
tree | 0d9a52206c43938b8209650543a49fd554e8040d /builtin/mainmenu/tab_mods.lua | |
parent | 7760948b7ca436ce0c7d26140dcd3867e81c99c9 (diff) | |
download | minetest-bb4db84bdbc7038a6ac495dd5f732f89ac40bfcc.tar.gz minetest-bb4db84bdbc7038a6ac495dd5f732f89ac40bfcc.tar.bz2 minetest-bb4db84bdbc7038a6ac495dd5f732f89ac40bfcc.zip |
Use tree to list mods rather than textlist
Diffstat (limited to 'builtin/mainmenu/tab_mods.lua')
-rw-r--r-- | builtin/mainmenu/tab_mods.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/mainmenu/tab_mods.lua b/builtin/mainmenu/tab_mods.lua index 4a5b6c041..29afd8a4e 100644 --- a/builtin/mainmenu/tab_mods.lua +++ b/builtin/mainmenu/tab_mods.lua @@ -28,7 +28,8 @@ local function get_formspec(tabview, name, tabdata) local retval = "label[0.05,-0.25;".. fgettext("Installed Mods:") .. "]" .. - "textlist[0,0.25;5.1,5;modlist;" .. + "tablecolumns[color;tree;text]" .. + "table[0,0.25;5.1,5;modlist;" .. modmgr.render_modlist(modmgr.global_mods) .. ";" .. tabdata.selected_mod .. "]" @@ -127,8 +128,8 @@ end -------------------------------------------------------------------------------- local function handle_buttons(tabview, fields, tabname, tabdata) if fields["modlist"] ~= nil then - local event = core.explode_textlist_event(fields["modlist"]) - tabdata.selected_mod = event.index + local event = core.explode_table_event(fields["modlist"]) + tabdata.selected_mod = event.row return true end |