|
645 | 645 |
|
646 | 646 | this.widgetAttributes(widget, json);
|
647 | 647 |
|
| 648 | + loadTexture(json["FileData"], resourcePath, function(path, type){ |
| 649 | + widget.setBackGroundImage(path, type); |
| 650 | + }); |
| 651 | + |
648 | 652 | var clipEnabled = json["ClipAble"];
|
649 | 653 | widget.setClippingEnabled(clipEnabled);
|
650 | 654 |
|
|
691 | 695 | widget.setBackGroundColorVector(cc.p(colorVectorX, colorVectorY));
|
692 | 696 | }
|
693 | 697 |
|
694 |
| - loadTexture(json["FileData"], resourcePath, function(path, type){ |
695 |
| - widget.setBackGroundImage(path, type); |
696 |
| - }); |
697 |
| - |
698 | 698 | var innerNodeSize = json["InnerNodeSize"];
|
699 | 699 | var innerSize = cc.size(
|
700 | 700 | innerNodeSize["Width"] || 0,
|
|
829 | 829 |
|
830 | 830 | this.widgetAttributes(widget, json);
|
831 | 831 |
|
| 832 | + loadTexture(json["FileData"], resourcePath, function(path, type){ |
| 833 | + widget.setBackGroundImage(path, type); |
| 834 | + }); |
| 835 | + |
832 | 836 | var clipEnabled = json["ClipAble"] || false;
|
833 | 837 | widget.setClippingEnabled(clipEnabled);
|
834 | 838 |
|
|
869 | 873 | if(bgColorOpacity != null)
|
870 | 874 | widget.setBackGroundColorOpacity(bgColorOpacity);
|
871 | 875 |
|
872 |
| - loadTexture(json["FileData"], resourcePath, function(path, type){ |
873 |
| - widget.setBackGroundImage(path, type); |
874 |
| - }); |
875 |
| - |
876 | 876 | setContentSize(widget, json["Size"]);
|
877 | 877 |
|
878 | 878 | return widget;
|
|
891 | 891 |
|
892 | 892 | this.widgetAttributes(widget, json);
|
893 | 893 |
|
| 894 | + loadTexture(json["FileData"], resourcePath, function(path, type){ |
| 895 | + widget.setBackGroundImage(path, type); |
| 896 | + }); |
| 897 | + |
894 | 898 | var clipEnabled = json["ClipAble"] || false;
|
895 | 899 | widget.setClippingEnabled(clipEnabled);
|
896 | 900 |
|
|
964 | 968 | if(bgColorOpacity != null)
|
965 | 969 | widget.setBackGroundColorOpacity(bgColorOpacity);
|
966 | 970 |
|
967 |
| - |
968 |
| - loadTexture(json["FileData"], resourcePath, function(path, type){ |
969 |
| - widget.setBackGroundImage(path, type); |
970 |
| - }); |
971 |
| - |
972 | 971 | setContentSize(widget, json["Size"]);
|
973 | 972 |
|
974 | 973 | return widget;
|
|
0 commit comments