mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +01:00
TopDialog
This commit is contained in:
parent
737576e0ca
commit
486c0a9810
@ -67,19 +67,19 @@ public class BuildingPropertyCard extends Dialog {
|
|||||||
// Beenden-Button
|
// Beenden-Button
|
||||||
Button quitButton = buildingPropertyContainer.addChild(new Button("Beenden", new ElementId("button")));
|
Button quitButton = buildingPropertyContainer.addChild(new Button("Beenden", new ElementId("button")));
|
||||||
quitButton.setFontSize(32);
|
quitButton.setFontSize(32);
|
||||||
quitButton.addClickCommands(s -> {
|
quitButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
System.err.println("Button does something?");
|
System.err.println("Button does something?");
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
// Kaufen-Button
|
// Kaufen-Button
|
||||||
Button buyButton = buildingPropertyContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
Button buyButton = buildingPropertyContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
||||||
buyButton.setFontSize(32);
|
buyButton.setFontSize(32);
|
||||||
buyButton.addClickCommands(s -> {
|
buyButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
close();
|
close();
|
||||||
app.getGameLogic().send(new BuyPropertyResponse());
|
app.getGameLogic().send(new BuyPropertyResponse());
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
buildingPropertyContainer.setLocalTranslation(
|
buildingPropertyContainer.setLocalTranslation(
|
||||||
|
@ -63,10 +63,10 @@ public class EventCardPopup extends Dialog {
|
|||||||
// Beenden-Button
|
// Beenden-Button
|
||||||
Button quitButton = eventCardContainer.addChild(new Button("Jawohl", new ElementId("button")));
|
Button quitButton = eventCardContainer.addChild(new Button("Jawohl", new ElementId("button")));
|
||||||
quitButton.setFontSize(32);
|
quitButton.setFontSize(32);
|
||||||
quitButton.addClickCommands(source -> {
|
quitButton.addClickCommands(source -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
eventCardContainer.setLocalTranslation(
|
eventCardContainer.setLocalTranslation(
|
||||||
|
@ -77,18 +77,18 @@ public class FoodFieldCard extends Dialog {
|
|||||||
// Beenden-Button
|
// Beenden-Button
|
||||||
Button quitButton = foodFieldContainer.addChild(new Button("Beenden", new ElementId("button")));
|
Button quitButton = foodFieldContainer.addChild(new Button("Beenden", new ElementId("button")));
|
||||||
quitButton.setFontSize(32);
|
quitButton.setFontSize(32);
|
||||||
quitButton.addClickCommands(s -> {
|
quitButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
// Kaufen-Button
|
// Kaufen-Button
|
||||||
Button buyButton = foodFieldContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
Button buyButton = foodFieldContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
||||||
buyButton.setFontSize(32);
|
buyButton.setFontSize(32);
|
||||||
buyButton.addClickCommands(s -> {
|
buyButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
app.getGameLogic().send(new BuyPropertyResponse());
|
app.getGameLogic().send(new BuyPropertyResponse());
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
foodFieldContainer.setLocalTranslation(
|
foodFieldContainer.setLocalTranslation(
|
||||||
|
@ -69,18 +69,18 @@ public class GateFieldCard extends Dialog {
|
|||||||
// Beenden-Button
|
// Beenden-Button
|
||||||
Button quitButton = gateFieldContainer.addChild(new Button("Beenden", new ElementId("button")));
|
Button quitButton = gateFieldContainer.addChild(new Button("Beenden", new ElementId("button")));
|
||||||
quitButton.setFontSize(32);
|
quitButton.setFontSize(32);
|
||||||
quitButton.addClickCommands(s -> {
|
quitButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
// Kaufen-Button
|
// Kaufen-Button
|
||||||
Button buyButton = gateFieldContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
Button buyButton = gateFieldContainer.addChild(new Button("Kaufen", new ElementId("button")));
|
||||||
buyButton.setFontSize(32);
|
buyButton.setFontSize(32);
|
||||||
buyButton.addClickCommands(s -> {
|
buyButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||||
app.getGameLogic().playSound(Sound.BUTTON);
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
app.getGameLogic().send(new BuyPropertyResponse());
|
app.getGameLogic().send(new BuyPropertyResponse());
|
||||||
close();
|
close();
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
gateFieldContainer.setLocalTranslation(
|
gateFieldContainer.setLocalTranslation(
|
||||||
|
@ -13,6 +13,7 @@ import com.simsilica.lemur.component.QuadBackgroundComponent;
|
|||||||
import com.simsilica.lemur.style.ElementId;
|
import com.simsilica.lemur.style.ElementId;
|
||||||
import pp.dialog.Dialog;
|
import pp.dialog.Dialog;
|
||||||
import pp.monopoly.client.MonopolyApp;
|
import pp.monopoly.client.MonopolyApp;
|
||||||
|
import pp.monopoly.notification.Sound;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gulag is a warning popup that is triggered when a certain player enters the "Wache" field
|
* Gulag is a warning popup that is triggered when a certain player enters the "Wache" field
|
||||||
@ -54,17 +55,13 @@ public class Gulag extends Dialog {
|
|||||||
gateFieldTitle.setFontSize(48);
|
gateFieldTitle.setFontSize(48);
|
||||||
gateFieldTitle.setColor(ColorRGBA.Black);
|
gateFieldTitle.setColor(ColorRGBA.Black);
|
||||||
|
|
||||||
// Text, der auf der Karte steht
|
|
||||||
/* Container textContainer = gulagContainer.addChild(new Container());
|
|
||||||
textContainer.addChild(new Label("Du hast die Verbindung verloren und kannst nichts dagegen machen. Akzeptiere einfach, dass du verloren hast!", new ElementId("label-Text")));
|
|
||||||
textContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
|
||||||
textContainer.setPreferredSize(gulagContainer.getPreferredSize().addLocal(-250,-200,0));
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Beenden-Button
|
// Beenden-Button
|
||||||
Button quitButton = gulagContainer.addChild(new Button("Jawohl Gulag", new ElementId("button")));
|
Button quitButton = gulagContainer.addChild(new Button("Jawohl Gulag", new ElementId("button")));
|
||||||
quitButton.setFontSize(32);
|
quitButton.setFontSize(32);
|
||||||
quitButton.addClickCommands(source -> close());
|
quitButton.addClickCommands(source -> ifTopDialog(() -> {
|
||||||
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
|
close();
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
|
Loading…
Reference in New Issue
Block a user