Example usage for com.badlogic.gdx.graphics.g2d BitmapFontCache setWrappedText

List of usage examples for com.badlogic.gdx.graphics.g2d BitmapFontCache setWrappedText

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g2d BitmapFontCache setWrappedText.

Prototype

public TextBounds setWrappedText(CharSequence str, float x, float y, float wrapWidth) 

Source Link

Document

Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width.

Usage

From source file:com.ridiculousRPG.ui.DisplayPlainTextService.java

License:Apache License

private BitmapFontCache createMsg(CharSequence text, float color, float x, float y, float wrapWidth) {
    BitmapFontCache bfc = fontCachePool.obtain(font);
    bfc.setColor(color);/*w ww .  jav a  2 s .co m*/
    if (wrapWidth > 0f)
        bfc.setWrappedText(text, x, y, wrapWidth);
    else
        bfc.setMultiLineText(text, x, y);
    return bfc;
}