mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
set new toolbar background
This commit is contained in:
parent
a78261594d
commit
38824895bb
@ -3,6 +3,7 @@ package pp.monopoly.client.gui;
|
|||||||
import com.jme3.math.ColorRGBA;
|
import com.jme3.math.ColorRGBA;
|
||||||
import com.jme3.math.Vector2f;
|
import com.jme3.math.Vector2f;
|
||||||
import com.jme3.math.Vector3f;
|
import com.jme3.math.Vector3f;
|
||||||
|
import com.jme3.texture.Texture;
|
||||||
import com.simsilica.lemur.Axis;
|
import com.simsilica.lemur.Axis;
|
||||||
import com.simsilica.lemur.Button;
|
import com.simsilica.lemur.Button;
|
||||||
import com.simsilica.lemur.Container;
|
import com.simsilica.lemur.Container;
|
||||||
@ -128,10 +129,12 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Container createToolbarContainer() {
|
private Container createToolbarContainer() {
|
||||||
// Erstelle den Hauptcontainer
|
|
||||||
Container container = new Container(new SpringGridLayout(Axis.X, Axis.Y), "toolbar");
|
Container container = new Container(new SpringGridLayout(Axis.X, Axis.Y), "toolbar");
|
||||||
container.setLocalTranslation(0, 200, 0);
|
container.setLocalTranslation(0, 200, 0);
|
||||||
container.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 200, 0));
|
container.setPreferredSize(new Vector3f(app.getCamera().getWidth(), 200, 0));
|
||||||
|
Texture backgroundToolbar = app.getAssetManager().loadTexture("Pictures/toolbarbg.png");
|
||||||
|
QuadBackgroundComponent background = new QuadBackgroundComponent(backgroundToolbar);
|
||||||
|
container.setBackground(background);
|
||||||
|
|
||||||
// Spielerfarbe abrufen
|
// Spielerfarbe abrufen
|
||||||
Player currentPlayer = playerHandler.getPlayerById(app.getId());
|
Player currentPlayer = playerHandler.getPlayerById(app.getId());
|
||||||
@ -179,11 +182,11 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
menuContainer.addChild(createTradeButton());
|
menuContainer.addChild(createTradeButton());
|
||||||
menuContainer.addChild(createPropertyMenuButton());
|
menuContainer.addChild(createPropertyMenuButton());
|
||||||
menuContainer.addChild(createEndTurnButton());
|
menuContainer.addChild(createEndTurnButton());
|
||||||
menuContainer.setBackground(createBackground());
|
menuContainer.setBackground(null);
|
||||||
|
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Container createDiceSection() {
|
private Container createDiceSection() {
|
||||||
Container diceContainer = new Container(new SpringGridLayout(Axis.X, Axis.Y));
|
Container diceContainer = new Container(new SpringGridLayout(Axis.X, Axis.Y));
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 6.4 MiB |
Loading…
Reference in New Issue
Block a user