mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 10:29:43 +01:00
Merge branch 'gui' of https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02 into gui
This commit is contained in:
commit
dd9d9144dd
@ -83,11 +83,41 @@ public class Toolbar extends Dialog {
|
||||
|
||||
// Menü-Container: Ein Container für Würfel
|
||||
Container diceContainer = toolbarContainer.addChild(new Container());
|
||||
diceContainer.setLayout(new SpringGridLayout(Axis.X, Axis.Y));
|
||||
|
||||
// Create a horizontal container to align leftContainer and rightContainer side by side
|
||||
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)
|
||||
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"));
|
||||
|
||||
// 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"));
|
||||
|
||||
// Add leftContainer and rightContainer to the horizontal container
|
||||
horizontalContainer.addChild(leftContainer);
|
||||
horizontalContainer.addChild(rightContainer);
|
||||
|
||||
// Add the horizontalContainer to the diceContainer (top section)
|
||||
diceContainer.addChild(horizontalContainer);
|
||||
|
||||
// Add the Würfeln button directly below the horizontalContainer
|
||||
Button diceButton = new Button("Würfeln");
|
||||
diceButton.setPreferredSize(new Vector3f(200, 50, 0)); // Full width for Würfeln button
|
||||
diceButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||
rollDice();
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
}));
|
||||
diceContainer.addChild(diceButton);
|
||||
|
||||
|
||||
diceContainer.setPreferredSize(new Vector3f(400, 150, 0));
|
||||
diceContainer.addChild(new Label("Wo Würfel?", new ElementId("label")));
|
||||
diceContainer.addChild(addDiceRollButton());
|
||||
diceContainer.setBackground(null);
|
||||
|
||||
|
||||
// Menü-Container: Ein Nested-Container für Handeln, Grundstücke und Zug beenden
|
||||
|
Loading…
Reference in New Issue
Block a user