diff --git a/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy b/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy index 5b9f835..2a283f4 100644 --- a/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy +++ b/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy @@ -36,7 +36,7 @@ doubleGradient.texture = texture(name: "/com/simsilica/lemur/icons/double-gradie generateMips: false) def orangeBorder = TbtQuadBackgroundComponent.create( - texture(name: "/com/simsilica/lemur/icons/bordered-gradient.png", // Replace with an appropriate texture if needed + texture(name: "/com/simsilica/lemur/icons/border.png", // Replace with an appropriate texture if needed generateMips: false), 1, 1, 1, 126, 126, 1f, false) @@ -56,6 +56,7 @@ selector("header", "pp") { insets = new Insets3f(2, 2, 2, 2) color = color(1, 0.5, 0, 1) textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center } selector("container", "pp") { @@ -146,6 +147,8 @@ selector("title", "pp") { background.texture = texture(name: "/com/simsilica/lemur/icons/double-gradient-128.png", generateMips: false) insets = new Insets3f(2, 2, 2, 2) + textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center buttonCommands = stdButtonCommands } @@ -160,6 +163,8 @@ selector("button", "pp") { // Use insets to create a margin/padding effect for the inner background insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness + textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center buttonCommands = stdButtonCommands } @@ -235,10 +240,14 @@ selector("tab.button", "pp") { selector("settings-title", "pp") { fontSize = 48 // Set font size background = new QuadBackgroundComponent(color(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background + textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center } selector("menu-button", "pp") { fontSize = 40 // Set font size background = new QuadBackgroundComponent(color(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background + textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center } diff --git a/Projekte/monopoly/client/build.gradle b/Projekte/monopoly/client/build.gradle index 683def3..85ddd4b 100644 --- a/Projekte/monopoly/client/build.gradle +++ b/Projekte/monopoly/client/build.gradle @@ -9,6 +9,7 @@ dependencies { implementation project(":monopoly:model") implementation project(":monopoly:server") + implementation 'com.simsilica:lemur-proto:1.13.0' implementation libs.jme3.desktop implementation libs.lemur implementation libs.lemurproto diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/CreateGameMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/CreateGameMenu.java index cd10d18..3de64a6 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/CreateGameMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/CreateGameMenu.java @@ -12,6 +12,7 @@ import com.simsilica.lemur.Label; import com.simsilica.lemur.TextField; import com.simsilica.lemur.component.SpringGridLayout; +import com.simsilica.lemur.style.ElementId; import pp.monopoly.client.MonopolyApp; import pp.monopoly.client.StartMenu; @@ -34,8 +35,10 @@ public class CreateGameMenu { menuContainer.setPreferredSize(new Vector3f(600, 400, 0)); // Feste Größe des Containers // Titel - Label title = menuContainer.addChild(new Label("Neues Spiel")); - title.setFontSize(48); + Label title = menuContainer.addChild(new Label("Neues Spiel", new ElementId("header"))); + title.setFont(app.getAssetManager().loadFont("Interface/Fonts/Metropolis/Metropolis-Bold-42.fnt")); + title.setFontSize(50); + // Eingabefelder-Container Container inputContainer = menuContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X))); diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/SettingsMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/SettingsMenu.java index 13cc224..8076ccb 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/SettingsMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/SettingsMenu.java @@ -3,6 +3,7 @@ package pp.monopoly.client.gui; import com.jme3.material.Material; import com.jme3.material.RenderState.BlendMode; import com.jme3.math.ColorRGBA; +import com.jme3.math.Vector3f; import com.jme3.scene.Geometry; import com.jme3.scene.shape.Quad; import com.simsilica.lemur.Button; @@ -12,7 +13,9 @@ import com.simsilica.lemur.Label; import com.simsilica.lemur.Slider; import com.simsilica.lemur.component.QuadBackgroundComponent; import com.simsilica.lemur.style.ElementId; +import com.simsilica.lemur.ValueRenderer; +import com.simsilica.lemur.Selector; import pp.dialog.Dialog; import pp.monopoly.client.MonopolyApp; @@ -61,6 +64,30 @@ public class SettingsMenu extends Dialog { backgroundMusicContainer.addChild(new Checkbox("Musik an")).setChecked(true); backgroundMusicContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f))); + /*Selector dropdown = new Selector<>(); + backgroundMusicContainer.addChild(dropdown); + + Vector3f dimens = settingsContainer.getPreferredSize(); + Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize(); + dimens2.setX(dimens.getX()); + dropdown.getPopupContainer().setPreferredSize(dimens2);*/ + // Create the dropdown menu + Selector dropdown = new Selector<>(); + + // Generate and add numbered examples to the dropdown + for (int i = 1; i <= 10; i++) { // Generate 10 examples + dropdown.getModel().add("Example " + i); + } + + + // Add the dropdown to the container + backgroundMusicContainer.addChild(dropdown); + + // Adjust the dropdown's popup container size if necessary + Vector3f dimens = settingsContainer.getPreferredSize(); + Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize(); + dimens2.setX(dimens.getX()); + dropdown.getPopupContainer().setPreferredSize(dimens2); // Beenden-Button Button quitButton = settingsContainer.addChild(new Button("Beenden", new ElementId("menu-button"))); quitButton.setFontSize(32);