aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROllerozxa <temporaryemail4meh+github@gmail.com>2022-09-10 12:20:33 +0200
committerGitHub <noreply@github.com>2022-09-10 12:20:33 +0200
commit2133fc84c4e604e9365e99ac8dd597c8fb499b92 (patch)
treee7e39721685dac345276015acf24c99a1b53fa00
parent643971c948c1aef424f2a55e81414e30958c40ee (diff)
downloadminetest-2133fc84c4e604e9365e99ac8dd597c8fb499b92.tar.xz
Fix texture pack sorting in content tab (#12727)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
-rw-r--r--builtin/mainmenu/pkgmgr.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua
index 9fa9aebb0..384870ae1 100644
--- a/builtin/mainmenu/pkgmgr.lua
+++ b/builtin/mainmenu/pkgmgr.lua
@@ -177,7 +177,7 @@ function pkgmgr.get_texture_packs()
end
table.sort(retval, function(a, b)
- return a.name > b.name
+ return a.title:lower() < b.title:lower()
end)
return retval
@@ -787,6 +787,9 @@ end
--------------------------------------------------------------------------------
function pkgmgr.update_gamelist()
pkgmgr.games = core.get_games()
+ table.sort(pkgmgr.games, function(a, b)
+ return a.title:lower() < b.title:lower()
+ end)
end
--------------------------------------------------------------------------------