mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
NoMoneywarning and TimeOut use Dialogmanager now
This commit is contained in:
parent
e65c2661f7
commit
c2c22f9ae5
@ -13,6 +13,7 @@ import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||
import com.simsilica.lemur.style.ElementId;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.notification.Sound;
|
||||
|
||||
/**
|
||||
* NoMoneyWarning is a warning popup that appears when a player tries to perform
|
||||
@ -77,10 +78,13 @@ public class NoMoneyWarning extends Dialog {
|
||||
// Passt den textContainer an die Größe des bankruptContainers an
|
||||
textContainer.setPreferredSize(noMoneyWarningContainer.getPreferredSize().addLocal(-250,-200,0));
|
||||
|
||||
// Beenden-Button
|
||||
// Bestätigen-Button
|
||||
Button quitButton = noMoneyWarningContainer.addChild(new Button("Bestätigen", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
quitButton.addClickCommands(source -> close());
|
||||
quitButton.addClickCommands(source -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
close();
|
||||
}));
|
||||
|
||||
|
||||
// Zentriere das Popup
|
||||
|
@ -118,7 +118,6 @@ public class ReceivedRent extends Dialog {
|
||||
payButton.addClickCommands(s -> ifTopDialog( () -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
close();
|
||||
|
||||
}));
|
||||
|
||||
return container;
|
||||
|
@ -78,7 +78,10 @@ public class TimeOut extends Dialog {
|
||||
// Beenden-Button
|
||||
Button quitButton = timeOutContainer.addChild(new Button("Bestätigen", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
quitButton.addClickCommands(source -> close());
|
||||
quitButton.addClickCommands(source -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
close();
|
||||
}));
|
||||
|
||||
|
||||
// Zentriere das Popup
|
||||
|
Loading…
Reference in New Issue
Block a user