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