I'm trying to create a dialog in my Libgdx game and I'm getting this Error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: No com.badlogic.gdx.scenes.scene2d.ui.Window$WindowStyle registered with name: default"
this is a part of my json file:
com.badlogic.gdx.scenes.scene2d.ui.ProgressBar$ProgressBarStyle: {
default-horizontal: { background: default-slider, knob: default-slider-knob },
default-vertical: { background: default-slider, knob: default-round-large }
}
You have some styles defined in your json file, but you don't have a default style defined. Also you posted the styles for the ProgressBar, not the Window.
When you define styles you need to always define a style with the name
default
. This style will be chosen in the case you didn't pass a style name parameter while creating your windows.To fix your json, you could add a style with name
default
or just rename one of your existing ones todefault
. See the json uiskin example:For more details check out the libgdx skins wiki