Regression fix / Slightly better server dialog

This commit is contained in:
Anuken
2019-06-29 13:19:53 -04:00
parent 576f0be4ab
commit d9ef79a7b5
2 changed files with 5 additions and 8 deletions

View File

@ -101,7 +101,7 @@ server.hostname = Host: {0}
server.edit = Edit Server
server.outdated = [crimson]Outdated Server![]
server.outdated.client = [crimson]Outdated Client![]
server.version = [lightgray]Version: {0} {1}
server.version = [gray]v{0} {1}
server.custombuild = [yellow]Custom Build
confirmban = Are you sure you want to ban this player?
confirmkick = Are you sure you want to kick this player?

View File

@ -97,7 +97,7 @@ public class JoinDialog extends FloatingDialog{
if(!buttons[0].childrenPressed()){
connect(server.ip, server.port);
}
}).width(targetWidth()).height(155f).pad(4f).get();
}).width(targetWidth()).height(130f).pad(4f).get();
button.getLabel().setWrap(true);
@ -190,14 +190,11 @@ public class JoinDialog extends FloatingDialog{
server.content.clear();
server.content.table(t -> {
t.add("[lightgray]" + host.name).width(targetWidth() - 10f).left().get().setEllipsis(true);
t.add("[lightgray]" + host.name + " " + versionString).width(targetWidth() - 10f).left().get().setEllipsis(true);
t.row();
t.add(versionString).left();
t.add("[lightgray]" + (host.players != 1 ? Core.bundle.format("players", host.players == 0 ? host.players : "[accent]" + host.players + "[lightgray]") : Core.bundle.format("players.single", "[accent]" + host.players + "[lightgray]"))).left();
t.row();
t.add("[lightgray]" + (host.players != 1 ? Core.bundle.format("players", host.players) :
Core.bundle.format("players.single", host.players))).left();
t.row();
t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + "[] / " + Core.bundle.format("save.wave", host.wave)).width(targetWidth() - 10f).left().get().setEllipsis(true);
t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + "[lightgray] / " + Core.bundle.format("save.wave", host.wave)).width(targetWidth() - 10f).left().get().setEllipsis(true);
}).expand().left().bottom().padLeft(12f).padBottom(8);
}