From 91a7dc616017a075c59e2111290477d0f12dc95a Mon Sep 17 00:00:00 2001 From: DBFBlackbull Date: Sat, 2 Aug 2025 16:52:15 +0200 Subject: [PATCH] config: keep general category on top --- config.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config.lua b/config.lua index 0ad59f5..8c4e506 100644 --- a/config.lua +++ b/config.lua @@ -123,7 +123,19 @@ settings.load = function(self) local entrysize = 22 local previous = nil - for category, entries in ShaguTweaks.spairs(gui) do + local sortedKeys = {} + for key, value in pairs(gui) do + table.insert(sortedKeys, key) + end + + table.sort(sortedKeys, function(a, b) + if a == T["General"] then return true end + if b == T["General"] then return false end + return a < b + end) + + for _, category in ipairs(sortedKeys) do + local entries = gui[category] local entry, spacing = 1, 22 local height = 0