mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 19:49: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.font.BitmapText;
|
||||||
import com.jme3.math.ColorRGBA;
|
import com.jme3.math.ColorRGBA;
|
||||||
|
import com.jme3.math.Vector2f;
|
||||||
import com.jme3.math.Vector3f;
|
import com.jme3.math.Vector3f;
|
||||||
import com.simsilica.lemur.Axis;
|
import com.simsilica.lemur.*;
|
||||||
import com.simsilica.lemur.Button;
|
import com.simsilica.lemur.component.IconComponent;
|
||||||
import com.simsilica.lemur.Container;
|
|
||||||
import com.simsilica.lemur.Label;
|
|
||||||
import com.simsilica.lemur.Panel;
|
|
||||||
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||||
import com.simsilica.lemur.component.SpringGridLayout;
|
import com.simsilica.lemur.component.SpringGridLayout;
|
||||||
|
|
||||||
@ -39,7 +37,6 @@ public class Toolbar extends Dialog {
|
|||||||
* Konstruktor für die Toolbar.
|
* Konstruktor für die Toolbar.
|
||||||
*
|
*
|
||||||
* @param app Die Hauptanwendung (MonopolyApp)
|
* @param app Die Hauptanwendung (MonopolyApp)
|
||||||
* @param cube Der Würfel, der bewegt werden soll
|
|
||||||
*/
|
*/
|
||||||
public Toolbar(MonopolyApp app) {
|
public Toolbar(MonopolyApp app) {
|
||||||
super(app.getDialogManager());
|
super(app.getDialogManager());
|
||||||
@ -95,14 +92,34 @@ public class Toolbar extends Dialog {
|
|||||||
// Create the first container (leftContainer)
|
// Create the first container (leftContainer)
|
||||||
Container leftContainer = new Container();
|
Container leftContainer = new Container();
|
||||||
leftContainer.setPreferredSize(new Vector3f(100, 150, 0)); // Adjust size as needed
|
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)
|
// Create the second container (rightContainer)
|
||||||
Container rightContainer = new Container();
|
Container rightContainer = new Container();
|
||||||
rightContainer.setPreferredSize(new Vector3f(100, 150, 0)); // Adjust size as needed
|
rightContainer.setPreferredSize(new Vector3f(100, 150, 0)); // Adjust size as needed
|
||||||
rightContainer.addChild(new Label("Right Container", new ElementId("label")));
|
leftContainer.setBackground(null);
|
||||||
rightContainer.addChild(new Button("Button 2"));
|
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
|
// Add leftContainer and rightContainer to the horizontal container
|
||||||
horizontalContainer.addChild(leftContainer);
|
horizontalContainer.addChild(leftContainer);
|
||||||
|
Loading…
Reference in New Issue
Block a user