Reputation: 1134
I saw this post Multi-colored text in libgdx but it's not useful specially in new API.
For example: I want to color "libGDX" text like this:
BitmapFont font = new BitmapFont(Gdx.files.internal("fonts/CarterOne.fnt"));
LabelStyle style = new LabelStyle(font, null);
Label label = new Label("libGDX", style);
stage.addActor(label);
How can I do this ?
Upvotes: 11
Views: 3470
Reputation: 19776
You can do this easily with the color markup language that Label
supports as well.
Make sure to read that article completely, as there are a few little obstacles involved to get it working.
Upvotes: 15