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

@ -42,6 +42,8 @@ text.server.kicked.recentKick=You have been kicked recently.\nWait before connec
text.server.connected={0} has joined.
text.server.disconnected={0} has disconnected.
text.nohost=Can't host server on a custom map!
text.host.info=The [accent]host[] button hosts a server on ports [scarlet]6567[] and [scarlet]6568.[]\nAnybody on the same [LIGHT_GRAY]wifi or local network[] should be able to see your server in their server list.\n\nIf you want people to be able to connect from anywhere by IP, [accent]port forwarding[] is required.\n\n[LIGHT_GRAY]Note: If someone is experiencing trouble connecting to your LAN game, make sure you have allowed Mindustry access to your local network in your firewall settings.
text.join.info=Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[LIGHT_GRAY]Note: There is no automatic global server list; if you want to connect to someone by IP, you would need to ask the host for their IP.
text.hostserver=Host Server
text.host=Host
text.hosting=[accent]Opening server...

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Fri Mar 23 22:41:58 EDT 2018
#Sat Mar 24 12:13:33 EDT 2018
version=release
androidBuildCode=458
androidBuildCode=459
name=Mindustry
code=3.4
build=custom build

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();