mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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_SHELF (FSkinProp.IMG_TROPHY_SHELF, SourceFile.TROPHIES),
|
||||
|
||||
//Achievement Trophies
|
||||
//Planar Conquest Tiles
|
||||
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_ZEP (FSkinProp.ICO_QUEST_ZEP, SourceFile.ICONS),
|
||||
|
||||
@@ -249,30 +249,31 @@ public class CommandCenterScreen extends FScreen implements IVCommandCenter {
|
||||
|
||||
@Override
|
||||
public void draw(HexagonTile tile, int x, int y, int w, int h) {
|
||||
FSkinImage manaIcon;
|
||||
FSkinImage tileImage;
|
||||
switch (tile.getColorIndex()) {
|
||||
case 0:
|
||||
manaIcon = FSkinImage.MANA_W;
|
||||
tileImage = FSkinImage.WHITE_TILE;
|
||||
break;
|
||||
case 1:
|
||||
manaIcon = FSkinImage.MANA_U;
|
||||
tileImage = FSkinImage.BLUE_TILE;
|
||||
break;
|
||||
case 2:
|
||||
manaIcon = FSkinImage.MANA_B;
|
||||
tileImage = FSkinImage.BLACK_TILE;
|
||||
break;
|
||||
case 3:
|
||||
manaIcon = FSkinImage.MANA_R;
|
||||
tileImage = FSkinImage.RED_TILE;
|
||||
break;
|
||||
case 4:
|
||||
manaIcon = FSkinImage.MANA_G;
|
||||
tileImage = FSkinImage.GREEN_TILE;
|
||||
break;
|
||||
default:
|
||||
manaIcon = FSkinImage.MANA_COLORLESS;
|
||||
tileImage = null;
|
||||
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);
|
||||
|
||||
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
|
||||
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
|
||||
IMG_BTN_START_UP (new int[] {480, 200, 160, 80}, PropType.ICON),
|
||||
|
||||
Reference in New Issue
Block a user