mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
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:
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user