Ошибка чтения json файла в libGDX
#39981386
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
|
|
|
Пытаюсь реализовать Dialog из libGDX.При чтении файла json Для Skin появляется ошибка Caused by: com.badlogic.gdx.utils.GdxRuntimeException: No com.badlogic.gdx.graphics.g2d.BitmapFont registered with name: default-font
В проект я добавил uiskin.atlas, default.fnt, uiskin.png Код uiskin.json:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70.
{
BitmapFont: { default-font: { file: default.fnt } },
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 },
},
TintedDrawable: {
dialogDim: { name: white, color: { r: 0, g: 0, b: 0, a: 0.45 } },
},
ButtonStyle: {
default: { down: default-round-down, up: default-round },
toggle: { parent: default, checked: default-round-down }
},
TextButtonStyle: {
default: { parent: default, font: default-font, fontColor: white },
toggle: { parent: default, checked: default-round-down, downFontColor: red }
},
ScrollPaneStyle: {
default: { vScroll: default-scroll, hScrollKnob: default-round-large, background: default-rect, hScroll: default-scroll, vScrollKnob: default-round-large }
},
SelectBoxStyle: {
default: {
font: default-font, fontColor: white, background: default-select,
scrollStyle: default,
listStyle: { font: default-font, selection: default-select-selection }
}
},
SplitPaneStyle: {
default-vertical: { handle: default-splitpane-vertical },
default-horizontal: { handle: default-splitpane }
},
WindowStyle: {
default: { titleFont: default-font, background: default-window, titleFontColor: white },
dialog: { parent: default, stageBackground: dialogDim }
},
ProgressBarStyle: {
default-horizontal: { background: default-slider, knob: default-slider-knob },
default-vertical: { background: default-slider, knob: default-round-large }
},
SliderStyle: {
default-horizontal: { parent: default-horizontal },
default-vertical: { parent: default-vertical }
},
LabelStyle: {
default: { font: default-font, fontColor: white }
},
TextFieldStyle: {
default: { selection: selection, background: textfield, font: default-font, fontColor: white, cursor: cursor }
},
CheckBoxStyle: {
default: { checkboxOn: check-on, checkboxOff: check-off, font: default-font, fontColor: white }
},
ListStyle: {
default: { fontColorUnselected: white, selection: selection, fontColorSelected: white, font: default-font }
},
TouchpadStyle: {
default: { background: default-pane, knob: default-round-large }
},
TreeStyle: {
default: { minus: tree-minus, plus: tree-plus, selection: default-select-selection }
},
TextTooltipStyle: {
default: {
label: { font: default-font, fontColor: white },
background: default-pane, wrapWidth: 150
}
},
}
Все эти файлы я брал с https://github.com/libgdx/libg... ssets/data
|
|