aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorjeanpatrick.guerrero@gmail.com <jeanpatrick.guerrero@gmail.com>2015-12-25 22:10:29 +0100
committerest31 <MTest31@outlook.com>2015-12-26 21:53:12 +0100
commit382ab969d4de29cd5f74db2de433a37254d40d2a (patch)
tree72c1890859eb9a1fd8df35e06fdaa6735cde7873 /builtin
parente834e83ed8c1208dcfe945abf5900e278fa3f518 (diff)
downloadminetest-382ab969d4de29cd5f74db2de433a37254d40d2a.tar.gz
minetest-382ab969d4de29cd5f74db2de433a37254d40d2a.tar.bz2
minetest-382ab969d4de29cd5f74db2de433a37254d40d2a.zip
Alphabetical sorting of texture packs in menu (fixes #3487)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu/tab_texturepacks.lua6
1 files changed, 5 insertions, 1 deletions
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