Class WaitingRoomController
java.lang.Object
it.polimi.ingsw.eriantys.client.gui.controllers.Controller
it.polimi.ingsw.eriantys.client.gui.controllers.WaitingRoomController
- All Implemented Interfaces:
javafx.fxml.Initializable
A class representing the controller for the
WAITING_ROOM
scene.- See Also:
-
SceneName.WAITING_ROOM
Scene
-
Field Summary
Fields inherited from class it.polimi.ingsw.eriantys.client.gui.controllers.Controller
app, client, showError, showInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.layout.Pane
A getter for thePane
object associated with the FXML tag of highest level in the*.fxml
file associated withthis
.void
initialize
(URL url, ResourceBundle resourceBundle) Gets all the child nodes representing the elements of the scene from the FXML.void
promptSelection
(List<String> towerColors, List<String> wizards) Gets the information about tower colors and wizards from passed parameters and draws all the elements in a popup.void
Sets the name of the lobby.void
setTowerColor
(String towerColor) Sets the user'sTowerColor
literal and shows the next popup.void
Sets the user'sWizard
literal.void
updatePlayers
(List<String> players) Gets the information about the lobby from passed parameter and shows the list of connected users in the scene.void
Gets the information about selected literals from passed parameters and shows the mapping in the scene.Methods inherited from class it.polimi.ingsw.eriantys.client.gui.controllers.Controller
applyGrayscale, applyGreenShade, onChangeScene, roundBorders, setApp, setClient, setShowError, setShowInfo
-
Constructor Details
-
WaitingRoomController
public WaitingRoomController()
-
-
Method Details
-
initialize
Gets all the child nodes representing the elements of the scene from the FXML. Associates the event handler with the button on the scene. -
getTopLevelPane
public javafx.scene.layout.Pane getTopLevelPane()Description copied from class:Controller
A getter for thePane
object associated with the FXML tag of highest level in the*.fxml
file associated withthis
. The method is called in order to process a popup. Any controller should override the method if necessary.- Specified by:
getTopLevelPane
in classController
- Returns:
- the highest level
Pane
-
setText
Sets the name of the lobby.- Parameters:
id
- the numerical identifier of the lobby
-
updatePlayers
Gets the information about the lobby from passed parameter and shows the list of connected users in the scene.- Parameters:
players
- the users inside the lobby
-
updateSelections
Gets the information about selected literals from passed parameters and shows the mapping in the scene.- Parameters:
towerColors
- the mapping between usernames and previously selectedTowerColor
literalswizards
- the mapping between usernames and previously selectedWizard
literals
-
promptSelection
Gets the information about tower colors and wizards from passed parameters and draws all the elements in a popup.- Parameters:
towerColors
- the availableTowerColor
literals to choosewizards
- the availableWizard
literals to choose
-
setTowerColor
Sets the user'sTowerColor
literal and shows the next popup.- Parameters:
towerColor
- the selectedTowerColor
literal.
-
setWizard
Sets the user'sWizard
literal.- Parameters:
wizard
- the selectedWizard
literal.
-