Prevent card art flickering in list

This commit is contained in:
drdev
2014-05-04 01:26:41 +00:00
parent 2294d49e6a
commit 3307455c7d
2 changed files with 2 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ public class CardRenderer {
}
public static float getCardListItemHeight() {
return MANA_SYMBOL_SIZE + FSkinFont.get(12).getFont().getLineHeight() + 3 * FList.PADDING + 1;
return Math.round(MANA_SYMBOL_SIZE + FSkinFont.get(12).getFont().getLineHeight() + 3 * FList.PADDING + 1);
}
private static Map<PaperCard, TextureRegion> cardArtCache = new HashMap<PaperCard, TextureRegion>();

View File

@@ -178,7 +178,7 @@ public class FList<E> extends FScrollPane implements Iterable<E> {
float itemHeight = renderer.getItemHeight();
boolean drawSeparators = drawLineSeparators();
float y = getItemTop(startIndex);
float y = Math.round(getItemTop(startIndex)); //round y so items don't flicker from rounding error
float valueWidth = w - 2 * PADDING;
float valueHeight = itemHeight - 2 * PADDING;