defaultwerte in die Lobby eingefügt

This commit is contained in:
Yvonne Schmidt 2024-11-23 23:19:53 +01:00
parent 17f121f7d1
commit 75d5a15bdb

View File

@ -64,7 +64,7 @@ public class LobbyMenu {
spacerBeforeInput.setPreferredSize(new Vector3f(20, 1, 0)); // Width of the spacer spacerBeforeInput.setPreferredSize(new Vector3f(20, 1, 0)); // Width of the spacer
// Add an input field (TextField) // Add an input field (TextField)
TextField startingCapital = horizontalContainer.addChild(new TextField("")); TextField startingCapital = horizontalContainer.addChild(new TextField("15 000"));
startingCapital.setPreferredWidth(100); // Set the width of the input field startingCapital.setPreferredWidth(100); // Set the width of the input field
startingCapital.setPreferredSize(new Vector3f(150, 50, 0)); startingCapital.setPreferredSize(new Vector3f(150, 50, 0));
startingCapital.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding around the text inside the field startingCapital.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding around the text inside the field
@ -91,7 +91,7 @@ public class LobbyMenu {
playerInputContainer.setBackground(null); playerInputContainer.setBackground(null);
TextField playerInputField = new TextField(""); TextField playerInputField = new TextField("Spieler 1");
playerInputField.setPreferredSize(new Vector3f(100, 20, 0)); playerInputField.setPreferredSize(new Vector3f(100, 20, 0));
playerInputField.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding for the text inside the field playerInputField.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding for the text inside the field
playerInputField.setBackground(new QuadBackgroundComponent(ColorRGBA.Black)); playerInputField.setBackground(new QuadBackgroundComponent(ColorRGBA.Black));
@ -106,10 +106,12 @@ public class LobbyMenu {
figureDropdownContainer.setBackground(null); figureDropdownContainer.setBackground(null);
VersionedList<String> figures = new VersionedList<>(); VersionedList<String> figures = new VersionedList<>();
figures.add("Hund"); figures.add("Laptop");
figures.add("Flugzeug");
figures.add("Jägermeister");
figures.add("Katze"); figures.add("Katze");
figures.add("Panzer"); figures.add("OOP");
figures.add("Pot"); figures.add("Handyholster");
Selector<String> figureDropdown = new Selector<>(figures, "glass"); Selector<String> figureDropdown = new Selector<>(figures, "glass");
figureDropdown.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray)); figureDropdown.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));