Projects > cpp > Issues > Feature #4540

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

Create Issue on Github

have a way to set the position in percentage

Feature #4540 [Closed]
ricardo 2014-03-25 01:47 . Updated over 2 years ago

Sometimes you want put a button at the right-top corner, but there are many screen resolutions... and it should work an all of them.

So we need an API that works more or less like this:

// sets the button on the top-right corner of its parent 

Since controls don't know when the parent change its size, that information needs to be passed in the visit... perhaps as flag.

zhangxm 2014-04-05 02:47
  • Assignee set to owen
owen 2014-05-12 07:16

Does this API only needed in UI framework or should it be a API in the Node class.
@ricardo @zhangxm

ricardo 2014-05-12 14:57


I discussed it with @justin, and he worked on this feature for CocoStudio.
He already sent a Pull Request with this feature, which I'll review this week.

so, you won't need to work on this feature. thanks!

ricardo 2014-05-12 14:57
  • Assignee changed from owen to ricardo
zhangxm 2014-05-24 12:57
  • Target version changed from v3.1 to v3.2
ricardo 2014-05-30 23:45
zhangxm 2014-06-25 03:41
  • Status changed from New to Closed

Atom PDF

Start date:2014-03-25
Due date:
% Done:


Target version:v3.2

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