Compare commits

..

No commits in common. "c758ba97350c9c60e919b8661c6648efd5b125ba" and "6b110c81c84ebb36807c4fb7c1300be49cf1ba57" have entirely different histories.

2 changed files with 21 additions and 21 deletions

View File

@ -87,7 +87,7 @@ selector("label-Bold", "pp") {
selector("label-toolbar", "pp") { selector("label-toolbar", "pp") {
insets = new Insets3f(2, 2, 2, 2) insets = new Insets3f(2, 2, 2, 2)
font = font("Interface/Fonts/Metropolis/Metropolis-Bold-32.fnt") font = font("Interface/Fonts/Metropolis/Metropolis-Bold-32.fnt")
fontSize = 25 fontSize = 30
color = new ColorRGBA(ColorRGBA.White) color = new ColorRGBA(ColorRGBA.White)
textHAlignment = HAlignment.Center textHAlignment = HAlignment.Center
textVAlignment = VAlignment.Center textVAlignment = VAlignment.Center

View File

@ -148,56 +148,58 @@ public class Toolbar extends Dialog implements GameEventListener {
Texture backgroundToolbar = app.getAssetManager().loadTexture("Pictures/toolbarbg.png"); Texture backgroundToolbar = app.getAssetManager().loadTexture("Pictures/toolbarbg.png");
QuadBackgroundComponent background = new QuadBackgroundComponent(backgroundToolbar); QuadBackgroundComponent background = new QuadBackgroundComponent(backgroundToolbar);
container.setBackground(background); container.setBackground(background);
// Spielerfarbe des aktuellen Spielers abrufen // Spielerfarbe des aktuellen Spielers abrufen
Player currentPlayer = playerHandler.getPlayerById(app.getId()); Player currentPlayer = playerHandler.getPlayerById(app.getId());
PlayerColor currentPlayerColor = Player.getColor(currentPlayer.getId()); PlayerColor currentPlayerColor = Player.getColor(currentPlayer.getId());
// Oberer Balken mit der Spielerfarbe // Oberer Balken mit der Spielerfarbe
Container playerColorBar = new Container(); Container playerColorBar = new Container();
playerColorBar.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 5, 0)); // Höhe des oberen Balkens playerColorBar.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 5, 0)); // Höhe des oberen Balkens
playerColorBar.setBackground(new QuadBackgroundComponent(currentPlayerColor.getColor())); // Use player color playerColorBar.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));
playerColorBar.setLocalTranslation(0, 205, 3); // Position über der Toolbar playerColorBar.setLocalTranslation(0, 205, 3); // Position über der Toolbar
app.getGuiNode().attachChild(playerColorBar); app.getGuiNode().attachChild(playerColorBar);
// Unterer Balken mit der Spielerfarbe
// unterer Balken
Container playerColorBarbot = new Container(); Container playerColorBarbot = new Container();
playerColorBarbot.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 10, 0)); // Höhe des unteren Balkens playerColorBarbot.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 10, 0)); // Höhe des oberen Balkens
playerColorBarbot.setBackground(new QuadBackgroundComponent(currentPlayerColor.getColor())); // Use player color playerColorBarbot.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));
playerColorBarbot.setLocalTranslation(0, 5, 3); // Position über der Toolbar playerColorBarbot.setLocalTranslation(0, 5, 3); // Position über der Toolbar
app.getGuiNode().attachChild(playerColorBarbot); app.getGuiNode().attachChild(playerColorBarbot);
// Linker Balken mit der Spielerfarbe
// Linker Balken
Container leftBar = new Container(); Container leftBar = new Container();
leftBar.setPreferredSize(new Vector3f(5, 210, 0)); // Breite 5, Höhe 210 leftBar.setPreferredSize(new Vector3f(5, 210, 0)); // Breite 10, Höhe 210
leftBar.setBackground(new QuadBackgroundComponent(currentPlayerColor.getColor())); // Use player color leftBar.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));
leftBar.setLocalTranslation(0, 200, 3); // Position am linken Rand leftBar.setLocalTranslation(0, 200, 3); // Position am linken Rand
app.getGuiNode().attachChild(leftBar); app.getGuiNode().attachChild(leftBar);
// Rechter Balken mit der Spielerfarbe // Rechter Balken
Container rightBar = new Container(); Container rightBar = new Container();
rightBar.setPreferredSize(new Vector3f(5, 210, 0)); // Breite 5, Höhe 210 rightBar.setPreferredSize(new Vector3f(5, 210, 0)); // Breite 10, Höhe 210
rightBar.setBackground(new QuadBackgroundComponent(currentPlayerColor.getColor())); // Use player color rightBar.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));
rightBar.setLocalTranslation(app.getCamera().getWidth() - 5, 200, 2); // Position am rechten Rand rightBar.setLocalTranslation(app.getCamera().getWidth() - 5, 200, 2); // Position am rechten Rand
app.getGuiNode().attachChild(rightBar); app.getGuiNode().attachChild(rightBar);
// Übersicht und Konto // Übersicht und Konto
accountContainer = container.addChild(new Container()); accountContainer = container.addChild(new Container());
overviewContainer = container.addChild(new Container()); overviewContainer = container.addChild(new Container());
accountContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Yellow)); // Debug-Farbe accountContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Yellow)); // Debug-Farbe
overviewContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Green)); // Debug-Farbe; overviewContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Green)); // Debug-Farbe;
receivedEvent(new UpdatePlayerView()); // Initiale Aktualisierung receivedEvent(new UpdatePlayerView()); // Initiale Aktualisierung
// Würfel-Bereich // Würfel-Bereich
container.addChild(createDiceSection()); container.addChild(createDiceSection());
// Aktionsmenü // Aktionsmenü
Container menuContainer = container.addChild(new Container()); Container menuContainer = container.addChild(new Container());
menuContainer.addChild(createTradeButton(currentPlayerColor)); menuContainer.addChild(createTradeButton(currentPlayerColor));
menuContainer.addChild(createPropertyMenuButton(currentPlayerColor)); menuContainer.addChild(createPropertyMenuButton(currentPlayerColor));
menuContainer.addChild(createEndTurnButton(currentPlayerColor)); menuContainer.addChild(createEndTurnButton(currentPlayerColor));
menuContainer.setBackground(null); menuContainer.setBackground(null);
return container; return container;
} }
@ -510,8 +512,6 @@ public class Toolbar extends Dialog implements GameEventListener {
// Farbe setzen // Farbe setzen
playerLabel.setColor(playerColor); playerLabel.setColor(playerColor);
playerLabel.setFontSize(20);
// Label zum Container hinzufügen // Label zum Container hinzufügen
overviewContainer.addChild(playerLabel); overviewContainer.addChild(playerLabel);