From 84059c4085892e77413d017646e73a8817e20c3e Mon Sep 17 00:00:00 2001 From: Simon Wilkening Date: Sat, 23 Nov 2024 17:22:24 +0100 Subject: [PATCH 1/3] GateField --- .../src/main/java/pp/monopoly/client/MonopolyApp.java | 10 +++++----- .../main/java/pp/monopoly/client/gui/GateField.java | 11 ++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java index 2f3d820..b00aed5 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java @@ -149,17 +149,17 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga //logik zum wechselnden erscheinen und verschwinden beim drücken von B //TODO süäter entfernen private void handleB(boolean isPressed) { if (isPressed) { - if (buildingProperty != null && isBuyCardPopupOpen) { + if (gateField != null && isBuyCardPopupOpen) { // Schließe das SettingsMenu System.out.println("Schließe BuyCardPopup..."); - buildingProperty.close(); - buildingProperty = null; + gateField.close(); + gateField = null; setBuyCardPopupOpen(false); } else { // Öffne das SettingsMenu System.out.println("Öffne BuyCardPopup..."); - buildingProperty = new BuildingProperty(this); - buildingProperty.open(); + gateField = new GateField(this); + gateField.open(); setBuyCardPopupOpen(true); } } diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java index 0d60b05..af6a35a 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java @@ -37,7 +37,7 @@ public class GateField extends Dialog { // Hauptcontainer für das Menü settingsContainer = new Container(); - settingsContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.1f, 0.1f, 0.1f, 0.9f))); + settingsContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0 / 255f, 0 / 255f, 0 / 255f, 1))); @@ -45,15 +45,12 @@ public class GateField extends Dialog { Label settingsTitle = settingsContainer.addChild(new Label("Gebäude 30", new ElementId("settings-title"))); //TODO Dynamische Gebäudezahl einfügen settingsTitle.setFontSize(48); - int i = 0; - int a = 10; - int b = -45; // Effekt-Sound: Slider und Checkbox Container propertyValuesContainer = settingsContainer.addChild(new Container()); - propertyValuesContainer.addChild(new Label("„Preis:" + i, new ElementId("label-Text")));//TODO Variable hier einsetzen - propertyValuesContainer.addChild(new Label("„Miete:" + a, new ElementId("label-Text")));//TODO Variable hier einsetzen - propertyValuesContainer.addChild(new Label("„Hypothek:" + b, new ElementId("label-Text")));//TODO Variable hier einsetzen + propertyValuesContainer.addChild(new Label("„Preis:", new ElementId("label-Text")));//TODO Variable hier einsetzen + propertyValuesContainer.addChild(new Label("„Miete:", new ElementId("label-Text")));//TODO Variable hier einsetzen + propertyValuesContainer.addChild(new Label("„Hypothek:", new ElementId("label-Text")));//TODO Variable hier einsetzen propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f))); // Beenden-Button From ada6bf3f24d13303348e1308f8f5b21ca64ea790 Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Sat, 23 Nov 2024 17:24:41 +0100 Subject: [PATCH 2/3] changed GateField font color --- .../client/src/main/java/pp/monopoly/client/gui/GateField.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java index af6a35a..db9e7d4 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GateField.java @@ -44,6 +44,7 @@ public class GateField extends Dialog { // Titel Label settingsTitle = settingsContainer.addChild(new Label("Gebäude 30", new ElementId("settings-title"))); //TODO Dynamische Gebäudezahl einfügen settingsTitle.setFontSize(48); + settingsTitle.setColor(ColorRGBA.Black); // Effekt-Sound: Slider und Checkbox From c6355b2c09cd4223197d268a9cc7c99b442a288b Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Sat, 23 Nov 2024 17:37:27 +0100 Subject: [PATCH 3/3] dropdown lesbar --- .../client/src/main/java/pp/monopoly/client/MonopolyApp.java | 2 ++ .../client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java index b00aed5..09823cb 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java @@ -102,6 +102,8 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga GuiGlobals.initialize(this); BaseStyles.loadStyleResources(STYLES_SCRIPT); GuiGlobals.getInstance().getStyles().setDefaultStyle("pp"); // NON-NLS + BaseStyles.loadStyleResources("com/simsilica/lemur/style/base/glass-styles.groovy"); + GuiGlobals.getInstance().getStyles(); final BitmapFont normalFont = assetManager.loadFont(FONT); // NON-NLS setupInput(); 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 5d01e5e..de4d6a1 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 @@ -89,7 +89,7 @@ public class LobbyMenu { items.add("Gamma"); items.add("Back"); - dropdown = new Selector<>(items); + dropdown = new Selector<>(items,"glass"); dropdown.setBackground(new QuadBackgroundComponent(ColorRGBA.Black)); menuContainer.addChild(dropdown);