Partial 7.0 merge - API preview

This commit is contained in:
Anuken
2021-06-02 11:08:08 -04:00
parent ea75a357ca
commit 28b235ef07
531 changed files with 12356 additions and 6286 deletions

View File

@@ -50,9 +50,7 @@ public class JoinDialog extends BaseDialog{
addCloseButton();
buttons.add().growX().width(-1);
if(!steam){
buttons.button("?", () -> ui.showInfo("@join.info")).size(60f, 64f).width(-1);
}
if(!steam) buttons.button("?", () -> ui.showInfo("@join.info")).size(60f, 64f);
add = new BaseDialog("@joingame.title");
add.cont.add("@joingame.ip").padRight(5f).left();
@@ -97,8 +95,12 @@ public class JoinDialog extends BaseDialog{
});
onResize(() -> {
setup();
refreshAll();
//only refresh on resize when the minimum dimension is smaller than the maximum preferred width
//this means that refreshes on resize will only happen for small phones that need the list to fit in portrait mode
if(Math.min(Core.graphics.getWidth(), Core.graphics.getHeight()) / Scl.scl() * 0.9f < 500f){
setup();
refreshAll();
}
});
}
@@ -402,6 +404,7 @@ public class JoinDialog extends BaseDialog{
global.background(null);
float w = targetWidth();
//TODO looks bad
container.button(b -> buildServer(host, b), Styles.cleart, () -> {
Events.fire(new ClientPreConnectEvent(host));
if(!Core.settings.getBool("server-disclaimer", false)){