added new label styling

This commit is contained in:
Yvonne Schmidt 2024-11-29 06:47:26 +01:00
parent 5d92d7cfcc
commit 5845254caa
3 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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();
}
}

View File

@ -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);