mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 03:29:44 +01:00
added server label
This commit is contained in:
parent
843052989b
commit
6157db51da
@ -228,4 +228,8 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
public MonopolyServer getMonopolyServer() {
|
||||
return monopolyServer;
|
||||
}
|
||||
|
||||
public ServerConnection getServerConnection() {
|
||||
return serverConnection;
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class CreateGameMenu {
|
||||
// "Selber hosten"-Button
|
||||
Button hostButton = buttonContainer.addChild(new Button("Selber hosten"));
|
||||
hostButton.setPreferredSize(new Vector3f(120, 40, 0));
|
||||
hostButton.addClickCommands(source -> app.startServer());
|
||||
hostButton.addClickCommands(source -> startServer());
|
||||
|
||||
// "Beitreten"-Button (vorerst funktionslos)
|
||||
Button joinButton = buttonContainer.addChild(new Button("Beitreten"));
|
||||
@ -123,4 +123,10 @@ public class CreateGameMenu {
|
||||
app.getGuiNode().detachChild(background); // Entfernt das Hintergrundbild
|
||||
StartMenu.createStartMenu(app);
|
||||
}
|
||||
|
||||
private void startServer() {
|
||||
app.start();
|
||||
app.getServerConnection().connect();
|
||||
JOptionPane.showMessageDialog(null, "Server Started");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user