mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Remove extra vertical padding
This commit is contained in:
@@ -143,7 +143,7 @@ public class ImageCache {
|
|||||||
}
|
}
|
||||||
image = null;
|
image = null;
|
||||||
}
|
}
|
||||||
catch (final InvalidCacheLoadException ex) {
|
catch (final Exception ex) {
|
||||||
image = null;
|
image = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,12 +175,11 @@ public class CardImageRenderer {
|
|||||||
}
|
}
|
||||||
renderer.drawRect(BORDER_THICKNESS, Color.BLACK, x, y, w, h);
|
renderer.drawRect(BORDER_THICKNESS, Color.BLACK, x, y, w, h);
|
||||||
|
|
||||||
float padX = TEXT_FONT.getCapHeight() * 0.75f;
|
float padding = TEXT_FONT.getCapHeight() * 0.75f;
|
||||||
float padY = padX + 2; //add a little more vertical padding
|
x += padding;
|
||||||
x += padX;
|
y += padding;
|
||||||
y += padY;
|
w -= 2 * padding;
|
||||||
w -= 2 * padX;
|
h -= 2 * padding;
|
||||||
h -= 2 * padY;
|
|
||||||
String text = card.getRules().getOracleText();
|
String text = card.getRules().getOracleText();
|
||||||
text = text.replace("\\n", "\n"); //replace new line placeholders with actual new line characters
|
text = text.replace("\\n", "\n"); //replace new line placeholders with actual new line characters
|
||||||
cardTextRenderer.drawText(renderer, text, TEXT_FONT, Color.BLACK, x, y, w, h, y, h, true, HAlignment.LEFT, true);
|
cardTextRenderer.drawText(renderer, text, TEXT_FONT, Color.BLACK, x, y, w, h, y, h, true, HAlignment.LEFT, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user