I am using one skin for my menu, and I am wondering if it is possible to add several fonts to this skin and then pick which font to use programatically.
Currently I set a font and add it to the LabelStyle like this:
"com.badlogic.gdx.graphics.g2d.BitmapFont": {
"fontTest": { "file": "outline_test.fnt" }
},
"com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle": {
"default": {
"font": "fontTest", "fontColor": "white"
}
},
Which mean that when I create a Label all I need to do to get this font is:
Label rating = new Label("Rating: ", skin);
This picks the LabelStyle that is set as default, is there any way to reference the LabelStyles set in my Json-file so that I can pick which style to use in my Java-code? Or do I need to create a seperate skin?