List of usage examples for com.badlogic.gdx.graphics.g2d BitmapFont drawWrapped
public TextBounds drawWrapped(Batch batch, CharSequence str, float x, float y, float wrapWidth, HAlignment alignment)
From source file:com.todoroo.zxzx.WorldView.java
License:Apache License
private void drawText(CharSequence string) { BitmapFont font = Assets.textFont; spriteBatch.begin();//w w w . j a va 2 s. com spriteBatch.setColor(Color.WHITE); font.drawWrapped(spriteBatch, string, worldCam.viewportWidth * 0.1f, worldCam.viewportHeight / 2, worldCam.viewportWidth * 0.8f, HAlignment.CENTER); spriteBatch.end(); }