diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/ChoosePartner.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/ChoosePartner.java index 4d89b01..439740e 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/ChoosePartner.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/ChoosePartner.java @@ -68,7 +68,7 @@ public class ChoosePartner extends Dialog { // Add buttons mainContainer.addChild(createButtonContainer()); - addSelectionActionListener(playerSelector, this::onDropdownSelectionChanged); + addSelectionActionListener(playerSelector, this::onDropdownSelectionChanged); // Attach main container to GUI node app.getGuiNode().attachChild(mainContainer); @@ -104,6 +104,7 @@ public class ChoosePartner extends Dialog { dimens2.setX( dimens.getX() ); playerSelector.getPopupContainer().setPreferredSize(new Vector3f(200,200,3)); playerSelector.setLocalTranslation(0,0,5); + onDropdownSelectionChanged(playerOptions.get(0)); return dropdownContainer; } @@ -211,6 +212,7 @@ public class ChoosePartner extends Dialog { @Override protected void initialize(Application app) { + update(1); } @Override diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java index 61dfbcd..e817671 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java @@ -47,7 +47,7 @@ public class LobbyMenu extends Dialog { super(app.getDialogManager()); this.app = app; - playerInputField = new TextField("Spieler "+app.getId()+1); + playerInputField = new TextField("Spieler "+(app.getId()+1)); // Hintergrundbild laden und hinzufügen addBackgroundImage(); @@ -120,6 +120,8 @@ public class LobbyMenu extends Dialog { figures.add("OOP"); figures.add("Handyholster"); + + Selector figureDropdown = new Selector<>(figures, "glass"); figureDropdown.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray)); figureDropdown.setPreferredSize(new Vector3f(100, 20, 0)); @@ -128,7 +130,8 @@ public class LobbyMenu extends Dialog { Vector3f dimens2 = figureDropdown.getPopupContainer().getPreferredSize(); dimens2.setX( dimens.getX() ); figureDropdown.getPopupContainer().setPreferredSize(new Vector3f(200,200,5)); - + figureDropdown.getSelectionModel().setSelection(0); + figure = "Laptop"; addSelectionActionListener(figureDropdown, this::onDropdownSelectionChanged);