Package it.polimi.ingsw.view.gui
Class SceneController
java.lang.Object
it.polimi.ingsw.view.gui.SceneController
public class SceneController
extends java.lang.Object
Used to manages GUI's stages loading fxml files and conserve their root controllers
(Note that only one stage will be active at a time)
-
Constructor Summary
Constructors Constructor Description SceneController(Client client) -
Method Summary
Modifier and Type Method Description voidfatalError(java.lang.String error)ConnectionControllergetConnectionController()EndGameControllergetEndGameController()GameboardControllergetGameboardController()LoginControllergetLoginController()NumberOfPlayersControllergetNumberOfPlayersController()voidloadEndGameLose()Display lost (using the current stage)voidloadEndGameWin()Display victory (using the current stage)voidloadGameboard()Load the game board (closing the current stage and show in a new stage)voidloadLobby()Show a loading screen waiting for other players connection (using the current stage)voidloadLogin()Ask the user to insert username and gameID (using the current stage)voidloadNumberOfPlayer()Ask the user to insert the number of player of the game (using the current stage)voidstart(javafx.stage.Stage stage)Initialize the first stage and ask the user for server connectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SceneController
-
-
Method Details
-
start
public void start(javafx.stage.Stage stage)Initialize the first stage and ask the user for server connection -
loadLogin
public void loadLogin()Ask the user to insert username and gameID (using the current stage) -
loadLobby
public void loadLobby()Show a loading screen waiting for other players connection (using the current stage) -
loadNumberOfPlayer
public void loadNumberOfPlayer()Ask the user to insert the number of player of the game (using the current stage) -
loadGameboard
public void loadGameboard()Load the game board (closing the current stage and show in a new stage) -
loadEndGameWin
public void loadEndGameWin()Display victory (using the current stage) -
loadEndGameLose
public void loadEndGameLose()Display lost (using the current stage) -
getConnectionController
-
getLoginController
-
getNumberOfPlayersController
-
getGameboardController
-
getEndGameController
-
fatalError
public void fatalError(java.lang.String error)
-