Commit ab413f8c authored by Matyáš Latner's avatar Matyáš Latner

#19 Open main menu on application pause event

parent 257fdb11
......@@ -59,6 +59,10 @@ android {
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
def getVersionCodeFromGit() {
......
package cz.nic.tablexia;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.badlogic.gdx.utils.reflect.ReflectionException;
......@@ -115,7 +116,14 @@ public class Tablexia extends TablexiaApplication {
startLoading(TablexiaSettings.getInstance().getLocale());
}
@Override
@Override
public void pause() {
super.pause();
// don't use menu open animation for android pause event (animation is run after resume on android)
mainMenuContainer.openMainMenu(!Gdx.app.getType().equals(Application.ApplicationType.Android));
}
@Override
public void render () {
// render other screens
super.render();
......
......@@ -53,4 +53,8 @@ public class MainMenuContainer extends Group {
screenDimmer.setColor(screenDimmer.getColor().r, screenDimmer.getColor().g, screenDimmer.getColor().b, mainMenu.getMenuOpenPercentage());
}
}
public void openMainMenu(boolean animated) {
mainMenu.openMenu(animated);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment