mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
re-implemented existing functionality in UI
- Correct player count is shown in server list - Servers now advertise their capacity and number of players connected - Players can click join on the servers in the server list - Direct connect works - Can set max players / server name in host dialog - Server starts correctly when host clicked - Implemented boat customization - Implemented 'begin race button', and disabled it for players that aren't hosts - Added countdown timer in lobby - Fixed bug where app wouldn't close Tags: #story[1245]
This commit is contained in:
@@ -18,6 +18,7 @@ import javafx.scene.layout.VBox;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import seng302.gameServer.ServerDescription;
|
||||
import seng302.visualiser.GameClient;
|
||||
import seng302.visualiser.ServerListener;
|
||||
import seng302.visualiser.ServerListenerDelegate;
|
||||
|
||||
@@ -55,6 +56,7 @@ public class ServerListController implements Initializable, ServerListenerDelega
|
||||
|
||||
try {
|
||||
ServerListener.getInstance().setDelegate(this);
|
||||
System.out.println("Setting DH");
|
||||
} catch (IOException e) {
|
||||
logger.warn("Could not start Server Listener Delegate");
|
||||
}
|
||||
@@ -74,9 +76,8 @@ public class ServerListController implements Initializable, ServerListenerDelega
|
||||
}
|
||||
|
||||
private void goToDirectConnectLobby() {
|
||||
// TODO: 7/09/17 ajm412: Implement ability to connect to a lobby.
|
||||
serverHostName.setText("Invalid Host Name or Port Number");
|
||||
serverPortNumber.setText("");
|
||||
// TODO: 7/09/17 Error handling
|
||||
ViewManager.getInstance().getGameClient().runAsClient(serverHostName.getText(), Integer.parseInt(serverPortNumber.getText()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user