fikk skjermen til å gå til forskjelige skjermer utifra om du var server eller klient

This commit is contained in:
Tobydrama 2020-04-06 15:16:59 +02:00
parent 2cc8cd8d69
commit c2dc12ad87

View File

@ -35,7 +35,12 @@ public class UsernameScreen extends AbstractScreen {
@Override @Override
public void touchUp(InputEvent e, float x, float y, int point, int button){ public void touchUp(InputEvent e, float x, float y, int point, int button){
System.out.println(txtinput.getText()); System.out.println(txtinput.getText());
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper)); if (roboRallyWrapper.server == null) {
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper));
}
else{
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLobbyScreen(roboRallyWrapper));
}
} }
}); });
txtinput = new TextField("",skin); txtinput = new TextField("",skin);