mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 18:23:44 +01:00
fixed TradeMenu formating
This commit is contained in:
parent
fcb55e52fc
commit
36b308e616
@ -84,24 +84,6 @@ public class TradeMenu extends Dialog {
|
||||
mainContent.addChild(createMiddleSection());
|
||||
mainContent.addChild(createTradeColumn("Wähle Zielobjekt:", false));
|
||||
|
||||
Container buttons = mainContent.addChild(new Container(new SpringGridLayout()));
|
||||
Button cancel = new Button("Abbrechen");
|
||||
cancel.addClickCommands(s -> ifTopDialog(() -> {
|
||||
close();
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
}));
|
||||
|
||||
Button trade = new Button("Handeln");
|
||||
trade.addClickCommands(s -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
setTrades();
|
||||
app.getGameLogic().send(new TradeOffer(tradeHandler));
|
||||
close();
|
||||
}));
|
||||
|
||||
buttons.addChild(cancel);
|
||||
buttons.addChild(trade);
|
||||
|
||||
return mainContent;
|
||||
}
|
||||
|
||||
@ -196,16 +178,30 @@ public class TradeMenu extends Dialog {
|
||||
leftSelectionsField = middleSection.addChild(new TextField(""));
|
||||
leftSelectionsField.setPreferredSize(new Vector3f(600, 50, 0));
|
||||
|
||||
Label arrows = middleSection.addChild(new Label("⇅"));
|
||||
arrows.setFontSize(40);
|
||||
Container buttons = middleSection.addChild(new Container(new SpringGridLayout()));
|
||||
Button cancel = new Button("Abbrechen");
|
||||
cancel.addClickCommands(s -> ifTopDialog(() -> {
|
||||
close();
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
}));
|
||||
|
||||
rightSelectionsField = middleSection.addChild(new TextField(""));
|
||||
rightSelectionsField.setPreferredSize(new Vector3f(600, 50, 0));
|
||||
Button trade = new Button("Handeln");
|
||||
trade.addClickCommands(s -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
setTrades();
|
||||
app.getGameLogic().send(new TradeOffer(tradeHandler));
|
||||
close();
|
||||
}));
|
||||
|
||||
buttons.addChild(cancel);
|
||||
buttons.addChild(trade);
|
||||
|
||||
Label middleLabelBottom = middleSection.addChild(new Label("Gebäude: Währung: Sonderkarten:"));
|
||||
middleLabelBottom.setFontSize(24);
|
||||
middleLabelBottom.setInsets(new Insets3f(5, 5, 5, 5));
|
||||
|
||||
rightSelectionsField = middleSection.addChild(new TextField(""));
|
||||
rightSelectionsField.setPreferredSize(new Vector3f(600, 50, 0));
|
||||
return middleSection;
|
||||
}
|
||||
|
||||
@ -217,6 +213,7 @@ public class TradeMenu extends Dialog {
|
||||
private void styleTextField(TextField textField) {
|
||||
textField.setInsets(new Insets3f(5, 10, 5, 10));
|
||||
textField.setBackground(new QuadBackgroundComponent(ColorRGBA.Black));
|
||||
textField.setPreferredSize(new Vector3f(300, 30, 0));
|
||||
}
|
||||
|
||||
private void assignSelectors(Selector<String> buildingSelector, Selector<String> specialCardSelector, TextField currencyInput, boolean isLeft) {
|
||||
@ -281,7 +278,6 @@ public class TradeMenu extends Dialog {
|
||||
}
|
||||
for (String property : leftselBuildings) {
|
||||
buildingText.append(property);
|
||||
buildingText.append(", ");
|
||||
}
|
||||
} else {
|
||||
if (rightselBuildings.contains(building.getSelectedItem())) {
|
||||
@ -291,7 +287,6 @@ public class TradeMenu extends Dialog {
|
||||
}
|
||||
for (String property : rightselBuildings) {
|
||||
buildingText.append(property);
|
||||
buildingText.append(", ");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user