Projects > cpp > Issues > Bug #4376

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Set SpriteFrames directly on cocos2d::ui elements

Bug #4376 [Closed]
Wil 2014-03-14 08:35 . Updated about 2 years ago

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 by loadTexture(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.

walzer@cocos2d-x.org 2014-10-08 02:45

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

Atom PDF

Status:Closed
Start date:2014-03-14
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.