|
|
|
@ -139,14 +139,14 @@ public class CreateGameScreen extends MenuScreen {
|
|
|
|
|
String sessionName = this.sessionName.getText();
|
|
|
|
|
if (sessionName.isBlank()) {
|
|
|
|
|
log.warn("Please choose a session name.");
|
|
|
|
|
this.sessionName.setStyle(skin.get("error", TextField.TextFieldStyle.class));
|
|
|
|
|
this.sessionName.setStyle(getTextFieldErrorStyle());
|
|
|
|
|
error = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String playerName = this.playerName.getText();
|
|
|
|
|
if (playerName.isBlank()) {
|
|
|
|
|
log.warn("Please choose a name.");
|
|
|
|
|
this.playerName.setStyle(skin.get("error", TextField.TextFieldStyle.class));
|
|
|
|
|
this.playerName.setStyle(getTextFieldErrorStyle());
|
|
|
|
|
error = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ public class CreateGameScreen extends MenuScreen {
|
|
|
|
|
timeout = Long.parseLong(this.timeOut.getText());
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
log.warn("Please choose a valid timeout.");
|
|
|
|
|
this.timeOut.setStyle(skin.get("error", TextField.TextFieldStyle.class));
|
|
|
|
|
this.timeOut.setStyle(getTextFieldErrorStyle());
|
|
|
|
|
error = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -165,7 +165,7 @@ public class CreateGameScreen extends MenuScreen {
|
|
|
|
|
config = Configuration.values()[selected];
|
|
|
|
|
} catch (ArrayIndexOutOfBoundsException e) {
|
|
|
|
|
log.warn("Please select a valid configuration.");
|
|
|
|
|
this.configurations.setStyle(skin.get("error", SelectBox.SelectBoxStyle.class));
|
|
|
|
|
this.configurations.setStyle(getSelectBoxErrorStyle());
|
|
|
|
|
error = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|