mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 17:29:44 +01:00
Deckhelper korrigiert
This commit is contained in:
parent
88409dcc99
commit
16b4dbae18
@ -5,12 +5,10 @@ import java.util.Random;
|
||||
|
||||
import com.jme3.font.BitmapText;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector2f;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.simsilica.lemur.Axis;
|
||||
import com.simsilica.lemur.Button;
|
||||
import com.simsilica.lemur.Container;
|
||||
import com.simsilica.lemur.Label;
|
||||
import com.simsilica.lemur.Panel;
|
||||
import com.simsilica.lemur.*;
|
||||
import com.simsilica.lemur.component.IconComponent;
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||
import com.simsilica.lemur.component.SpringGridLayout;
|
||||
|
||||
@ -39,7 +37,6 @@ public class Toolbar extends Dialog {
|
||||
* Konstruktor für die Toolbar.
|
||||
*
|
||||
* @param app Die Hauptanwendung (MonopolyApp)
|
||||
* @param cube Der Würfel, der bewegt werden soll
|
||||
*/
|
||||
public Toolbar(MonopolyApp app) {
|
||||
super(app.getDialogManager());
|
||||
@ -92,23 +89,43 @@ public class Toolbar extends Dialog {
|
||||
Container horizontalContainer = new Container(new SpringGridLayout(Axis.X, Axis.Y));
|
||||
horizontalContainer.setPreferredSize(new Vector3f(200, 150, 0)); // Adjust size as needed
|
||||
|
||||
// Create the first container (leftContainer)
|
||||
// Create the first container (leftContainer)
|
||||
Container leftContainer = new Container();
|
||||
leftContainer.setPreferredSize(new Vector3f(100, 150, 0)); // Adjust size as needed
|
||||
leftContainer.addChild(new Label("Left Container", new ElementId("label")));
|
||||
leftContainer.addChild(new Button("Button 1"));
|
||||
|
||||
Label imageLabel = new Label("");
|
||||
IconComponent icon = new IconComponent("Pictures/dice/one.png"); // Icon mit Textur erstellen
|
||||
icon.setIconSize(new Vector2f(100,100)); // Skalierung des Bildes
|
||||
imageLabel.setIcon(icon);
|
||||
|
||||
Label imageLabel2 = new Label("");
|
||||
IconComponent icon2 = new IconComponent("Pictures/dice/two.png"); // Icon mit Textur erstellen
|
||||
icon2.setIconSize(new Vector2f(100,100)); // Skalierung des Bildes
|
||||
imageLabel2.setIcon(icon2);
|
||||
|
||||
// Create the second container (rightContainer)
|
||||
Container rightContainer = new Container();
|
||||
rightContainer.setPreferredSize(new Vector3f(100, 150, 0)); // Adjust size as needed
|
||||
rightContainer.addChild(new Label("Right Container", new ElementId("label")));
|
||||
rightContainer.addChild(new Button("Button 2"));
|
||||
leftContainer.setBackground(null);
|
||||
rightContainer.setBackground(null);
|
||||
diceContainer.setBackground(null);
|
||||
horizontalContainer.setBackground(null);
|
||||
|
||||
imageLabel.setTextVAlignment(VAlignment.Center);
|
||||
imageLabel.setTextHAlignment(HAlignment.Center);
|
||||
imageLabel2.setTextVAlignment(VAlignment.Center);
|
||||
imageLabel2.setTextHAlignment(HAlignment.Center);
|
||||
|
||||
leftContainer.addChild(imageLabel);
|
||||
rightContainer.addChild(imageLabel2);
|
||||
|
||||
|
||||
|
||||
// Add leftContainer and rightContainer to the horizontal container
|
||||
horizontalContainer.addChild(leftContainer);
|
||||
horizontalContainer.addChild(rightContainer);
|
||||
|
||||
// Add the horizontalContainer to the diceContainer (top section)
|
||||
// Add the horizontalContainer to the diceContainer (top section)
|
||||
diceContainer.addChild(horizontalContainer);
|
||||
|
||||
// Add the Würfeln button directly below the horizontalContainer
|
||||
|
Loading…
Reference in New Issue
Block a user