mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
update textbox tint
This commit is contained in:
@@ -260,7 +260,26 @@ public class CardImageRenderer {
|
||||
private static final TextRenderer cardTextRenderer = new TextRenderer(true);
|
||||
|
||||
private static void drawTextBox(Graphics g, CardView card, CardStateView state, Color[] colors, float x, float y, float w, float h, boolean onTop) {
|
||||
fillColorBackground(g, colors, x, y, w, h);
|
||||
if (state.isLand()) {
|
||||
DetailColors modColors = DetailColors.WHITE;
|
||||
if (state.isBasicLand()) {
|
||||
if (state.isForest())
|
||||
modColors = DetailColors.GREEN;
|
||||
else if (state.isIsland())
|
||||
modColors = DetailColors.BLUE;
|
||||
else if (state.isMountain())
|
||||
modColors = DetailColors.RED;
|
||||
else if (state.isSwamp())
|
||||
modColors = DetailColors.BLACK;
|
||||
else if (state.isPlains())
|
||||
modColors = DetailColors.LAND;
|
||||
}
|
||||
Color bgColor = FSkinColor.fromRGB(modColors.r, modColors.g, modColors.b);
|
||||
bgColor = FSkinColor.tintColor(Color.WHITE, bgColor, CardRenderer.NAME_BOX_TINT);
|
||||
g.fillRect(bgColor, x, y, w, h);
|
||||
} else {
|
||||
fillColorBackground(g, colors, x, y, w, h);
|
||||
}
|
||||
g.drawRect(BORDER_THICKNESS, Color.BLACK, x, y, w, h);
|
||||
|
||||
if (!onTop) { return; } //remaining rendering only needed if card on top
|
||||
|
||||
Reference in New Issue
Block a user