diff --git a/core/src/main/assets/interfaces/menu_button.png b/core/src/main/assets/interfaces/menu_button.png index b8c6d2ba7..be59d1c8c 100644 Binary files a/core/src/main/assets/interfaces/menu_button.png and b/core/src/main/assets/interfaces/menu_button.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 24f9171e7..392ff0b6f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; +import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.WelcomeScene; import com.watabou.noosa.Game; import com.watabou.noosa.audio.Music; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/Updates.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/Updates.java index 6175ee770..cfb8562d1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/Updates.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/Updates.java @@ -102,6 +102,10 @@ public class Updates { } } + public static boolean supportsReviews() { + return supportsUpdates() && service.supportsReviews(); + } + public static void launchReview(Callback callback){ if (supportsUpdates()){ service.initializeReview(new UpdateService.ReviewResultCallback() { @@ -115,4 +119,10 @@ public class Updates { } } + public static void openReviewURI(){ + if (supportsUpdates()){ + service.openReviewURI(); + } + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index 618888ac7..9d74965e4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -551,7 +551,7 @@ public class WndSettings extends WndTabbed { chkNews.checked(SPDSettings.news()); add(chkNews); - if (Updates.supportsUpdates()) { + if (Updates.supportsUpdates() && Updates.isUpdateable()) { chkUpdates = new CheckBox(Messages.get(this, "updates")) { @Override protected void onClick() { diff --git a/services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java b/services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java index d656e0f61..bb7cd74e1 100644 --- a/services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java +++ b/services/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/UpdateService.java @@ -50,6 +50,10 @@ public abstract class UpdateService { public abstract void onComplete(); } + public abstract boolean supportsReviews(); + public abstract void initializeReview( ReviewResultCallback callback ); + public abstract void openReviewURI(); + } diff --git a/services/updates/debugUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/DebugUpdates.java b/services/updates/debugUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/DebugUpdates.java index 120e9e9ab..1f417521e 100644 --- a/services/updates/debugUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/DebugUpdates.java +++ b/services/updates/debugUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/DebugUpdates.java @@ -70,10 +70,19 @@ public class DebugUpdates extends UpdateService { //does nothing } + @Override + public boolean supportsReviews() { + return true; + } + @Override public void initializeReview(ReviewResultCallback callback) { //does nothing callback.onComplete(); } + @Override + public void openReviewURI() { + DeviceCompat.openURI("https://www.google.com/"); + } } diff --git a/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java b/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java index a59d02d79..5a76fd4a1 100644 --- a/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java +++ b/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java @@ -138,9 +138,19 @@ public class GitHubUpdates extends UpdateService { //does nothing, always installed } + @Override + public boolean supportsReviews() { + return false; + } + @Override public void initializeReview(ReviewResultCallback callback) { //does nothing, no review functionality here callback.onComplete(); } + + @Override + public void openReviewURI() { + //does nothing + } }