1
0
mirror of https://github.com/inf112-v20/Fiasko.git synced 2025-03-05 09:39:47 +01:00

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

@ -35,8 +35,13 @@ 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());
if (roboRallyWrapper.server == null) {
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper)); roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(roboRallyWrapper));
} }
else{
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLobbyScreen(roboRallyWrapper));
}
}
}); });
txtinput = new TextField("",skin); txtinput = new TextField("",skin);
txtinput.setPosition(300,250); txtinput.setPosition(300,250);