Beispiel #1
0
 public FontCache cacheMultiLineText(
     FontCache cache, CharSequence str, int width, de.matthiasmann.twl.HAlignment align) {
   if (cache == null) cache = new GdxFontCache();
   GdxFontCache bitmapCache = (GdxFontCache) cache;
   bitmapFont.setColor(com.badlogic.gdx.graphics.Color.WHITE);
   bitmapCache.setMultiLineText(str, 0, yOffset, width, gdxAlignment[align.ordinal()]);
   return cache;
 }
Beispiel #2
0
 public int drawMultiLineText(
     AnimationState as,
     int x,
     int y,
     CharSequence str,
     int width,
     de.matthiasmann.twl.HAlignment align) {
   FontState fontState = evalFontState(as);
   x += fontState.offsetX;
   y += fontState.offsetY + yOffset;
   bitmapFont.setColor(renderer.getColor(fontState.color));
   return bitmapFont.drawMultiLine(renderer.batch, str, x, y, width, gdxAlignment[align.ordinal()])
       .width;
 }