Disable control during loading screen
This commit is contained in:
parent
ca38589f70
commit
908de02404
@ -87,6 +87,7 @@ public class ControlHandler {
|
||||
TITLE_PAGE,
|
||||
TITLE_MENU,
|
||||
MAIN_GAME,
|
||||
NO_INPUT,
|
||||
}
|
||||
|
||||
ControlsState state = ControlsState.TITLE_MENU;
|
||||
@ -179,6 +180,9 @@ public class ControlHandler {
|
||||
pollTypingControls();
|
||||
break;
|
||||
|
||||
case NO_INPUT:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -90,6 +90,9 @@ public class LoadingThread extends Thread {
|
||||
|
||||
loadingBox.setDraw(true);
|
||||
|
||||
//disable menu input
|
||||
Globals.controlHandler.setHandlerState(ControlHandler.ControlsState.NO_INPUT);
|
||||
|
||||
//initialize the terrain manager (server only)
|
||||
if(Globals.RUN_SERVER){
|
||||
initServerGameTerrainManager();
|
||||
@ -142,6 +145,7 @@ public class LoadingThread extends Thread {
|
||||
//hide cursor
|
||||
Globals.controlHandler.hideMouse();
|
||||
|
||||
|
||||
loadingBox.setDraw(false);
|
||||
|
||||
RenderUtils.recaptureScreen();
|
||||
@ -166,8 +170,12 @@ public class LoadingThread extends Thread {
|
||||
|
||||
|
||||
case LOAD_ARENA:
|
||||
|
||||
loadingBox.setDraw(true);
|
||||
|
||||
//disable menu input
|
||||
Globals.controlHandler.setHandlerState(ControlHandler.ControlsState.NO_INPUT);
|
||||
|
||||
|
||||
//init the data of the world
|
||||
initServerArenaWorldData();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user