mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 10:29:43 +01:00
removed the buttons on start
This commit is contained in:
parent
422faec281
commit
55778dbcea
@ -302,7 +302,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
*
|
||||
* @param isPressed Indicates whether the Escape key is pressed.
|
||||
*/
|
||||
private void escape(boolean isPressed) {
|
||||
public void escape(boolean isPressed) {
|
||||
if (!isPressed) return;
|
||||
if (dialogManager.showsDialog())
|
||||
dialogManager.escape();
|
||||
|
@ -69,7 +69,7 @@ public class CreateGameMenu extends SimpleDialog {
|
||||
addChild(input);
|
||||
// "Abbrechen"-Button
|
||||
cancelButton.setPreferredSize(new Vector3f(120, 40, 0));
|
||||
cancelButton.addClickCommands(source -> new StartMenu(app).open());
|
||||
cancelButton.addClickCommands(source -> close());
|
||||
addChild(cancelButton);
|
||||
cancelButton.addClickCommands(s -> new StartMenu(app));
|
||||
|
||||
@ -124,6 +124,11 @@ public class CreateGameMenu extends SimpleDialog {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void escape() {
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by {@linkplain pp.dialog.DialogManager#update(float)} for periodically
|
||||
* updating this dialog. T
|
||||
|
@ -209,7 +209,7 @@ public class LobbyMenu extends Dialog {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
public void escape() {
|
||||
super.close();
|
||||
}
|
||||
|
||||
|
@ -63,27 +63,6 @@ public class StartMenu extends Dialog {
|
||||
0));
|
||||
app.getGuiNode().attachChild(centerMenu);
|
||||
|
||||
// Lower-left container for "Spiel beenden" button
|
||||
Container lowerLeftMenu = new Container();
|
||||
lowerLeftMenu.setLocalTranslation(new Vector3f(100, 90, 0));
|
||||
Button quitButton = new Button("Spiel beenden");
|
||||
quitButton.setPreferredSize(new Vector3f(130, 40, 0)); // Increase button size slightly (width, height)
|
||||
quitButton.setFontSize(18);
|
||||
quitButton.addClickCommands(source -> ifTopDialog(app::closeApp));
|
||||
lowerLeftMenu.addChild(quitButton);
|
||||
app.getGuiNode().attachChild(lowerLeftMenu);
|
||||
|
||||
// Lower-right container for "Einstellungen" button
|
||||
Container lowerRightMenu = new Container();
|
||||
lowerRightMenu.setLocalTranslation(new Vector3f(screenWidth - 200, 90, 0));
|
||||
Button settingsButton = new Button("Einstellungen");
|
||||
settingsButton.setPreferredSize(new Vector3f(130, 40, 0)); // Increase button size slightly (width, height)
|
||||
settingsButton.setFontSize(18); // Increase the font size for the text
|
||||
settingsButton.addClickCommands(source -> new SettingsMenu(app).open());
|
||||
lowerRightMenu.addChild(settingsButton);
|
||||
app.getGuiNode().attachChild(lowerRightMenu);
|
||||
|
||||
|
||||
// Load the Monopoly logo as a texture
|
||||
Texture logoTexture = app.getAssetManager().loadTexture("Pictures/logo-monopoly.png");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user