diff --git a/src/ru/nsu/ccfit/zuev/osu/MainScene.java b/src/ru/nsu/ccfit/zuev/osu/MainScene.java index 302b3bc82..6b780e520 100644 --- a/src/ru/nsu/ccfit/zuev/osu/MainScene.java +++ b/src/ru/nsu/ccfit/zuev/osu/MainScene.java @@ -5,7 +5,9 @@ import android.os.PowerManager; import android.util.Log; +import com.reco1l.andengine.Anchor; import com.reco1l.andengine.shape.RoundedBox; +import com.reco1l.andengine.sprite.ExtendedSprite; import com.reco1l.osu.data.BeatmapInfo; import com.reco1l.osu.Execution; import com.reco1l.osu.ui.entity.MainMenu; @@ -170,13 +172,30 @@ public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, menu = new MainMenu(this); - // Only show build type if it's not release - String versionString = BuildConfig.VERSION_NAME + String.format(" (%s)", BuildConfig.BUILD_TYPE).replace(" (release)", ""); + if (BuildConfig.DEBUG) { + ResourceManager.getInstance().loadHighQualityAsset("dev-build-overlay", "dev-build-overlay.png"); + + ExtendedSprite debugOverlay = new ExtendedSprite(ResourceManager.getInstance().getTexture("dev-build-overlay")); + debugOverlay.setPosition(Config.getRES_WIDTH() / 2f, Config.getRES_HEIGHT()); + debugOverlay.setOrigin(Anchor.BottomCenter); + scene.attachChild(debugOverlay); + + Text debugText = new Text(0, 0, ResourceManager.getInstance().getFont("smallFont"), "DEVELOPMENT BUILD"); + debugText.setColor(1f, 237f / 255f, 0f); + debugText.setPosition((Config.getRES_WIDTH() - debugText.getWidth()) / 2f, Config.getRES_HEIGHT() - debugOverlay.getHeight() - 1f - debugText.getHeight()); + + Text debugTextShadow = new Text(0, 0, ResourceManager.getInstance().getFont("smallFont"), "DEVELOPMENT BUILD"); + debugTextShadow.setColor(0f, 0f, 0f, 0.5f); + debugTextShadow.setPosition((Config.getRES_WIDTH() - debugText.getWidth()) / 2f + 2f, Config.getRES_HEIGHT() - debugOverlay.getHeight() - 1f - debugText.getHeight() + 2f); + + scene.attachChild(debugTextShadow); + scene.attachChild(debugText); + } RoundedBox box = new RoundedBox() { { - Text versionText = new Text(10f, 2f, ResourceManager.getInstance().getFont("font"), "osu!droid " + versionString); + Text versionText = new Text(10f, 2f, ResourceManager.getInstance().getFont("smallFont"), "osu!droid " + BuildConfig.VERSION_NAME); attachChild(versionText); setSize(versionText.getWidth() + 20f, versionText.getHeight() + 4f); @@ -190,17 +209,17 @@ public boolean onAreaTouched(TouchEvent event, float localX, float localY) { new MessageDialog() .setTitle("About") .setMessage( - "
Made by osu!droid team
osu! is © peppy 2007-2024
Made by osu!droid team
osu! is © peppy 2007-2024