add roomss

This commit is contained in:
Clément
2025-03-13 09:52:25 +01:00
parent 709a92aa4c
commit a4c5d3f67b
3 changed files with 25 additions and 6 deletions

View File

@@ -268,4 +268,16 @@ public class ClientGuiController implements ClientListener {
public void handleActualRoom(String roomName) {
}
public void createRoom() {
TextInputDialog dialog = new TextInputDialog();
dialog.setTitle("Create a room");
dialog.setHeaderText("Enter the name of the room");
dialog.setContentText("Room name:");
Optional<String> result = dialog.showAndWait();
result.ifPresent(name -> {
client.SendCreateRoom(name);
createChatEnv(name);
});
}
}