public static void showMsgDialog(final Stage stage, final String title, final String msg) { Timer.post(new Task() { @Override public void run() { Message.hideMsg(); new Dialog(title, skin).text(msg).button("Close", true).key(Keys.ENTER, true).key(Keys.ESCAPE, false) .show(stage); } }); } }
@SuppressWarnings("unused") public static void showMsg(final Stage stage, final String text, final boolean modal) { // show in the next frame to allow calling when no OpenGL context is available. Timer.post(new Task() { @Override public void run() { isModal = modal; if (text == null) { hideMsg(); return; } add(stage, text); if (FADE_DURATION > 0) { msg.getColor().a = 0; msg.addAction(Actions.fadeIn(FADE_DURATION, Interpolation.fade)); } } }); }
@SuppressWarnings("unused") public static void showMsg(final Stage stage, final String text, final float duration) { Timer.post(new Task() { @Override public void run() { isModal = false; if (text == null) { hideMsg(); return; } add(stage, text); if (FADE_DURATION > 0) { msg.getColor().a = 0; msg.addAction(sequence(Actions.fadeIn(FADE_DURATION, Interpolation.fade), Actions.delay(duration, sequence(fadeOut(FADE_DURATION, Interpolation.fade), Actions.removeActor())))); } else { msg.addAction(sequence(Actions.delay(duration, Actions.removeActor()))); } } }); }
String msg = "The game have custom actions that can not be loaded. Probably the game needs to be compiled. Trying 'gradlew compile'..."; Message.showMsg(stage, msg, true); Timer.post(new Task() { @Override public void run() {
Timer.post(new Task() {
s = "LOADING..."; Timer.post(new Task() { @Override public void run() {