v0.8.2: various UI tweaks and fixes:

- improved wording on the patreon supporter scene
- fixed analytics campaign additions messing with links
- tweaked sizing/layout of news scene
- fixed https not working on android 4.4-4.1
- fixed a bug with option sliders when they aren't at x=0
This commit is contained in:
Evan Debenham 2020-07-26 15:04:54 -04:00
parent 6cca2154d6
commit 18bc8f98ee
6 changed files with 16 additions and 10 deletions

View File

@ -66,8 +66,8 @@ scenes.startscene.title=Games in Progress
scenes.startscene.new=New Game scenes.startscene.new=New Game
scenes.supporterscene.title=Support the 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.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.supporterscene$supportermessage.patreon_english=Note that Patreon rewards are only available in English.
scenes.surfacescene.exit=Game Over scenes.surfacescene.exit=Game Over

View File

@ -59,7 +59,7 @@ public class AboutScene extends PixelScene {
String shpxLink = "https://ShatteredPixel.com"; String shpxLink = "https://ShatteredPixel.com";
//tracking codes, so that the website knows where this pageview came from //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_medium=android";
shpxLink += "&utm_campaign=about_page"; shpxLink += "&utm_campaign=about_page";

View File

@ -51,7 +51,7 @@ public class NewsScene extends PixelScene {
boolean displayingNoArticles = false; boolean displayingNoArticles = false;
private static final int BTN_HEIGHT = 20; private static final int BTN_HEIGHT = 22;
private static final int BTN_WIDTH = 100; private static final int BTN_WIDTH = 100;
@Override @Override
@ -261,7 +261,7 @@ public class NewsScene extends PixelScene {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.setTime(article.date); cal.setTime(article.date);
date = new BitmapText( News.parseArticleDate(article), pixelFont); 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.hardlight( 0x888888 );
date.measure(); date.measure();
add(date); add(date);
@ -273,7 +273,8 @@ public class NewsScene extends PixelScene {
if (date != null) { if (date != null) {
date.x = x + width - bg.marginRight() - date.width() + 2; 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(); super.layout();
@ -301,7 +302,7 @@ public class NewsScene extends PixelScene {
super.onClick(); super.onClick();
String link = article.URL; String link = article.URL;
//tracking codes, so that the website knows where this pageview came from //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_medium=android";
link += "&utm_campaign=news_page"; link += "&utm_campaign=news_page";
DeviceCompat.openURI(link); DeviceCompat.openURI(link);

View File

@ -75,7 +75,7 @@ public class SupporterScene extends PixelScene {
super.onClick(); super.onClick();
String link = "https://www.patreon.com/ShatteredPixel"; String link = "https://www.patreon.com/ShatteredPixel";
//tracking codes, so that the website knows where this pageview came from //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_medium=android";
link += "&utm_campaign=supporter_page"; link += "&utm_campaign=supporter_page";
DeviceCompat.openURI(link); DeviceCompat.openURI(link);

View File

@ -21,12 +21,13 @@
package com.shatteredpixel.shatteredpixeldungeon.services.news; 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.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.utils.DeviceCompat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
@ -47,7 +48,11 @@ public class News {
if (!supportsNews()) return; if (!supportsNews()) return;
if (lastCheck != null && (new Date().getTime() - lastCheck.getTime()) < CHECK_DELAY) 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 @Override
public void onArticlesFound(ArrayList<NewsArticle> articles) { public void onArticlesFound(ArrayList<NewsArticle> articles) {
lastCheck = new Date(); lastCheck = new Date();

View File

@ -120,7 +120,7 @@ public abstract class OptionSlider extends Component {
sliderNode.resetColor(); sliderNode.resetColor();
//sets the selected value //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); sliderNode.x = x + tickDist * (selectedVal - minVal);
PixelScene.align(sliderNode); PixelScene.align(sliderNode);
onChange(); onChange();