From 869e16406d054dd913266a75134f9421c598a63f Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Mon, 18 Nov 2024 07:26:31 +0100 Subject: [PATCH] =?UTF-8?q?eigenes=20GUI=20Styling=20eingef=C3=BChrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/Interface/Lemur/pp-styles.groovy | 2 +- .../main/java/pp/monopoly/client/MonopolyApp.java | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 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 211963c..36ee17e 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 @@ -206,7 +206,7 @@ selector("tabbedPanel.container", "pp") { } selector("tab.button", "pp") { - background = gradient.clone() + background = solidWhiteBackground.clone() background.setColor(bgColor) color = tabbuttonEnabledColor insets = new Insets3f(4, 2, 0, 2) 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 ffe1f4e..baac5f7 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 @@ -37,6 +37,15 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga private TestWorld testWorld; private boolean isSettingsMenuOpen = false; private boolean inputBlocked = false; + /** + * Path to the styles script for GUI elements. + */ + private static final String STYLES_SCRIPT = "Interface/Lemur/pp-styles.groovy"; //NON-NLS + /** + * Path to the font resource used in the GUI. + */ + private static final String FONT = "Interface/Fonts/Default.fnt"; //NON-NLS + public static void main(String[] args) { new MonopolyApp().start(); @@ -73,8 +82,9 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga @Override public void simpleInitApp() { GuiGlobals.initialize(this); - BaseStyles.loadGlassStyle(); - GuiGlobals.getInstance().getStyles().setDefaultStyle("glass"); + BaseStyles.loadStyleResources(STYLES_SCRIPT); + GuiGlobals.getInstance().getStyles().setDefaultStyle("pp"); //NON-NLS + final BitmapFont normalFont = assetManager.loadFont(FONT); //NON-NLS setupInput(); setupGui();