@Override public void render(float delta) { Gdx.gl.glClearColor(Color.BLUE.r, Color.BLUE.g, Color.BLUE.b, Color.BLUE.a); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); game.batch.setProjectionMatrix(camera.combined); batch.begin(); font.draw(batch, "Loading Game", 32, 32); background.draw(batch); batch.end(); if (licenseVerified) { if (Gdx.input.isTouched()) { Logger.logMsg("transitioning to main menu screen"); game.setGameScreen(this, game.mainMenuScreen); dispose(); } } else { Dialog dialog = new Dialog("license key invalid", game.uiSkin) { protected void result(Object object) { Logger.logMsg("exiting"); Gdx.app.exit(); } }; dialog.text("Your license key is invalid, exiting..."); dialog.button("OK", true); dialog.show(stage); } }
@Override public void show() { if (Defines.DEMO_MODE == false) { licenseVerified = game.verifyLicense(); } else { licenseVerified = true; } }