Java Code Examples for com.badlogic.gdx.scenes.scene2d.ui.Label#clearActions()
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.ui.Label#clearActions() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dice-heroes File: StringSpin.java License: GNU General Public License v3.0 | 5 votes |
public void setTextImmediately(String text) { for (int i = 0; i < labels.size; i++) { String letter = i < text.length() ? String.valueOf(text.charAt(i)).toUpperCase() : " "; int idx = letters.indexOf(letter.toUpperCase()); if (idx == -1) idx = letters.indexOf(" "); if (idx == -1) throw new IllegalStateException(); Label label = labels.get(i); label.clearActions(); label.setY(-(letters.length() - idx - 1) * lineHeight); } }
Example 2
Source Project: dice-heroes File: StringSpin.java License: GNU General Public License v3.0 | 5 votes |
private void setText(String text, final float speed, final float spinTime, float endTime, Runnable callback) { for (int i = 0; i < labels.size; i++) { String letter = i < text.length() ? String.valueOf(text.charAt(i)).toUpperCase() : " "; int idx = letters.indexOf(letter.toUpperCase()); if (idx == -1) idx = letters.indexOf(" "); if (idx == -1) throw new IllegalStateException(); final Label label = labels.get(i); label.clearActions(); addActions(label, i, idx, speed, spinTime, endTime, callback); } }