mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-01 06:17:40 +02:00
eigenes GUI Styling eingeführt
This commit is contained in:
@@ -60,14 +60,6 @@ public class StartMenu extends Dialog {
|
||||
startButton.setFontSize(40); // Set the font size for the button text
|
||||
startButton.setTextHAlignment(HAlignment.Center); // Center the text horizontally
|
||||
|
||||
// Set a custom border and background color
|
||||
ColorRGBA borderColor = ColorRGBA.Orange; // Example: White border
|
||||
ColorRGBA backgroundColor = ColorRGBA.LightGray; // Example: light gray background
|
||||
QuadBackgroundComponent backgroundColorSp = new QuadBackgroundComponent(backgroundColor);
|
||||
backgroundColorSp.setMargin(2, 2); // Optional: Adjust margin for the border
|
||||
backgroundColorSp.setColor(borderColor); // Set border color
|
||||
startButton.setBackground(backgroundColorSp);
|
||||
|
||||
startButton.addClickCommands(source -> startGame(app));
|
||||
centerMenu.addChild(startButton);
|
||||
|
||||
@@ -82,7 +74,7 @@ public class StartMenu extends Dialog {
|
||||
lowerLeftMenu.setLocalTranslation(new Vector3f(100, 90, 0));
|
||||
Button quitButton = new Button("Spiel beenden");
|
||||
quitButton.setPreferredSize(new Vector3f(130, 40, 0)); // Increase button size slightly (width, height)
|
||||
quitButton.setFontSize(20);
|
||||
quitButton.setFontSize(18);
|
||||
quitButton.addClickCommands(source -> quitGame());
|
||||
lowerLeftMenu.addChild(quitButton);
|
||||
app.getGuiNode().attachChild(lowerLeftMenu);
|
||||
@@ -92,7 +84,7 @@ public class StartMenu extends Dialog {
|
||||
lowerRightMenu.setLocalTranslation(new Vector3f(screenWidth - 200, 90, 0));
|
||||
Button settingsButton = new Button("Einstellungen");
|
||||
settingsButton.setPreferredSize(new Vector3f(130, 40, 0)); // Increase button size slightly (width, height)
|
||||
settingsButton.setFontSize(20); // Increase the font size for the text
|
||||
settingsButton.setFontSize(18); // Increase the font size for the text
|
||||
settingsButton.addClickCommands(source -> openSettings(app));
|
||||
lowerRightMenu.addChild(settingsButton);
|
||||
app.getGuiNode().attachChild(lowerRightMenu);
|
||||
|
Reference in New Issue
Block a user