Disable control during loading screen

This commit is contained in:
austin 2021-07-10 00:01:04 -04:00
parent ca38589f70
commit 908de02404
2 changed files with 12 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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();