mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Prevent *NEW* appearing in lists that don't have New column
This commit is contained in:
@@ -62,12 +62,12 @@ public final class SpellShopManager extends ItemManager<InventoryItem> {
|
|||||||
float totalHeight = h + 2 * FList.PADDING;
|
float totalHeight = h + 2 * FList.PADDING;
|
||||||
float cardArtWidth = totalHeight * CardRenderer.CARD_ART_RATIO;
|
float cardArtWidth = totalHeight * CardRenderer.CARD_ART_RATIO;
|
||||||
|
|
||||||
String suffix = FModel.getQuest().getCards().isNew(value.getKey()) ? " *NEW*" : null;
|
|
||||||
if (value.getKey() instanceof PaperCard) {
|
if (value.getKey() instanceof PaperCard) {
|
||||||
|
String suffix = getConfig().getCols().containsKey(ColumnDef.NEW) && FModel.getQuest().getCards().isNew(value.getKey()) ? " *NEW*" : null;
|
||||||
CardRenderer.drawCardListItem(g, font, foreColor, (PaperCard)value.getKey(), value.getValue(), suffix, x, y, w, h);
|
CardRenderer.drawCardListItem(g, font, foreColor, (PaperCard)value.getKey(), value.getValue(), suffix, x, y, w, h);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
g.drawText(value.getValue().toString() + " " + value.getKey().toString() + (suffix == null ? "" : suffix), font, foreColor, x + cardArtWidth, y, w - cardArtWidth, h, false, HAlignment.LEFT, true);
|
g.drawText(value.getValue().toString() + " " + value.getKey().toString(), font, foreColor, x + cardArtWidth, y, w - cardArtWidth, h, false, HAlignment.LEFT, true);
|
||||||
Texture image = ImageCache.getImage(value.getKey());
|
Texture image = ImageCache.getImage(value.getKey());
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
float imageRatio = (float)image.getWidth() / (float)image.getHeight();
|
float imageRatio = (float)image.getWidth() / (float)image.getHeight();
|
||||||
|
|||||||
Reference in New Issue
Block a user