我发现我导出的json文件和例子中的CocoGUISample.json不是一样的结构的,对不上呢。
我是我导出的test.json:
{“classname”:null,“name”:null,“designHeight”:320,“designWidth”:480,“textures”:“test0.plist”],“version”:1,“widgetTree”:{“classname”:“Panel”,“name”:null,“children”:{“classname”:“Panel”,“name”:null,“children”:],“options”:{"__type":“ComGUIPanelSurrogate:#SPEditorCommon.JsonModel.Component.GUI”,“classname”:“Panel”,“name”:“default”,“ZOrder”:0,“classType”:“Panel”,“colorB”:255,“colorG”:200,“colorR”:150,“flipX”:false,“flipY”:false,“height”:320,“opacity”:100,“rotation”:0,“scaleX”:1,“scaleY”:1,“touchAble”:false,“useMergedTexture”:true,“visible”:true,“width”:480,“x”:1,“xProportion”:1,“y”:0,“yProportion”:0,“backGroundImage”:null,“clipAble”:false}},{“classname”:“Button”,“name”:null,“children”:],“options”:{"__type":“ComGUIButtonSurrogate:#SPEditorCommon.JsonModel.Component.GUI”,“classname”:“Button”,“name”:“btn”,“ZOrder”:1,“classType”:“Button”,“colorB”:255,“colorG”:255,“colorR”:255,“flipX”:false,“flipY”:false,“height”:30,“opacity”:255,“rotation”:0,“scaleX”:1,“scaleY”:1,“touchAble”:true,“useMergedTexture”:true,“visible”:true,“width”:100,“x”:216,“xProportion”:216,“y”:167,“yProportion”:167,“disabled”:"",“normal”:“backtotopnormal.png”,“pressed”:“backtotoppressed.png”}}],“options”:{"__type":“ComGUIPanelSurrogate:#SPEditorCommon.JsonModel.Component.GUI”,“classname”:“Panel”,“name”:“default”,“ZOrder”:1,“classType”:“Panel”,“colorB”:255,“colorG”:200,“colorR”:150,“flipX”:false,“flipY”:false,“height”:0,“opacity”:100,“rotation”:0,“scaleX”:1,“scaleY”:1,“touchAble”:true,“useMergedTexture”:true,“visible”:true,“width”:0,“x”:0,“xProportion”:0,“y”:0,“yProportion”:0,“backGroundImage”:null,“clipAble”:false}}}