mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
- Added documentation to controllers
tags : #story[1245]
This commit is contained in:
@@ -105,6 +105,12 @@ public class ViewManager {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the decorator when a new one is created (and ideally the old one destroyed)
|
||||
* Also allows injection of buttons into the decorator for custom functions.
|
||||
*
|
||||
* @param newDecorator The new JFXDecorator to handle the game window.
|
||||
*/
|
||||
private void setDecorator(JFXDecorator newDecorator) {
|
||||
decorator = newDecorator;
|
||||
|
||||
@@ -152,6 +158,9 @@ public class ViewManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a PC has compatibility with the bonjour protocol for server detection.
|
||||
*/
|
||||
private void checkCompatibility() {
|
||||
if (BonjourInstallChecker.isBonjourSupported()) {
|
||||
BonjourInstallChecker.openInstallUrl();
|
||||
@@ -209,6 +218,11 @@ public class ViewManager {
|
||||
return playerList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the view to the Lobby Screen
|
||||
* @param disableReadyButton Boolean value so that clients can't try start a game.
|
||||
* @return A LobbyController object for the Lobby Screen.
|
||||
*/
|
||||
public LobbyController goToLobby(Boolean disableReadyButton) {
|
||||
FXMLLoader loader = loadFxml("/views/LobbyView.fxml");
|
||||
|
||||
@@ -226,6 +240,11 @@ public class ViewManager {
|
||||
return loader.getController();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the view for the race. Creating a new decorator and destroying the old one.
|
||||
* @return A RaceViewController for the race view screen.
|
||||
*/
|
||||
|
||||
public RaceViewController loadRaceView() {
|
||||
FXMLLoader loader = loadFxml("/views/RaceView.fxml");
|
||||
|
||||
@@ -277,6 +296,7 @@ public class ViewManager {
|
||||
return loader.getController();
|
||||
}
|
||||
|
||||
// TODO: 12/09/17 ajm412: Why is this here? is there no better way we can do this? Ideally inside the LobbyController.
|
||||
public JFXDialog loadCustomizationDialog(StackPane parent, LobbyController lobbyController,
|
||||
Color playerColor, String name) {
|
||||
FXMLLoader dialog = loadFxml("/views/dialogs/BoatCustomizeDialog.fxml");
|
||||
|
||||
Reference in New Issue
Block a user