mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38: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 f11 = getSkinFile(ForgeConstants.SPRITE_BUTTONS_FILE);
|
||||||
final FileHandle f12 = getSkinFile(ForgeConstants.SPRITE_START_FILE);
|
final FileHandle f12 = getSkinFile(ForgeConstants.SPRITE_START_FILE);
|
||||||
final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE);
|
final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE);
|
||||||
|
final FileHandle f14 = getSkinFile(ForgeConstants.SPRITE_MANAICONS_FILE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
textures.put(f1.path(), new Texture(f1));
|
textures.put(f1.path(), new Texture(f1));
|
||||||
@@ -237,7 +238,13 @@ public class FSkin {
|
|||||||
Texture t = new Texture(f7, true);
|
Texture t = new Texture(f7, true);
|
||||||
//t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
//t.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
||||||
textures.put(f7.path(), t);
|
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
|
//hdbuttons
|
||||||
if (f11.exists()) {
|
if (f11.exists()) {
|
||||||
Texture t = new Texture(f11, true);
|
Texture t = new Texture(f11, true);
|
||||||
@@ -259,6 +266,7 @@ public class FSkin {
|
|||||||
//load images
|
//load images
|
||||||
for (FSkinImage image : FSkinImage.values()) {
|
for (FSkinImage image : FSkinImage.values()) {
|
||||||
image.load(textures, preferredIcons);
|
image.load(textures, preferredIcons);
|
||||||
|
image.load(textures, preferredManaIcons);
|
||||||
}
|
}
|
||||||
for (FSkinTexture texture : FSkinTexture.values()) {
|
for (FSkinTexture texture : FSkinTexture.values()) {
|
||||||
if (texture != FSkinTexture.BG_TEXTURE) {
|
if (texture != FSkinTexture.BG_TEXTURE) {
|
||||||
@@ -373,7 +381,8 @@ public class FSkin {
|
|||||||
|
|
||||||
preferredIcons.dispose();
|
preferredIcons.dispose();
|
||||||
pxDefaultAvatars.dispose();
|
pxDefaultAvatars.dispose();
|
||||||
pxDefaultSleeves.dispose();;
|
pxDefaultSleeves.dispose();
|
||||||
|
preferredManaIcons.dispose();
|
||||||
}
|
}
|
||||||
catch (final Exception e) {
|
catch (final Exception e) {
|
||||||
System.err.println("FSkin$loadFull: Missing a sprite (default icons, "
|
System.err.println("FSkin$loadFull: Missing a sprite (default icons, "
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ public enum FSkinImage implements FImage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (texture != null) {
|
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);
|
textureRegion = new TextureRegion(texture, x, y, w, h);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user