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