json file for libgdx Table

喜欢而已 提交于 2019-12-07 05:04:27

The problem is with the order of the objects in my json file and also I missed some required objects for the ScrollPane and Color. In addition I needed to add default.fnt and default.png to my assets folder from here. Basically its supposed to look like this:

{
    com.badlogic.gdx.graphics.g2d.BitmapFont: { 
        default-font: { file: default.fnt } 
    },
    com.badlogic.gdx.graphics.Color: {
        white: { a: 1, b: 1, g: 1, r: 1 },
    },
    com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: {
        default: { font: default-font, fontColor: white }
    },
    com.badlogic.gdx.scenes.scene2d.ui.ScrollPane$ScrollPaneStyle: {
        default: { vScroll: default-scroll, hScrollKnob: default-round-large, background: default-rect, hScroll: default-scroll, vScrollKnob: default-round-large }
    }
}

This said I still don't understand why a certain order is required nor do I know how to find out which specific objects need to be placed in the json file. The only way I figured out that I need these specifically is by the errors Eclipse gave me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!