Alphabetical sorting of texture packs in menu (fixes #3487)

master
jeanpatrick.guerrero@gmail.com 2015-12-25 22:10:29 +01:00 committed by est31
parent e834e83ed8
commit 382ab969d4
1 changed files with 5 additions and 1 deletions

View File

@ -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