We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Set SpriteFrames directly on cocos2d::ui elements
Set SpriteFrames directly on cocos2d::ui elements
Bug #4376 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8361
Status: | Closed | |
---|---|---|
Start date: | 2014-03-14 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | - | |
Target version: | - |
I noticed that the current development of the UI classes in the develop branch does not allow direct setting of SpriteFrames. In particular, the ui::Button and ui::ImageView. The usual
setSpriteFrame(SpriteFrame*)
method has been replaced byloadTexture(const char *fileName, TextureResType texType)
.I have submitted a pull request for the ui::Button which has yet to be acted upon here: https://github.com/cocos2d/cocos2d-x/pull/5448 a lot of changes has been made since that pull request so I doubt that the merge will be clean. I could create another pull request but I want to know if it's necessary.
Is the omission intentional or just an oversight? I needed that interface because my sprites/spriteframes are loaded by some other means other than the SpriteFrameCache (the textures are cached, but the sprite frames are not) because of our asset pipeline.