cocos2d / cocos2d-js

cocos2d-x for JS
http://www.cocos2d-x.org
MIT License
1.86k stars 489 forks source link

all Cocos UI (e.g. ccui.Button) bug in ctor #887

Open caiqqx opened 10 years ago

caiqqx commented 10 years ago

in ctor code texType && this.init(normalImage, selectedImage, disableImage, texType); modify to texType!==undefined && this.init(normalImage, selectedImage, disableImage, texType);

Otherwise, it can not new ccui.Button("res/a.png", "res/b.png", "res/c.png",ccui.Widget.LOCAL_TEXTURE) with param

zhaijialong commented 10 years ago

Thank you. We will fix this bug soon.

pandamicro commented 9 years ago

It have been fixed, please refer to this commit: https://github.com/cocos2d/cocos2d-js/commit/cc21a296f3b354884df0a48274909cfa3504db59