diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/StartMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/StartMenu.java index c3893d3..6d81abd 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/StartMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/StartMenu.java @@ -1,6 +1,10 @@ package pp.monopoly.client; +import com.jme3.material.Material; import com.jme3.math.Vector3f; +import com.jme3.scene.Geometry; +import com.jme3.scene.shape.Quad; +import com.jme3.texture.Texture; import com.simsilica.lemur.Button; import com.simsilica.lemur.Container; import com.simsilica.lemur.Label; @@ -31,6 +35,16 @@ public class StartMenu extends Dialog { */ public static void createStartMenu(MonopolyApp app) { Container mainMenu = new Container(); + Texture backgroundImage = app.getAssetManager().loadTexture("Pictures/unibw-Bib2.png"); + Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight()); // Vollbildgröße + Geometry background = new Geometry("Background", quad); + Material backgroundMaterial = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md"); + backgroundMaterial.setTexture("ColorMap", backgroundImage); + background.setMaterial(backgroundMaterial); + background.setLocalTranslation(0, 0, -1); // Hintergrundebene + + // Bild zum guiNode hinzufügen, damit es im Hintergrund bleibt + app.getGuiNode().attachChild(background); mainMenu.setLocalTranslation(new Vector3f(300, 300, 0)); // Positionierung des Menüs // Titel des Hauptmenüs @@ -52,28 +66,19 @@ public class StartMenu extends Dialog { app.getGuiNode().attachChild(mainMenu); } - /** - * Starts the game by transitioning to the CreateGameMenu. - */ private static void startGame(MonopolyApp app) { - app.getGuiNode().detachAllChildren(); // Schließt das Startmenü + app.getGuiNode().detachAllChildren(); CreateGameMenu createGameMenu = new CreateGameMenu(app); - // Code zur Anzeige des CreateGameMenu, eventuell zusätzliche Initialisierung + // Weitere Initialisierung des CreateGameMenu } - /** - * Opens the settings menu. - */ private static void openSettings(MonopolyApp app) { - app.getGuiNode().detachAllChildren(); // Schließt das Startmenü + app.getGuiNode().detachAllChildren(); SettingsMenu settingsMenu = new SettingsMenu(app); - // Code zur Anzeige des SettingsMenu + // Weitere Initialisierung des SettingsMenu } - /** - * Quits the game application. - */ private static void quitGame() { - System.exit(0); // Beendet die Anwendung + System.exit(0); } } diff --git a/Projekte/monopoly/client/src/main/resources/Pictures/unibw-Bib2.png b/Projekte/monopoly/client/src/main/resources/Pictures/unibw-Bib2.png new file mode 100644 index 0000000..5973960 Binary files /dev/null and b/Projekte/monopoly/client/src/main/resources/Pictures/unibw-Bib2.png differ diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java index 13d20e3..641d4e9 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java @@ -7,18 +7,6 @@ package pp.monopoly.game.client; -import pp.monopoly.message.client.ClientMessage; -import pp.monopoly.message.server.ServerInterpreter; -import pp.monopoly.model.IntPoint; -import pp.monopoly.model.Board; -import pp.monopoly.notification.ClientStateEvent; -import pp.monopoly.notification.GameEvent; -import pp.monopoly.notification.GameEventBroker; -import pp.monopoly.notification.GameEventListener; -import pp.monopoly.notification.InfoTextEvent; -import pp.monopoly.notification.Sound; -import pp.monopoly.notification.SoundEvent; - import java.io.File; import java.io.IOException; import java.lang.System.Logger; @@ -26,7 +14,17 @@ import java.lang.System.Logger.Level; import java.util.ArrayList; import java.util.List; -import static java.lang.Math.max; +import pp.monopoly.message.client.ClientMessage; +import pp.monopoly.message.server.ServerInterpreter; +import pp.monopoly.model.Board; +import pp.monopoly.model.IntPoint; +import pp.monopoly.notification.ClientStateEvent; +import pp.monopoly.notification.GameEvent; +import pp.monopoly.notification.GameEventBroker; +import pp.monopoly.notification.GameEventListener; +import pp.monopoly.notification.InfoTextEvent; +import pp.monopoly.notification.Sound; +import pp.monopoly.notification.SoundEvent; /** * Controls the client-side game logic for Monopoly. diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/MonopolyClientConfig.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/MonopolyClientConfig.java index b92a4b6..f5fecd0 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/MonopolyClientConfig.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/MonopolyClientConfig.java @@ -7,13 +7,9 @@ package pp.monopoly.game.client; -import pp.monopoly.MonopolyConfig; -import pp.monopoly.model.IntPoint; - import java.io.File; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; + +import pp.monopoly.MonopolyConfig; /** * Class providing access to the Monopoly client configuration. diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java index 35279b6..561c925 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/ServerGameLogic.java @@ -7,12 +7,6 @@ package pp.monopoly.game.server; -import pp.monopoly.MonopolyConfig; -import pp.monopoly.message.client.ClientInterpreter; -import pp.monopoly.message.server.ServerMessage; - -import pp.monopoly.model.IntPoint; - import java.lang.System.Logger; import java.lang.System.Logger.Level; import java.util.ArrayList; @@ -20,6 +14,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import pp.monopoly.MonopolyConfig; +import pp.monopoly.message.client.ClientInterpreter; +import pp.monopoly.message.server.ServerMessage; + /** * Controls the server-side game logic for Monopoly. * Manages game states, player interactions, and message handling. diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/IntPoint.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/IntPoint.java index 1ffa23b..6e3b850 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/IntPoint.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/IntPoint.java @@ -7,10 +7,10 @@ package pp.monopoly.model; -import com.jme3.network.serializing.Serializable; - import java.util.Objects; +import com.jme3.network.serializing.Serializable; + /** * Represents a point in the two-dimensional plane with integer coordinates. */