mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Support rendering color tiles instead of mana icons
This commit is contained in:
@@ -116,8 +116,13 @@ public enum FSkinImage implements FImage {
|
|||||||
TROPHY_CASE_TOP (FSkinProp.IMG_TROPHY_CASE_TOP, SourceFile.TROPHIES),
|
TROPHY_CASE_TOP (FSkinProp.IMG_TROPHY_CASE_TOP, SourceFile.TROPHIES),
|
||||||
TROPHY_SHELF (FSkinProp.IMG_TROPHY_SHELF, SourceFile.TROPHIES),
|
TROPHY_SHELF (FSkinProp.IMG_TROPHY_SHELF, SourceFile.TROPHIES),
|
||||||
|
|
||||||
//Achievement Trophies
|
//Planar Conquest Tiles
|
||||||
HEXAGON_TILE (FSkinProp.IMG_HEXAGON_TILE, SourceFile.PLANAR_CONQUEST),
|
HEXAGON_TILE (FSkinProp.IMG_HEXAGON_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
WHITE_TILE (FSkinProp.IMG_WHITE_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
BLUE_TILE (FSkinProp.IMG_BLUE_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
BLACK_TILE (FSkinProp.IMG_BLACK_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
RED_TILE (FSkinProp.IMG_RED_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
GREEN_TILE (FSkinProp.IMG_GREEN_TILE, SourceFile.PLANAR_CONQUEST),
|
||||||
|
|
||||||
//Quest Icons
|
//Quest Icons
|
||||||
QUEST_ZEP (FSkinProp.ICO_QUEST_ZEP, SourceFile.ICONS),
|
QUEST_ZEP (FSkinProp.ICO_QUEST_ZEP, SourceFile.ICONS),
|
||||||
|
|||||||
@@ -249,30 +249,31 @@ public class CommandCenterScreen extends FScreen implements IVCommandCenter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(HexagonTile tile, int x, int y, int w, int h) {
|
public void draw(HexagonTile tile, int x, int y, int w, int h) {
|
||||||
FSkinImage manaIcon;
|
FSkinImage tileImage;
|
||||||
switch (tile.getColorIndex()) {
|
switch (tile.getColorIndex()) {
|
||||||
case 0:
|
case 0:
|
||||||
manaIcon = FSkinImage.MANA_W;
|
tileImage = FSkinImage.WHITE_TILE;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
manaIcon = FSkinImage.MANA_U;
|
tileImage = FSkinImage.BLUE_TILE;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
manaIcon = FSkinImage.MANA_B;
|
tileImage = FSkinImage.BLACK_TILE;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
manaIcon = FSkinImage.MANA_R;
|
tileImage = FSkinImage.RED_TILE;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
manaIcon = FSkinImage.MANA_G;
|
tileImage = FSkinImage.GREEN_TILE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
manaIcon = FSkinImage.MANA_COLORLESS;
|
tileImage = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float manaIconSize = w / 2;
|
|
||||||
g.drawImage(manaIcon, x + (w - manaIconSize) / 2, y + (h - manaIconSize) / 2, manaIconSize, manaIconSize);
|
|
||||||
|
|
||||||
|
if (tileImage != null) {
|
||||||
|
g.drawImage(tileImage, x, y, w, h);
|
||||||
|
}
|
||||||
g.drawImage(FSkinImage.HEXAGON_TILE, x, y, w, h);
|
g.drawImage(FSkinImage.HEXAGON_TILE, x, y, w, h);
|
||||||
|
|
||||||
if (x < getWidth() / 2 && x + w > getWidth() / 2 && y < getHeight() / 2 && y + h > getHeight() / 2) {
|
if (x < getWidth() / 2 && x + w > getWidth() / 2 && y < getHeight() / 2 && y + h > getHeight() / 2) {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 61 KiB |
@@ -243,6 +243,11 @@ public enum FSkinProp {
|
|||||||
|
|
||||||
//planar conquest images
|
//planar conquest images
|
||||||
IMG_HEXAGON_TILE (new int[] {0, 0, 220, 192}, PropType.PLANAR_CONQUEST),
|
IMG_HEXAGON_TILE (new int[] {0, 0, 220, 192}, PropType.PLANAR_CONQUEST),
|
||||||
|
IMG_WHITE_TILE (new int[] {0, 192, 80, 70}, PropType.PLANAR_CONQUEST),
|
||||||
|
IMG_BLUE_TILE (new int[] {80, 192, 80, 70}, PropType.PLANAR_CONQUEST),
|
||||||
|
IMG_BLACK_TILE (new int[] {160, 192, 80, 70}, PropType.PLANAR_CONQUEST),
|
||||||
|
IMG_RED_TILE (new int[] {240, 192, 80, 70}, PropType.PLANAR_CONQUEST),
|
||||||
|
IMG_GREEN_TILE (new int[] {320, 192, 80, 70}, PropType.PLANAR_CONQUEST),
|
||||||
|
|
||||||
//button images
|
//button images
|
||||||
IMG_BTN_START_UP (new int[] {480, 200, 160, 80}, PropType.ICON),
|
IMG_BTN_START_UP (new int[] {480, 200, 160, 80}, PropType.ICON),
|
||||||
|
|||||||
Reference in New Issue
Block a user