原因是作者Mario他改变了一些地方:
SCENE2D, SELECTBOXSTYLE CHANGES
SelectBoxStyle has been modified so you can fully style the drop down list. Previously you could only set the list background and selection, like this:
com.badlogic.gdx.scenes.scene2d.ui.SelectBox$SelectBoxStyle: {
default: {
font: default-font, fontColor: white, background: default-select,
listBackground: default-rect,
listSelection: default-select-selection
}
},
Now instead of listBackground and listSelection you need to give a ScrollPaneStyle and a ListStyle:
com.badlogic.gdx.scenes.scene2d.ui.SelectBox$SelectBoxStyle: {
default: {
font: default-font, fontColor: white, background: default-select,
scrollStyle: { background: default-rect },
listStyle: { font: default-font, selection: default-select-selection }
}
},
Of course with the scene2d Skin JSON magic, you can reference previously defined styles:
com.badlogic.gdx.scenes.scene2d.ui.ScrollPane$ScrollPaneStyle: {
default: { background: default-rect, vScroll: default-scroll, ... }
},
com.badlogic.gdx.scenes.scene2d.ui.SelectBox$SelectBoxStyle: {
default: {
font: default-font, fontColor: white, background: default-select,
scrollStyle: default,
listStyle: { font: default-font, selection: default-select-selection }
}
},