From: jeanpatrick.guerrero@gmail.com Date: Fri, 25 Dec 2015 21:10:29 +0000 (+0100) Subject: Alphabetical sorting of texture packs in menu (fixes #3487) X-Git-Tag: 0.4.14~362 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=382ab969d4de29cd5f74db2de433a37254d40d2a;p=oweals%2Fminetest.git Alphabetical sorting of texture packs in menu (fixes #3487) --- diff --git a/builtin/mainmenu/tab_texturepacks.lua b/builtin/mainmenu/tab_texturepacks.lua index 5514d31f9..d8b9ba35f 100644 --- a/builtin/mainmenu/tab_texturepacks.lua +++ b/builtin/mainmenu/tab_texturepacks.lua @@ -17,12 +17,16 @@ -------------------------------------------------------------------------------- local function filter_texture_pack_list(list) - local retval = {fgettext("None")} + local retval = {} for _, item in ipairs(list) do if item ~= "base" then table.insert(retval, item) end end + + table.sort(retval) + table.insert(retval, 1, fgettext("None")) + return retval end