mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
Winner and Looser Popup close the game again
This commit is contained in:
parent
5d6440bd50
commit
d37017bfa0
@ -14,6 +14,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;
|
||||
|
||||
public class LooserPopUp extends Dialog {
|
||||
private final MonopolyApp app;
|
||||
@ -67,10 +68,13 @@ public class LooserPopUp extends Dialog {
|
||||
imageLabel.setIcon(icon);
|
||||
imageContainer.addChild(imageLabel); // Add the image label to the container
|
||||
|
||||
// Beenden-Button
|
||||
Button quitButton = LooserContainer.addChild(new Button("Spiel beenden", new ElementId("button")));
|
||||
//Beenden Button
|
||||
Button quitButton = LooserContainer.addChild(new Button("Spiel Beenden", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
quitButton.addClickCommands(source -> close());
|
||||
quitButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
app.closeApp();
|
||||
}));
|
||||
|
||||
|
||||
// Zentriere das Popup
|
||||
|
@ -14,6 +14,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;
|
||||
|
||||
public class WinnerPopUp extends Dialog {
|
||||
private final MonopolyApp app;
|
||||
@ -67,11 +68,13 @@ public class WinnerPopUp extends Dialog {
|
||||
imageLabel.setIcon(icon);
|
||||
imageContainer.addChild(imageLabel); // Add the image label to the container
|
||||
|
||||
// Beenden-Button
|
||||
Button quitButton = WinnerContainer.addChild(new Button("Spiel beenden", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
quitButton.addClickCommands(source -> close());
|
||||
|
||||
Button quitButton = WinnerContainer.addChild(new Button("Spiel Beenden", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
quitButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
app.closeApp();
|
||||
}));
|
||||
|
||||
// Zentriere das Popup
|
||||
WinnerContainer.setLocalTranslation(
|
||||
|
Loading…
Reference in New Issue
Block a user