I was looking at the ui classes, and I cannot understand why does Widget have a LayoutComponent member if it already offers the ability to define sizes and positions as percentages. Also, the LayoutComponent member seems to not be implemented, because I have not found a method (neither in Widget nor in any other ui class) which uses it to set the widget’s size and position. Am I missing something or is LayoutComponent actually not implemented in cocos2d?
I believe it’s just a simple class to store the properties (data) of how to layout a widget. It’s also mostly used for CocoStudio and so I’m not sure if it’s necessary for any non .ccs usage.
Thank you @stevetranby for the explanation about CocosStudio: I did not know that.