mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +01:00
Werkzeugbank Rand
This commit is contained in:
parent
b87b3f054b
commit
1c31915627
@ -15,7 +15,6 @@ import com.simsilica.lemur.style.ElementId;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.game.server.Player;
|
||||
import pp.monopoly.game.server.PlayerColor;
|
||||
import pp.monopoly.game.server.PlayerHandler;
|
||||
import pp.monopoly.message.client.EndTurn;
|
||||
import pp.monopoly.message.client.RollDice;
|
||||
@ -63,13 +62,35 @@ public class Toolbar extends Dialog implements GameEventListener {
|
||||
Player currentPlayer = playerHandler.getPlayerById(app.getId());
|
||||
ColorRGBA playerColor = currentPlayer.getColor().getColor();
|
||||
|
||||
// Füge einen farbigen Balken hinzu
|
||||
// Oberer Balken
|
||||
Container playerColorBar = new Container();
|
||||
playerColorBar.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 40, 0)); // Höhe des Balkens auf 10 festlegen
|
||||
playerColorBar.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 15, 0)); // Höhe des oberen Balkens
|
||||
playerColorBar.setBackground(new QuadBackgroundComponent(playerColor));
|
||||
playerColorBar.setLocalTranslation(0, 220, 1); // Positioniere ihn an der oberen Kante der Toolbar
|
||||
playerColorBar.setLocalTranslation(0, 210, 1); // Position über der Toolbar
|
||||
app.getGuiNode().attachChild(playerColorBar);
|
||||
|
||||
// unterer Balken
|
||||
Container playerColorBarbot = new Container();
|
||||
playerColorBarbot.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 10, 0)); // Höhe des oberen Balkens
|
||||
playerColorBarbot.setBackground(new QuadBackgroundComponent(playerColor));
|
||||
playerColorBarbot.setLocalTranslation(0, 10, 3); // Position über der Toolbar
|
||||
app.getGuiNode().attachChild(playerColorBarbot);
|
||||
|
||||
|
||||
// Linker Balken
|
||||
Container leftBar = new Container();
|
||||
leftBar.setPreferredSize(new Vector3f(10, 210, 0)); // Breite 10, Höhe 210
|
||||
leftBar.setBackground(new QuadBackgroundComponent(playerColor));
|
||||
leftBar.setLocalTranslation(0, 200, 3); // Position am linken Rand
|
||||
app.getGuiNode().attachChild(leftBar);
|
||||
|
||||
// Rechter Balken
|
||||
Container rightBar = new Container();
|
||||
rightBar.setPreferredSize(new Vector3f(10, 210, 0)); // Breite 10, Höhe 210
|
||||
rightBar.setBackground(new QuadBackgroundComponent(playerColor));
|
||||
rightBar.setLocalTranslation(app.getCamera().getWidth() - 10, 200, 2); // Position am rechten Rand
|
||||
app.getGuiNode().attachChild(rightBar);
|
||||
|
||||
// Übersicht und Konto
|
||||
accountContainer = container.addChild(new Container());
|
||||
overviewContainer = container.addChild(new Container());
|
||||
|
Loading…
Reference in New Issue
Block a user