Fixed: TCP error sending, Server Crashed on GUIClient
This commit is contained in:
@@ -137,9 +137,14 @@ public class GUI extends Application implements IView {
|
||||
@Override
|
||||
public void showError(ErrorType error,String message) {
|
||||
Platform.runLater(() -> {
|
||||
synchronized (miniModel) {
|
||||
controllerMain.isError = true;
|
||||
controllerMain.render();
|
||||
if(error==ErrorType.SERVER_CRASHED){
|
||||
primaryStage.setScene(loginScene);
|
||||
controllerLogin.showError(error);
|
||||
}else {
|
||||
synchronized (miniModel) {
|
||||
controllerMain.isError = true;
|
||||
controllerMain.render();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class LoginFXMLController {
|
||||
}
|
||||
}
|
||||
}
|
||||
private void showError(ErrorType errorType) {
|
||||
public void showError(ErrorType errorType) {
|
||||
labelErrore.setTextFill(Color.web("#e05050"));
|
||||
labelErrore.setText(errorType.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user