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