From 87b154209f3af0948c7cf80955fd3a72f507ab9d Mon Sep 17 00:00:00 2001 From: atomic <146392884+Atomic-Laboratory@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:44:47 -0400 Subject: [PATCH] things I forgot to commit --- core/src/mindustry/net/ServerGroup.java | 8 ++++++++ core/src/mindustry/ui/dialogs/JoinDialog.java | 2 ++ 2 files changed, 10 insertions(+) diff --git a/core/src/mindustry/net/ServerGroup.java b/core/src/mindustry/net/ServerGroup.java index 694058f0503d..d8d480f935e4 100644 --- a/core/src/mindustry/net/ServerGroup.java +++ b/core/src/mindustry/net/ServerGroup.java @@ -24,10 +24,18 @@ public boolean hidden(){ return Core.settings.getBool(key() + "-hidden", false); } + public boolean favorite(){ + return Core.settings.getBool(key() + "-favorite", false); + } + public void setHidden(boolean hidden){ Core.settings.put(key() + "-hidden", hidden); } + public void setFavorite(boolean favorite){ + Core.settings.put(key() + "-favorite", favorite); + } + String key(){ return "server-" + (name.isEmpty() ? addresses.length == 0 ? "" : addresses[0] : name); } diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 3ca05b6c561e..b7f8b6055e5c 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -407,6 +407,8 @@ void refreshCommunity(){ if(group.prioritized){ addHeader(groupTable, group, hidden, false); + } else if (group.favorite()) { + addHeader(groupTable, group, hidden, true); } //table containing all groups for(String address : group.addresses){