diff --git a/core/src/main/assets/messages/scenes/scenes.properties b/core/src/main/assets/messages/scenes/scenes.properties index 93e6aa7d2..d78d34e83 100644 --- a/core/src/main/assets/messages/scenes/scenes.properties +++ b/core/src/main/assets/messages/scenes/scenes.properties @@ -66,8 +66,8 @@ scenes.startscene.title=Games in Progress scenes.startscene.new=New Game scenes.supporterscene.title=Support the Game +scenes.supporterscene$supportermessage.patreon=I want Shattered Pixel Dungeon to be free of ads and invasive microtransations as they ruin the experience of so many mobile games. Instead, I'd rather ask players to support the game directly!\n\nIf you enjoy Shattered Pixel Dungeon and want to help me keep making it, please consider supporting me on _Patreon!_ Patreon gives me a consistent income source, and lets me give supporters exclusive benefits!:\n_- Weekly mini-blogs_, with info about what I'm working on.\n_- Content Polls_, which directly affect content I'm developing.\n_- A Community Discord_, with a dev log and chat channels.\n_- More benefits to come_, as the Patreon community grows.\n\nYou can visit the Patreon page for more info. Thank you for your consideration! scenes.supporterscene.supporter_link=Go to Patreon Page -scenes.supporterscene$supportermessage.patreon=I want Shattered Pixel Dungeon to be free of ads and invasive microtransations, which ruin the experience of so many mobile games. Instead, I think it's best to just ask players for their support!\n\nIf you enjoy my game and want to help me keep making it, please consider supporting me through _Patreon!_ Patreon gives me a consistent income source, and lets me reward supporters with exclusive benefits!:\n_- Weekly mini-blogs_, with info about what I'm working on.\n_- Content Polls_, which directly affect content I'm developing.\n_- A Community Discord_, with a dev log and chat channels.\n_- More benefits to come_, as the Patreon community grows.\n\nYou can visit the Patreon page for more specific info. Thank you for your consideration! scenes.supporterscene$supportermessage.patreon_english=Note that Patreon rewards are only available in English. scenes.surfacescene.exit=Game Over diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java index 2535418e6..89c9768e2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java @@ -59,7 +59,7 @@ public class AboutScene extends PixelScene { String shpxLink = "https://ShatteredPixel.com"; //tracking codes, so that the website knows where this pageview came from - shpxLink += "/?utm_source=shatteredpd"; + shpxLink += "?utm_source=shatteredpd"; shpxLink += "&utm_medium=android"; shpxLink += "&utm_campaign=about_page"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java index 75b49f22e..de2fbceee 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java @@ -51,7 +51,7 @@ public class NewsScene extends PixelScene { boolean displayingNoArticles = false; - private static final int BTN_HEIGHT = 20; + private static final int BTN_HEIGHT = 22; private static final int BTN_WIDTH = 100; @Override @@ -261,7 +261,7 @@ public class NewsScene extends PixelScene { Calendar cal = Calendar.getInstance(); cal.setTime(article.date); date = new BitmapText( News.parseArticleDate(article), pixelFont); - date.scale.set(PixelScene.align(0.49f)); + date.scale.set(PixelScene.align(0.5f)); date.hardlight( 0x888888 ); date.measure(); add(date); @@ -273,7 +273,8 @@ public class NewsScene extends PixelScene { if (date != null) { date.x = x + width - bg.marginRight() - date.width() + 2; - date.y = y + height - bg.marginBottom() - date.baseLine() + 2; + date.y = y + height - bg.marginBottom() - date.height() + 3.5f; + align(date); } super.layout(); @@ -301,7 +302,7 @@ public class NewsScene extends PixelScene { super.onClick(); String link = article.URL; //tracking codes, so that the website knows where this pageview came from - link += "/?utm_source=shatteredpd"; + link += "?utm_source=shatteredpd"; link += "&utm_medium=android"; link += "&utm_campaign=news_page"; DeviceCompat.openURI(link); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java index 1407ebbd5..4af7c6fc0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SupporterScene.java @@ -75,7 +75,7 @@ public class SupporterScene extends PixelScene { super.onClick(); String link = "https://www.patreon.com/ShatteredPixel"; //tracking codes, so that the website knows where this pageview came from - link += "/?utm_source=shatteredpd"; + link += "?utm_source=shatteredpd"; link += "&utm_medium=android"; link += "&utm_campaign=supporter_page"; DeviceCompat.openURI(link); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/News.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/News.java index 6f3c9206f..4e951365d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/News.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/News.java @@ -21,12 +21,13 @@ package com.shatteredpixel.shatteredpixeldungeon.services.news; +import com.badlogic.gdx.Application; +import com.badlogic.gdx.Gdx; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.watabou.noosa.Image; -import com.watabou.utils.DeviceCompat; import java.util.ArrayList; import java.util.Calendar; @@ -47,7 +48,11 @@ public class News { if (!supportsNews()) return; if (lastCheck != null && (new Date().getTime() - lastCheck.getTime()) < CHECK_DELAY) return; - service.checkForArticles(!SPDSettings.WiFi(), !DeviceCompat.legacyDevice(), new NewsService.NewsResultCallback() { + boolean useHTTPS = true; + if (Gdx.app.getType() == Application.ApplicationType.Android && Gdx.app.getVersion() < 20){ + useHTTPS = false; //android versions below 5.0 don't support TLSv1.2 by default + } + service.checkForArticles(!SPDSettings.WiFi(), useHTTPS, new NewsService.NewsResultCallback() { @Override public void onArticlesFound(ArrayList articles) { lastCheck = new Date(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java index 41c53b40b..0b8824309 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java @@ -120,7 +120,7 @@ public abstract class OptionSlider extends Component { sliderNode.resetColor(); //sets the selected value - selectedVal = minVal + Math.round(sliderNode.x / tickDist); + selectedVal = minVal + Math.round((sliderNode.x - x) / tickDist); sliderNode.x = x + tickDist * (selectedVal - minVal); PixelScene.align(sliderNode); onChange();