Merge pull request #2680 from Card-Forge/newmaster2

Fix old theme Splashscreen and Logo
This commit is contained in:
Anthony Calosa
2023-03-14 19:06:22 +08:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ public class FSkin {
public static Texture getLogo() {
if (Forge.isMobileAdventureMode)
return Forge.getAssets().getTexture(getDefaultSkinFile("adv_logo.png"));
return Forge.getAssets().getTexture(getSkinFile("hd_logo.png"));
return Forge.getAssets().getTexture(getSkinFile("hd_logo.png"), false);
}
public static void changeSkin(final String skinName) {
@@ -150,7 +150,7 @@ public class FSkin {
Forge.getAssets().loadTexture(f2);
splashScreen.setSplashTexture(new TextureRegion(Forge.getAssets().getTexture(f2)));
} else {
splashScreen.setSplashTexture(new TextureRegion(Forge.getAssets().getTexture(f2), 0, 0, w, h - 100));
splashScreen.setSplashTexture(new TextureRegion(Forge.getAssets().getTexture(f), 0, 0, w, h - 100));
}
}
Pixmap pxSplash = new Pixmap(f);

View File

@@ -202,7 +202,8 @@ public enum FSkinTexture implements FImage {
FileHandle preferredFile = isPlanechaseBG ? FSkin.getCachePlanechaseFile(filename) : FSkin.getSkinFile(filename);
if (preferredFile.exists()) {
try {
texture = Forge.getAssets().getTexture(preferredFile);
texture = Forge.getAssets().getTexture(preferredFile, false);
if (texture != null)
isloaded = true;
}
catch (final Exception e) {
@@ -242,6 +243,7 @@ public enum FSkinTexture implements FImage {
}
}
if (repeat) {
if (texture != null)
texture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
}
}