diff --git a/src/main/java/com/terraformersmc/modmenu/config/ModMenuConfig.java b/src/main/java/com/terraformersmc/modmenu/config/ModMenuConfig.java index fc11fd79..746d8540 100644 --- a/src/main/java/com/terraformersmc/modmenu/config/ModMenuConfig.java +++ b/src/main/java/com/terraformersmc/modmenu/config/ModMenuConfig.java @@ -89,8 +89,9 @@ public static SimpleOption[] asOptions() { } public enum Sorting { - ASCENDING(Comparator.comparing(mod -> mod.getTranslatedName() - .toLowerCase(Locale.ROOT))), DESCENDING(ASCENDING.getComparator().reversed()); + ASCENDING(Comparator.comparing(mod -> mod.getTranslatedName().toLowerCase(Locale.ROOT))), + DESCENDING(ASCENDING.getComparator().reversed()), + HAS_UPDATE(Comparator.comparing(Mod::hasUpdate).reversed()); private final Comparator comparator; diff --git a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java index 7d6a20d6..580d0e59 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java @@ -141,7 +141,7 @@ protected void init() { Text sortingText = ModMenuConfig.SORTING.getButtonText(); Text librariesText = ModMenuConfig.SHOW_LIBRARIES.getButtonText(); - int sortingWidth = textRenderer.getWidth(sortingText) + 20; + int sortingWidth = textRenderer.getWidth(sortingText) + 28; int librariesWidth = textRenderer.getWidth(librariesText) + 20; this.filtersWidth = librariesWidth + sortingWidth + 2; diff --git a/src/main/resources/assets/modmenu/lang/en_us.json b/src/main/resources/assets/modmenu/lang/en_us.json index 2c779bef..66d57169 100644 --- a/src/main/resources/assets/modmenu/lang/en_us.json +++ b/src/main/resources/assets/modmenu/lang/en_us.json @@ -109,6 +109,7 @@ "option.modmenu.sorting": "Sort", "option.modmenu.sorting.ascending": "A-Z", "option.modmenu.sorting.descending": "Z-A", + "option.modmenu.sorting.has_update": "Has Update", "option.modmenu.show_libraries": "Libraries", "option.modmenu.show_libraries.true": "Shown", "option.modmenu.show_libraries.false": "Hidden",