mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 21:39:44 +01:00
Änderungs des StartBildschirms
This commit is contained in:
parent
853b52b52d
commit
12ef219064
@ -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);
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 7.1 MiB |
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user