mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-04-17 12:40:59 +02:00
Compare commits
No commits in common. "38824895bb9e78580c48b3e157e7ffa2e05530d6" and "646d301554c8fa3f804ec602ad72b45c1f438f32" have entirely different histories.
38824895bb
...
646d301554
@ -1,39 +0,0 @@
|
|||||||
package pp.monopoly.client.gui;
|
|
||||||
|
|
||||||
import com.jme3.texture.Texture;
|
|
||||||
import com.simsilica.lemur.Button;
|
|
||||||
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
|
||||||
import com.simsilica.lemur.style.ElementId;
|
|
||||||
|
|
||||||
import pp.monopoly.client.MonopolyApp;
|
|
||||||
|
|
||||||
public class ImageButton extends Button {
|
|
||||||
|
|
||||||
private final String file;
|
|
||||||
private static MonopolyApp app;
|
|
||||||
|
|
||||||
public ImageButton( String s, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, new ElementId(ELEMENT_ID), null, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageButton( String s, String style, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, new ElementId(ELEMENT_ID), style, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageButton( String s, ElementId elementId, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, elementId, null, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageButton( String s, ElementId elementId, String style, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, elementId, style, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ImageButton( String s, boolean applyStyles, ElementId elementId, String style, String file, MonopolyApp app ) {
|
|
||||||
super(s, false, elementId, style);
|
|
||||||
this.file = file;
|
|
||||||
ImageButton.app = app;
|
|
||||||
Texture backgroundImage = app.getAssetManager().loadTexture("Pictures/Buttons/"+file+".png");
|
|
||||||
setBackground(new QuadBackgroundComponent(backgroundImage));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -3,7 +3,6 @@ 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;
|
||||||
@ -129,12 +128,10 @@ 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());
|
||||||
@ -182,7 +179,7 @@ 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(null);
|
menuContainer.setBackground(createBackground());
|
||||||
|
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.4 MiB |
Loading…
Reference in New Issue
Block a user