mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Add Forge SetLogo for Desktop and Mobile
Common, Uncommon, Rare, Mythic and Special Forge logos
This commit is contained in:
@@ -32,6 +32,7 @@ public class FSkin {
|
||||
private static final Map<Integer, TextureRegion> sleeves = new HashMap<>(64);
|
||||
private static final Map<Integer, TextureRegion> borders = new HashMap<>();
|
||||
private static final Map<Integer, TextureRegion> deckbox = new HashMap<>();
|
||||
private static final Map<Integer, TextureRegion> setlogo = new HashMap<>();
|
||||
|
||||
private static Array<String> allSkins;
|
||||
private static FileHandle preferredDir;
|
||||
@@ -217,6 +218,8 @@ 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 = getDefaultSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||
final FileHandle f15 = getSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||
|
||||
try {
|
||||
textures.put(f1.path(), new Texture(f1));
|
||||
@@ -388,6 +391,20 @@ public class FSkin {
|
||||
FSkin.deckbox.put(1, new TextureRegion(deckboxes, 492, 2, 488, 680));
|
||||
//generic deck box
|
||||
FSkin.deckbox.put(2, new TextureRegion(deckboxes, 982, 2, 488, 680));
|
||||
//setlogo
|
||||
Texture setlogos = f15.exists() ? new Texture(f15, textureFilter) : new Texture(f14, textureFilter);
|
||||
if (textureFilter)
|
||||
setlogos.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
||||
//common logo
|
||||
FSkin.setlogo.put(0, new TextureRegion(setlogos, 2, 2, 520, 451));
|
||||
//uncommon logo
|
||||
FSkin.setlogo.put(1, new TextureRegion(setlogos, 2, 455, 520, 451));
|
||||
//rare logo
|
||||
FSkin.setlogo.put(2, new TextureRegion(setlogos, 2, 908, 520, 451));
|
||||
//mythic logo
|
||||
FSkin.setlogo.put(3, new TextureRegion(setlogos, 2, 1361, 520, 451));
|
||||
//special logo
|
||||
FSkin.setlogo.put(4, new TextureRegion(setlogos, 2, 1814, 520, 451));
|
||||
|
||||
preferredIcons.dispose();
|
||||
pxDefaultAvatars.dispose();
|
||||
|
||||
@@ -95,10 +95,17 @@ public enum FSkinImage implements FImage {
|
||||
MANA_Z (FSkinProp.IMG_MANA_Z, SourceFile.MANAICONS),
|
||||
|
||||
//CMC ranges
|
||||
CMC_LOW (FSkinProp.IMG_CMC_LOW, SourceFile.MANAICONS),
|
||||
CMC_LOW_MID (FSkinProp.IMG_CMC_LOW_MID, SourceFile.MANAICONS),
|
||||
CMC_MID_HIGH (FSkinProp.IMG_CMC_MID_HIGH, SourceFile.MANAICONS),
|
||||
CMC_HIGH (FSkinProp.IMG_CMC_HIGH, SourceFile.MANAICONS),
|
||||
CMC_LOW (FSkinProp.IMG_CMC_LOW, SourceFile.MANAICONS),
|
||||
CMC_LOW_MID (FSkinProp.IMG_CMC_LOW_MID, SourceFile.MANAICONS),
|
||||
CMC_MID_HIGH (FSkinProp.IMG_CMC_MID_HIGH, SourceFile.MANAICONS),
|
||||
CMC_HIGH (FSkinProp.IMG_CMC_HIGH, SourceFile.MANAICONS),
|
||||
|
||||
//Setlogo
|
||||
SET_COMMON (FSkinProp.IMG_SETLOGO_COMMON, SourceFile.SETLOGOS),
|
||||
SET_UNCOMMON (FSkinProp.IMG_SETLOGO_UNCOMMON, SourceFile.SETLOGOS),
|
||||
SET_RARE (FSkinProp.IMG_SETLOGO_RARE, SourceFile.SETLOGOS),
|
||||
SET_MYTHIC (FSkinProp.IMG_SETLOGO_MYTHIC, SourceFile.SETLOGOS),
|
||||
SET_SPECIAL (FSkinProp.IMG_SETLOGO_SPECIAL, SourceFile.SETLOGOS),
|
||||
|
||||
//Gameplay
|
||||
TAP (FSkinProp.IMG_TAP, SourceFile.MANAICONS),
|
||||
@@ -422,6 +429,7 @@ public enum FSkinImage implements FImage {
|
||||
BUTTONS(ForgeConstants.SPRITE_BUTTONS_FILE),
|
||||
BTNSTART(ForgeConstants.SPRITE_START_FILE),
|
||||
MANAICONS(ForgeConstants.SPRITE_MANAICONS_FILE),
|
||||
SETLOGOS(ForgeConstants.SPRITE_SETLOGO_FILE),
|
||||
PLANAR_CONQUEST(ForgeConstants.SPRITE_PLANAR_CONQUEST_FILE);
|
||||
|
||||
private final String filename;
|
||||
|
||||
@@ -233,10 +233,23 @@ public class CardImageRenderer {
|
||||
float padding = h / 8;
|
||||
|
||||
//draw square icon for rarity
|
||||
float iconSize = h * 0.55f;
|
||||
float iconSize = h * 0.9f;
|
||||
float iconPadding = (h - iconSize) / 2;
|
||||
w -= iconSize + iconPadding * 2;
|
||||
g.fillRect(CardRenderer.getRarityColor(state.getRarity()), x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
//g.fillRect(CardRenderer.getRarityColor(state.getRarity()), x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
if (state.getRarity() == null) {
|
||||
g.drawImage(FSkinImage.SET_SPECIAL, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
} else if (state.getRarity() == CardRarity.Special ) {
|
||||
g.drawImage(FSkinImage.SET_SPECIAL, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
} else if (state.getRarity() == CardRarity.MythicRare) {
|
||||
g.drawImage(FSkinImage.SET_MYTHIC, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
} else if (state.getRarity() == CardRarity.Rare) {
|
||||
g.drawImage(FSkinImage.SET_RARE, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
} else if (state.getRarity() == CardRarity.Uncommon) {
|
||||
g.drawImage(FSkinImage.SET_UNCOMMON, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
} else {
|
||||
g.drawImage(FSkinImage.SET_COMMON, x + w + iconPadding, y + (h - iconSize) / 2, iconSize, iconSize);
|
||||
}
|
||||
|
||||
//draw type
|
||||
x += padding;
|
||||
|
||||
Reference in New Issue
Block a user