Answer the question
In order to leave comments, you need to log in
Why is it throwing a `Missing LabelStyle font.` error?
Hello, the following problem arose:
There are files Author.json, default.fnt, Author.atlas, Author.png, and there is such code
Menu.java =>
stage = new Stage(new ScreenViewport());
Gdx.input.setInputProcessor(stage);
skin2 = new Skin(Gdx.files.internal("Author.json"));
TextButton bt_exit = new TextButton("click me", skin2, "default");
final Dialog dialog = new Dialog("", skin2);
dialog.text("hello world");
dialog.button(bt_exit);
dialog.show(stage);
{
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: default.fnt } },
com.badlogic.gdx.graphics.Color: {
green: { a: 1, b: 0, g: 1, r: 0 },
white: { a: 1, b: 1, g: 1, r: 1 },
red: { a: 1, b: 0, g: 0, r: 1 },
black: { a: 1, b: 0, g: 0, r: 0 },
},
com.badlogic.gdx.scenes.scene2d.ui.Window$WindowStyle: {
default: {
titleFont: default-font
},
},
com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: {
default: {
font: default-font,
fontColor: white,
},
},
com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: {
default: {
down: default-round-down,
up: default-round,
},
}
}
bt_exit = new TextButton("click me", skin2, "default");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question