From 65a7958b66513b0a6c913619f520758fab4155da Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Fri, 22 Nov 2024 05:28:51 +0100 Subject: [PATCH] popup ebenen angepasst und dropdown entfernt --- .../Interface/Lemur/pp-styles.groovy | 3 +-- .../pp/monopoly/client/gui/SettingsMenu.java | 24 ----------------- .../monopoly/client/gui/popups/BuyCard.java | 26 ++----------------- 3 files changed, 3 insertions(+), 50 deletions(-) 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 f4f7e80..394b2a2 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 @@ -247,15 +247,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(new ColorRGBA(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background textHAlignment = HAlignment.Center textVAlignment = VAlignment.Center + buttonCommands = stdButtonCommands } 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 8076ccb..5fabf92 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 @@ -64,30 +64,6 @@ 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); diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuyCard.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuyCard.java index 8453e87..dadde7e 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuyCard.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuyCard.java @@ -51,28 +51,6 @@ public class BuyCard extends Dialog { propertyValuesContainer.addChild(new Label("„Hypothek: XXXX", new ElementId("label-Text")));//TODO Variable hier einsetzen propertyValuesContainer.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); - } - - - - // 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("button"))); quitButton.setFontSize(32); @@ -88,13 +66,13 @@ public class BuyCard extends Dialog { settingsContainer.setLocalTranslation( (app.getCamera().getWidth() - settingsContainer.getPreferredSize().x) / 2, (app.getCamera().getHeight() + settingsContainer.getPreferredSize().y) / 2, - 4 + 8 ); backgroundContainer.setLocalTranslation( (app.getCamera().getWidth() - settingsContainer.getPreferredSize().x - padding) / 2, (app.getCamera().getHeight() + settingsContainer.getPreferredSize().y+ padding) / 2, - 3 + 7 ); app.getGuiNode().attachChild(settingsContainer);