mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 23:59:44 +01:00
connect menu cow working
This commit is contained in:
parent
75d3bef5c8
commit
8b0ef97a82
@ -219,7 +219,7 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
setupInput();
|
||||
setupStates();
|
||||
setupGui();
|
||||
// new StartMenu(this).open();
|
||||
new StartMenu(this).open();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -319,6 +319,13 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
return draw;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to connect
|
||||
*/
|
||||
public void connect() {
|
||||
serverConnection.connect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a request to close the application.
|
||||
* If the request is initiated by pressing ESC, this parameter is true.
|
||||
|
@ -54,7 +54,7 @@ public class StartMenu extends Dialog {
|
||||
startButton.setFontSize(40); // Set the font size for the button text
|
||||
startButton.setTextHAlignment(HAlignment.Center); // Center the text horizontally
|
||||
|
||||
startButton.addClickCommands();
|
||||
startButton.addClickCommands(s -> app.connect());
|
||||
centerMenu.addChild(startButton);
|
||||
|
||||
// Position the center container in the middle of the screen
|
||||
@ -79,7 +79,7 @@ public class StartMenu extends Dialog {
|
||||
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 -> ifTopDialog(this::close));
|
||||
settingsButton.addClickCommands(source -> new SettingsMenu(app).open());
|
||||
lowerRightMenu.addChild(settingsButton);
|
||||
app.getGuiNode().attachChild(lowerRightMenu);
|
||||
|
||||
@ -133,7 +133,6 @@ public class StartMenu extends Dialog {
|
||||
|
||||
@Override
|
||||
public void escape() {
|
||||
// TODO Auto-generated method stub
|
||||
super.escape();
|
||||
close();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user