Feat: Add chat box into the game screen

Refs #107
This commit is contained in:
Mathis Ginkel
2026-04-23 11:57:48 +02:00
parent 277b776fec
commit 40e558be18
2 changed files with 2 additions and 6 deletions
@@ -143,6 +143,7 @@ public class CasinoGameController {
private static final double CHAT_WIDTH = 400; private static final double CHAT_WIDTH = 400;
private static final double CHAT_HEIGHT = 600; private static final double CHAT_HEIGHT = 600;
private ChatController chatController;
private String chatUsername; private String chatUsername;
private ClientService chatClientService; private ClientService chatClientService;
private int chatLobbyId = -1; private int chatLobbyId = -1;
@@ -266,7 +267,7 @@ public class CasinoGameController {
this.chatUsername = username; this.chatUsername = username;
this.chatClientService = clientService; this.chatClientService = clientService;
this.chatLobbyId = lobbyId; this.chatLobbyId = lobbyId;
//initializeChatIfPossible(); //startChat(chatController);
} }
/** /**
@@ -59,9 +59,6 @@ public class CasinoGameUI extends Application {
CasinoGameUI.username = username; CasinoGameUI.username = username;
} }
public static void setChatController(ChatController chatController) {
CasinoGameUI.chatController = chatController;
}
/** /**
* Sets the lobby ID to be used by the application. * Sets the lobby ID to be used by the application.
@@ -124,8 +121,6 @@ public class CasinoGameUI extends Application {
Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();
CasinoGameController controller = fxmlLoader.getController(); CasinoGameController controller = fxmlLoader.getController();
controller.startChat(chatController);
if (lobbyId <= 0) { if (lobbyId <= 0) {
throw new IllegalStateException("CasinoGameUI: lobbyId must be set before start()"); throw new IllegalStateException("CasinoGameUI: lobbyId must be set before start()");
} }