mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Lar libgdx ta seg av avslutting av spillet
This commit is contained in:
parent
24b8f4812b
commit
81e43c65a7
@ -47,12 +47,13 @@ public class StartMenuScreen extends AbstractScreen {
|
|||||||
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
||||||
try {
|
try {
|
||||||
roboRallyWrapper.server = new RoboRallyServer();
|
roboRallyWrapper.server = new RoboRallyServer();
|
||||||
roboRallyWrapper.client = new RoboRallyClient("127.0.0.1",roboRallyWrapper);
|
roboRallyWrapper.client = new RoboRallyClient("127.0.0.1", roboRallyWrapper);
|
||||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getUsernameScreen(roboRallyWrapper));
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getUsernameScreen(roboRallyWrapper));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
//Hard fail
|
//Hard fail
|
||||||
System.exit(1);
|
Gdx.app.error("Server error", "Server could not be started");
|
||||||
|
Gdx.app.exit();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -80,7 +81,7 @@ public class StartMenuScreen extends AbstractScreen {
|
|||||||
quitButton.addListener(new InputListener() {
|
quitButton.addListener(new InputListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
||||||
System.exit(0);
|
Gdx.app.exit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user