diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java index 89b44d2..50d10d5 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java @@ -6,7 +6,9 @@ import com.jme3.math.Vector3f; import com.simsilica.lemur.Axis; import com.simsilica.lemur.Button; import com.simsilica.lemur.Container; +import com.simsilica.lemur.HAlignment; import com.simsilica.lemur.Label; +import com.simsilica.lemur.VAlignment; import com.simsilica.lemur.component.IconComponent; import com.simsilica.lemur.component.QuadBackgroundComponent; import com.simsilica.lemur.component.SpringGridLayout; @@ -233,18 +235,39 @@ public class Toolbar extends Dialog implements GameEventListener { } private Button createTradeButton() { - tradeButton = new Button("Handeln", new ElementId("button-toolbar")); + + tradeButton = new Button("", new ElementId("button-toolbar")); tradeButton.setPreferredSize(new Vector3f(150, 50, 0)); - tradeButton.addClickCommands(s -> ifTopDialog(() -> { + + String iconTradePath = "icons/icon-handeln.png"; + IconComponent iconTrade = new IconComponent(iconTradePath); + iconTrade.setHAlignment(HAlignment.Center); + iconTrade.setVAlignment(VAlignment.Center); + iconTrade.setIconSize(new Vector2f(100, 100)); + + tradeButton.setIcon(iconTrade); + tradeButton.setFontSize(40); + + // Add click behavior + tradeButton.addClickCommands(source -> ifTopDialog(() -> { app.getGameLogic().playSound(Sound.BUTTON); new ChoosePartner(app).open(); })); + return tradeButton; } private Button createPropertyMenuButton() { - propertyMenuButton = new Button("Grundstücke", new ElementId("button-toolbar")); + propertyMenuButton = new Button("", new ElementId("button-toolbar")); propertyMenuButton.setPreferredSize(new Vector3f(150, 50, 0)); + + String iconBuildingPath = "icons/icon-gebaude.png"; + IconComponent iconBuilding = new IconComponent(iconBuildingPath); + iconBuilding.setHAlignment(HAlignment.Center); + iconBuilding.setVAlignment(VAlignment.Center); + iconBuilding.setIconSize(new Vector2f(75, 75)); + + propertyMenuButton.setIcon(iconBuilding); propertyMenuButton.setFontSize(30); propertyMenuButton.addClickCommands(s -> ifTopDialog(() -> { app.getGameLogic().playSound(Sound.BUTTON); @@ -254,9 +277,17 @@ public class Toolbar extends Dialog implements GameEventListener { } private Button createEndTurnButton() { - endTurnButton = new Button("Zug beenden", new ElementId("button-toolbar")); + endTurnButton = new Button("", new ElementId("button-toolbar")); endTurnButton.setFontSize(28); endTurnButton.setPreferredSize(new Vector3f(150, 50, 0)); + + String iconEndTurnPath = "icons/icon-zugbeenden.png"; + IconComponent iconEndTurn = new IconComponent(iconEndTurnPath); + iconEndTurn.setHAlignment(HAlignment.Center); + iconEndTurn.setVAlignment(VAlignment.Center); + iconEndTurn.setIconSize(new Vector2f(75, 75)); + + endTurnButton.setIcon(iconEndTurn); endTurnButton.addClickCommands(s -> ifTopDialog(() -> { app.getGameLogic().playSound(Sound.BUTTON); if (app.getGameLogic().getPlayerHandler().getPlayerById(app.getId()).getAccountBalance() < 0 && !bankruptPopUp) { diff --git a/Projekte/monopoly/client/src/main/resources/icons/icon-gebaude.png b/Projekte/monopoly/client/src/main/resources/icons/icon-gebaude.png new file mode 100644 index 0000000..795d4e5 Binary files /dev/null and b/Projekte/monopoly/client/src/main/resources/icons/icon-gebaude.png differ diff --git a/Projekte/monopoly/client/src/main/resources/icons/icon-handeln.png b/Projekte/monopoly/client/src/main/resources/icons/icon-handeln.png new file mode 100644 index 0000000..60390a0 Binary files /dev/null and b/Projekte/monopoly/client/src/main/resources/icons/icon-handeln.png differ diff --git a/Projekte/monopoly/client/src/main/resources/icons/icon-zugbeenden.png b/Projekte/monopoly/client/src/main/resources/icons/icon-zugbeenden.png new file mode 100644 index 0000000..2243ab6 Binary files /dev/null and b/Projekte/monopoly/client/src/main/resources/icons/icon-zugbeenden.png differ