WIP marker changes, fix server name not appearing for saved hosts in join dialog
This commit is contained in:
@@ -247,10 +247,10 @@ public class JoinDialog extends BaseDialog{
|
||||
void setupServer(Server server, Host host){
|
||||
server.lastHost = host;
|
||||
server.content.clear();
|
||||
buildServer(host, server.content, false);
|
||||
buildServer(host, server.content, false, true);
|
||||
}
|
||||
|
||||
void buildServer(Host host, Table content, boolean local){
|
||||
void buildServer(Host host, Table content, boolean local, boolean addName){
|
||||
content.top().left();
|
||||
boolean isBanned = local && Vars.steam && host.description != null && host.description.equals("[banned]");
|
||||
String versionString = getVersionString(host) + (isBanned ? "[red] [banned]" : "");
|
||||
@@ -261,7 +261,7 @@ public class JoinDialog extends BaseDialog{
|
||||
|
||||
Color color = Pal.gray;
|
||||
|
||||
if(local){
|
||||
if(addName){
|
||||
content.table(Tex.whiteui, t -> {
|
||||
t.left();
|
||||
t.setColor(color);
|
||||
@@ -513,7 +513,7 @@ public class JoinDialog extends BaseDialog{
|
||||
|
||||
button[0].row();
|
||||
|
||||
buildServer(host, button[0].table(t -> {}).grow().get(), false);
|
||||
buildServer(host, button[0].table(t -> {}).grow().get(), false, false);
|
||||
|
||||
if((container.getChildren().size) % columns() == 0){
|
||||
container.row();
|
||||
@@ -544,7 +544,7 @@ public class JoinDialog extends BaseDialog{
|
||||
local.row();
|
||||
}
|
||||
|
||||
local.button(b -> buildServer(host, b, true), style, () -> {
|
||||
local.button(b -> buildServer(host, b, true, true), style, () -> {
|
||||
Events.fire(new ClientPreConnectEvent(host));
|
||||
safeConnect(host.address, host.port, host.version);
|
||||
}).width(w).top().left().growY();
|
||||
|
||||
Reference in New Issue
Block a user