Merge branch 'master' into 'master'

[Mobile] Disable cardBG Texture for Android 9 and below

See merge request core-developers/forge!5323
This commit is contained in:
Anthony Calosa
2021-09-11 09:18:05 +00:00
3 changed files with 10 additions and 2 deletions

View File

@@ -67,6 +67,7 @@ public class Forge implements ApplicationListener {
public static float heigtModifier = 0.0f; public static float heigtModifier = 0.0f;
private static boolean isloadingaMatch = false; private static boolean isloadingaMatch = false;
public static boolean showFPS = false; public static boolean showFPS = false;
public static boolean allowCardBG = false;
public static boolean altPlayerLayout = false; public static boolean altPlayerLayout = false;
public static boolean altZoneTabs = false; public static boolean altZoneTabs = false;
public static String enableUIMask = "Crop"; public static String enableUIMask = "Crop";
@@ -111,6 +112,13 @@ public class Forge implements ApplicationListener {
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android); GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
if (!GuiBase.isAndroid() || androidVersion > 28) {
allowCardBG = true;
} else {
// don't allow to read and process
ForgeConstants.SPRITE_CARDBG_FILE = "";
}
graphics = new Graphics(); graphics = new Graphics();
splashScreen = new SplashScreen(); splashScreen = new SplashScreen();
frameRate = new FrameRate(); frameRate = new FrameRate();

View File

@@ -120,7 +120,7 @@ public class CardImageRenderer {
} else { } else {
borderColors = CardDetailUtil.getBorderColors(state, canShow); borderColors = CardDetailUtil.getBorderColors(state, canShow);
} }
Color[] colors = useCardBGTexture ? drawCardBackgroundTexture(state, g, borderColors, x, y, w, h) : fillColorBackground(g, borderColors, x, y, w, h); Color[] colors = useCardBGTexture && Forge.allowCardBG ? drawCardBackgroundTexture(state, g, borderColors, x, y, w, h) : fillColorBackground(g, borderColors, x, y, w, h);
float artInset = blackBorderThickness * 0.5f; float artInset = blackBorderThickness * 0.5f;
float outerBorderThickness = 2 * blackBorderThickness - artInset; float outerBorderThickness = 2 * blackBorderThickness - artInset;

View File

@@ -123,7 +123,7 @@ public final class ForgeConstants {
public static final String SPRITE_PLANAR_CONQUEST_FILE = "sprite_planar_conquest.png"; public static final String SPRITE_PLANAR_CONQUEST_FILE = "sprite_planar_conquest.png";
public static final String SPRITE_SETLOGO_FILE = "sprite_setlogo.png"; public static final String SPRITE_SETLOGO_FILE = "sprite_setlogo.png";
public static final String SPRITE_WATERMARK_FILE = "sprite_watermark.png"; public static final String SPRITE_WATERMARK_FILE = "sprite_watermark.png";
public static final String SPRITE_CARDBG_FILE = "sprite_cardbg.png"; public static String SPRITE_CARDBG_FILE = "sprite_cardbg.png";
public static final String FONT_FILE = "font1.ttf"; public static final String FONT_FILE = "font1.ttf";
public static final String SPLASH_BG_FILE = "bg_splash.png"; public static final String SPLASH_BG_FILE = "bg_splash.png";
public static final String MATCH_BG_FILE = "bg_match.jpg"; public static final String MATCH_BG_FILE = "bg_match.jpg";