Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aff0dd72be
@ -378,9 +378,6 @@ public class Client {
|
|||||||
chatApp.getGameController().clearAllNoiseDisplay();
|
chatApp.getGameController().clearAllNoiseDisplay();
|
||||||
dayNightChangeListener.setNoiseButtonInvisible(true);
|
dayNightChangeListener.setNoiseButtonInvisible(true);
|
||||||
break;
|
break;
|
||||||
case GuiParameters.getMembersInLobby:
|
|
||||||
updateLobbyMembers(data);
|
|
||||||
break;
|
|
||||||
case GuiParameters.viewChangeToGame:
|
case GuiParameters.viewChangeToGame:
|
||||||
chatApp.getLoungeSceneViewController().addGameView();
|
chatApp.getLoungeSceneViewController().addGameView();
|
||||||
gameStateModel.setGameOver(false);
|
gameStateModel.setGameOver(false);
|
||||||
@ -418,42 +415,6 @@ public class Client {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeLobbyFromGui(String data) {
|
|
||||||
loungeSceneViewController.removeLobbyFromView(data);
|
|
||||||
LOGGER.debug("Made it into removeLobbyFromGui()");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void makeNewLobby(String data) {
|
|
||||||
String[] params = data.split(":");
|
|
||||||
loungeSceneViewController.newLobby(params[0], params[1]);
|
|
||||||
LOGGER.debug("makeNewLobby() seems to have finished");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addPlayerToLobby(String data) {
|
|
||||||
String[] params = data.split(":");
|
|
||||||
loungeSceneViewController.addPlayerToLobby(params[0], params[1]);
|
|
||||||
LOGGER.debug("addPlayerToLobby() seems to have finished");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateLobbyMembers(String data) {
|
|
||||||
String[] dataArr = data.split(":");
|
|
||||||
String lobbyID = dataArr[0];
|
|
||||||
String adminName = dataArr[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateListOfLobbies(String data) {
|
|
||||||
String[] arr = data.split(":");
|
|
||||||
ObservableList<SimpleStringProperty> list = new SimpleListProperty<>();
|
|
||||||
int n = arr.length;
|
|
||||||
for (int i = 0; i < n; i = i + 2) {
|
|
||||||
list.add(new SimpleStringProperty(arr[i]));
|
|
||||||
//ChatController.getClient().addLobbyToList(new SimpleStringProperty(arr[i]));
|
|
||||||
}
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a new thread, thad adds a message to notificationText in the gameController, waits 3
|
* Starts a new thread, thad adds a message to notificationText in the gameController, waits 3
|
||||||
* seconds and deletes it again.
|
* seconds and deletes it again.
|
||||||
|
|||||||
@ -51,10 +51,15 @@ public class ListOfLobbiesController implements Initializable {
|
|||||||
|
|
||||||
|
|
||||||
public void updateList() {
|
public void updateList() {
|
||||||
clearVBox();
|
new Thread(new Runnable() {
|
||||||
for (LobbyModel lobby : LobbyDisplayHandler.getLobbies()) {
|
@Override
|
||||||
newTreeView(lobby.getId(), lobby.getAdmin(), chatApp.getcModel().getUsername(), lobby.getMembers());
|
public void run() {
|
||||||
}
|
clearVBox();
|
||||||
|
for (LobbyModel lobby : LobbyDisplayHandler.getLobbies()) {
|
||||||
|
newTreeView(lobby.getId(), lobby.getAdmin(), chatApp.getcModel().getUsername(), lobby.getMembers());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -31,6 +31,9 @@ public class LobbyDisplayHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateLobbies(String data) {
|
public void updateLobbies(String data) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
try {
|
try {
|
||||||
for (LobbyModel model : lobbies) {
|
for (LobbyModel model : lobbies) {
|
||||||
model.setHasBeenVisited(false);
|
model.setHasBeenVisited(false);
|
||||||
@ -56,6 +59,8 @@ public class LobbyDisplayHandler {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
LOGGER.info("empty list");
|
LOGGER.info("empty list");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addLobbyFromString(int id, String admin, boolean isOpen, String[] oneLobby) {
|
private void addLobbyFromString(int id, String admin, boolean isOpen, String[] oneLobby) {
|
||||||
|
|||||||
Reference in New Issue
Block a user