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

public class WaitingRoomController extends Controller
A class representing the controller for the WAITING_ROOM scene.
See Also:
  • Constructor Details

    • WaitingRoomController

      public WaitingRoomController()
  • Method Details

    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      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 the Pane object associated with the FXML tag of highest level in the *.fxml file associated with this. The method is called in order to process a popup. Any controller should override the method if necessary.
      Specified by:
      getTopLevelPane in class Controller
      Returns:
      the highest level Pane
    • setText

      public void setText(String id)
      Sets the name of the lobby.
      Parameters:
      id - the numerical identifier of the lobby
    • updatePlayers

      public void updatePlayers(List<String> players)
      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

      public void updateSelections(Map<String,String> towerColors, Map<String,String> wizards)
      Gets the information about selected literals from passed parameters and shows the mapping in the scene.
      Parameters:
      towerColors - the mapping between usernames and previously selected TowerColor literals
      wizards - the mapping between usernames and previously selected Wizard literals
    • promptSelection

      public 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.
      Parameters:
      towerColors - the available TowerColor literals to choose
      wizards - the available Wizard literals to choose
    • setTowerColor

      public void setTowerColor(String towerColor)
      Sets the user's TowerColor literal and shows the next popup.
      Parameters:
      towerColor - the selected TowerColor literal.
    • setWizard

      public void setWizard(String wizard)
      Sets the user's Wizard literal.
      Parameters:
      wizard - the selected Wizard literal.