From 5845254caa371f310b716e53fe1bcc8906c531a6 Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Fri, 29 Nov 2024 06:47:26 +0100 Subject: [PATCH] added new label styling --- .../main/resources/Interface/Lemur/pp-styles.groovy | 10 ++++++++++ .../src/main/java/pp/monopoly/client/MonopolyApp.java | 2 +- .../java/pp/monopoly/client/gui/popups/TimeOut.java | 2 +- 3 files changed, 12 insertions(+), 2 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 e761640..749dfdb 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 @@ -262,6 +262,16 @@ selector("settings-title", "pp") { textHAlignment = HAlignment.Center textVAlignment = VAlignment.Center } +selector("warning-title", "pp") { + def outerBackground = new QuadBackgroundComponent(color(1, 0.5, 0, 1)) // Grey inner border + def innerBackground = new QuadBackgroundComponent(buttonBgColor) // White outer border background + font = font("Interface/Fonts/Metropolis/Metropolis-Bold-42.fnt") + background = outerBackground + fontSize = 40 + insets = new Insets3f(3, 3, 3, 3) + textHAlignment = HAlignment.Center + textVAlignment = VAlignment.Center +} selector("menu-button", "pp") { fontSize = 40 // Set font size 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 1c129e3..92788d7 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 @@ -274,7 +274,7 @@ 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) { - Dialog tmp = new Bankrupt(this); + Dialog tmp = new TimeOut(this); tmp.open(); } } diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/TimeOut.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/TimeOut.java index 0b208f4..02dad1c 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/TimeOut.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/TimeOut.java @@ -52,7 +52,7 @@ public class TimeOut extends Dialog { backgroundContainer.setPreferredSize(timeOutContainer.getPreferredSize().addLocal(padding, padding, 0)); // Titel - Label gateFieldTitle = timeOutContainer.addChild(new Label("Vorsicht !", new ElementId("settings-title"))); //TODO dicke Schrift + Label gateFieldTitle = timeOutContainer.addChild(new Label("Vorsicht !", new ElementId("warning-title"))); gateFieldTitle.setFontSize(48); gateFieldTitle.setColor(ColorRGBA.Black);