Feat: Add chat box into the game screen #303
+2
-1
@@ -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()");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user