-1

How can I change the color of the SelectBox selected text font? The below code renders it white even though I set it orange.

SelectBox.SelectBoxStyle sbs = new SelectBox.SelectBoxStyle();
sbs.background = new TextureRegionDrawable(skin.getRegion("regionsbox"));
sbs.listStyle = listS;
sbs.font = skin.getFont("fontno1");
sbs.fontColor = Color.ORANGE;
selectBox = new SelectBox<String>(sbs);
gogonapel
  • 788
  • 6
  • 17

1 Answers1

0

Ok guys this has taken me two days and apparently the problem could have been solved easily by some lateral-thinking wizard. Libgdx version 1.5.6 is somehow broken and does not render fonts inside SelectBox correctly. I updated the project to Libgdx 1.6.0 (latest version) and now my code works as expected .

Hope this will help other people with the same problem!

gogonapel
  • 788
  • 6
  • 17