1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 05:17:50 +03:00

Support for local server discovery on Steam

This commit is contained in:
Anuken 2020-06-18 19:23:42 -04:00
parent daefe6bc1f
commit 15623fbe5c
2 changed files with 4 additions and 2 deletions

View File

@ -373,7 +373,7 @@ public class UI implements ApplicationListener, Loadable{
cont.add((text.startsWith("$") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
cont.row();
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()));
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()), true);
cont.button("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
cont.button("$ok", this::hide).size(110, 50).fillX().left();

View File

@ -160,7 +160,9 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
smat.addRequestLobbyListResultCountFilter(32);
smat.requestLobbyList();
lobbyCallback = callback;
lobbyDoneCallback = done;
//after the steam lobby is done discovering, look for local network servers.
lobbyDoneCallback = () -> provider.discoverServers(callback, done);
}
@Override