Added host/join info text

This commit is contained in:
Anuken
2018-03-24 12:25:56 -04:00
parent 2dd67c229c
commit 8eb2a13efd
5 changed files with 17 additions and 5 deletions

View File

@@ -221,8 +221,8 @@ public class UI extends SceneModule{
public void showInfo(String info){
new Dialog("$text.info.title", "dialog"){{
content().margin(15).add(info);
buttons().addButton("$text.ok", this::hide).size(90, 50).pad(4).get().getLabelCell().width(400f).get().setWrap(true);
content().margin(15).add(info).width(600f).get().setWrap(true);
buttons().addButton("$text.ok", this::hide).size(90, 50).pad(4);
}}.show();
}

View File

@@ -40,10 +40,12 @@ public class HostDialog extends FloatingDialog{
});
}).size(50f, 54f).get();
button.update(() -> button.getStyle().imageUpColor = player.getColor());
}).width(w).height(70f).pad(4);
}).width(w).height(70f).pad(4).colspan(3);
content().row();
content().add().width(65f);
content().addButton("$text.host", () -> {
ui.loadfrag.show("$text.hosting");
Timers.runTask(5f, () -> {
@@ -57,5 +59,7 @@ public class HostDialog extends FloatingDialog{
hide();
});
}).width(w).height(70f);
content().addButton("?", () -> ui.showInfo("$text.host.info")).size(65f, 70f).padLeft(6f);
}
}

View File

@@ -38,8 +38,14 @@ public class JoinDialog extends FloatingDialog {
loadServers();
buttons().add().width(60f);
buttons().add().growX();
addCloseButton();
buttons().add().growX();
buttons().addButton("?", () -> ui.showInfo("$text.join.info")).size(60f, 64f);
add = new FloatingDialog("$text.joingame.title");
add.content().add("$text.joingame.ip").padRight(5f).left();