Reputation: 158
So I have a skin, and the JSON part for the TextFieldStyle looks like so:
com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: {
default: {
font: font
fontColor: black
background: textfield
cursor: black
selection: pale-blue
}
}
With my script, I want to get the cursor. I've already tried skin.getDrawable("cursor")
, skin.getDrawable("default-cursor")
, and skin.getDrawable("textfieldstyle-default-cursor")
, which don't work. How do I do this?
Upvotes: 0
Views: 108
Reputation: 129
You should do it like this:
skin.get("default", TextFieldStyle.class).cursor
where "default" is the actual name of your text field style.
Upvotes: 1