mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Added server list updates, and added lobby
- Server list updates when a server is added/removed - Player can host a server - Lobby view shows players connected Tags: #pair[mra106, hyi25] #story[1245]
This commit is contained in:
@@ -36,7 +36,7 @@ import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class StartScreenController implements Initializable {
|
||||
public class StartScreenController implements Initializable{
|
||||
|
||||
@FXML
|
||||
private Label headText;
|
||||
@@ -47,38 +47,8 @@ public class StartScreenController implements Initializable {
|
||||
private Node serverList;
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(StartScreenController.class);
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
// gameClient = new GameClient(holder);
|
||||
|
||||
try {
|
||||
ServerListener.getInstance().setDelegate(this);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
joinLobbyButton.setOnAction(event -> joinLobbyClicked());
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * Loads the fxml content into the parent pane
|
||||
// * @param jfxUrl
|
||||
// * @return the controller of the fxml
|
||||
// */
|
||||
// private Object setContentPane(String jfxUrl) {
|
||||
// try {
|
||||
// AnchorPane contentPane = (AnchorPane) startScreen2.getParent();
|
||||
// contentPane.getChildren().removeAll();
|
||||
// contentPane.getChildren().clear();
|
||||
// contentPane.getStylesheets().add(getClass().getResource("/css/master.css").toString());
|
||||
// FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(jfxUrl));
|
||||
// contentPane.getChildren().addAll((Pane) fxmlLoader.load());
|
||||
//
|
||||
// return fxmlLoader.getController();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
private List<ServerDescription> servers;
|
||||
|
||||
private void setInitialDropShadow(){
|
||||
DropShadow dropShadow = new DropShadow();
|
||||
@@ -114,5 +84,8 @@ public class StartScreenController implements Initializable {
|
||||
|
||||
setInitialDropShadow();
|
||||
preloadServerListView();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user