Commit a1915afe authored by Ivar Nordvik Myrstad's avatar Ivar Nordvik Myrstad
Browse files

Merge branch '97-last-day-changes' into 'dev'

Resolve "Last day changes"

Closes #97

See merge request tobiasio/progark-gruppe-3!100
parents 88523cc7 3b0d79fa
......@@ -147,7 +147,7 @@ public class CreateNewTournamentState extends State {
innerTable.setBackground(backgroundTableBlueRounded);
innerTable.add(makeRow(nameLabel, nameDialog));
nameInputField.setMaxLength(10);
nameInputField.setMaxLength(9);
innerTable.add(nameInputField).size(nameFieldWidth, inputFieldHeight);
innerTable.row();
removeKeyPadAtTouch();
......
......@@ -216,6 +216,13 @@ public class LoginState extends State {
String username = usernameInputField.getText();
String password = passwordInputField.getText();
//Check if username = Username
if(username.equals("Username")){
errorLabel.setText(wrongLoginText);
return;
}
try {
Player player = QueryIntermediate.loginPlayer(username, password);
......
......@@ -21,6 +21,7 @@ import com.gameware.game.models.Round;
import com.gameware.game.models.Tournament;
import com.gameware.game.sprites.LoadingText;
import java.io.IOException;
import java.util.List;
public class ViewTournamentState extends State {
......@@ -61,7 +62,12 @@ public class ViewTournamentState extends State {
public ViewTournamentState(GameStateManager gsm, Tournament tournament, Round r) {
super(gsm);
this.tournament = tournament;
try {
this.tournament = QueryIntermediate.getSpecificTournament(tournament.get_id());
}catch (IOException e){
this.tournament = tournament;
}
this.round = r;
titleLabel.setText(tournament.getName());
roundDeadline.setText("Round deadline\n"+round.getDeadlineDate().toLocaleString());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment