From ac076ae7314453553d24026a9650e389696a3736 Mon Sep 17 00:00:00 2001 From: MoopsLC Date: Tue, 28 May 2013 14:50:38 -0300 Subject: [PATCH] Update BitmapFontCache.java allow for drawing a substring of the cache for letter-by-letter text scrolling --- gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java b/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java index 52cfffe15..0691de55a 100644 --- a/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java +++ b/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java @@ -113,6 +113,10 @@ public class BitmapFontCache { public void draw (SpriteBatch spriteBatch) { spriteBatch.draw(font.getRegion().getTexture(), vertices, 0, idx); } + + public void draw(SpriteBatch spriteBatch, int start, int end) { + spriteBatch.draw(font.getRegion().getTexture(), vertices, start*20, end*20); + } public void draw (SpriteBatch spriteBatch, float alphaModulation) { if (alphaModulation == 1) { -- 2.11.0