mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
[Mobile] support preferred SPRITE_MANAICONS_FILE
This commit is contained in:
@@ -217,6 +217,7 @@ public class FSkin {
|
||||
final FileHandle f11 = getSkinFile(ForgeConstants.SPRITE_BUTTONS_FILE);
|
||||
final FileHandle f12 = getSkinFile(ForgeConstants.SPRITE_START_FILE);
|
||||
final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE);
|
||||
final FileHandle f14 = getSkinFile(ForgeConstants.SPRITE_MANAICONS_FILE);
|
||||
|
||||
try {
|
||||
textures.put(f1.path(), new Texture(f1));
|
||||
@@ -237,7 +238,13 @@ public class FSkin {
|
||||
Texture t = new Texture(f7, true);
|
||||
//t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
||||
textures.put(f7.path(), t);
|
||||
} //preferred mana icons
|
||||
Pixmap preferredManaIcons = new Pixmap(f7);
|
||||
if (f14.exists()) {
|
||||
textures.put(f14.path(), new Texture(f14, true));
|
||||
preferredManaIcons = new Pixmap(f14);
|
||||
}
|
||||
|
||||
//hdbuttons
|
||||
if (f11.exists()) {
|
||||
Texture t = new Texture(f11, true);
|
||||
@@ -259,6 +266,7 @@ public class FSkin {
|
||||
//load images
|
||||
for (FSkinImage image : FSkinImage.values()) {
|
||||
image.load(textures, preferredIcons);
|
||||
image.load(textures, preferredManaIcons);
|
||||
}
|
||||
for (FSkinTexture texture : FSkinTexture.values()) {
|
||||
if (texture != FSkinTexture.BG_TEXTURE) {
|
||||
@@ -373,7 +381,8 @@ public class FSkin {
|
||||
|
||||
preferredIcons.dispose();
|
||||
pxDefaultAvatars.dispose();
|
||||
pxDefaultSleeves.dispose();;
|
||||
pxDefaultSleeves.dispose();
|
||||
preferredManaIcons.dispose();
|
||||
}
|
||||
catch (final Exception e) {
|
||||
System.err.println("FSkin$loadFull: Missing a sprite (default icons, "
|
||||
|
||||
@@ -465,7 +465,7 @@ public enum FSkinImage implements FImage {
|
||||
}
|
||||
}
|
||||
if (texture != null) {
|
||||
if (sourceFile != SourceFile.ICONS) { //just return region for preferred file if not icons file
|
||||
if (sourceFile != SourceFile.ICONS && sourceFile != SourceFile.MANAICONS) { //just return region for preferred file if not icons file
|
||||
textureRegion = new TextureRegion(texture, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user