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_ROOMScene
-
Field Summary
Fields inherited from class it.polimi.ingsw.eriantys.client.gui.controllers.Controller
app, client, showError, showInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.layout.PaneA getter for thePaneobject associated with the FXML tag of highest level in the*.fxmlfile associated withthis.voidinitialize(URL url, ResourceBundle resourceBundle) Gets all the child nodes representing the elements of the scene from the FXML.voidpromptSelection(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.voidSets the name of the lobby.voidsetTowerColor(String towerColor) Sets the user'sTowerColorliteral and shows the next popup.voidSets the user'sWizardliteral.voidupdatePlayers(List<String> players) Gets the information about the lobby from passed parameter and shows the list of connected users in the scene.voidGets 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:ControllerA getter for thePaneobject associated with the FXML tag of highest level in the*.fxmlfile associated withthis. The method is called in order to process a popup. Any controller should override the method if necessary.- Specified by:
getTopLevelPanein 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 selectedTowerColorliteralswizards- the mapping between usernames and previously selectedWizardliterals
-
promptSelection
Gets the information about tower colors and wizards from passed parameters and draws all the elements in a popup.- Parameters:
towerColors- the availableTowerColorliterals to choosewizards- the availableWizardliterals to choose
-
setTowerColor
Sets the user'sTowerColorliteral and shows the next popup.- Parameters:
towerColor- the selectedTowerColorliteral.
-
setWizard
Sets the user'sWizardliteral.- Parameters:
wizard- the selectedWizardliteral.
-