Example usage for com.badlogic.gdx.utils Array toString

List of usage examples for com.badlogic.gdx.utils Array toString

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils Array toString.

Prototype

public String toString(String separator) 

Source Link

Usage

From source file:com.vlaaad.dice.ui.components.StringSpin.java

License:Open Source License

public StringSpin(int length, int letterWidth, String initialText) {
    ThesaurusData data = Config.thesaurus.getData("alphabet");
    labels = new Array<Label>(length);
    letters = String.valueOf(shuffleArray((data.en + " " + data.ru).toCharArray())).toUpperCase();
    Array<String> arr = new Array<String>(letters.length());
    arr.addAll(letters.split(""));

    String newLined = arr.toString("\n");
    String doubled = newLined + "\n" + newLined;
    Label.LabelStyle style = Config.skin.get("default", Label.LabelStyle.class);

    lineHeight = style.font.getLineHeight();

    for (int i = 0; i < length; i++) {
        addColumn(i, letterWidth, doubled);
    }/*from   ww w .j a  v  a  2 s . c om*/
    setSize(letterWidth * length, lineHeight);
    setTextImmediately(initialText);
}