We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
UI Layout
UI Layout
Bug #4534 [Closed]
- Status changed from New to Closed
Fixed in this patch https://github.com/cocos2d/cocos2d-x/pull/5969
UILayout code needs to be refactored.
First, from an API point of view we need
VBox
,HBox
, etc...Also, we need to delegate the layout code to the different subclasses.
Currently everything is coupled in a huge 400 lines function (
doLayout
) and it is very difficult to maintain and extend.https://github.com/cocos2d/cocos2d-x/blob/6e069afe26cc05c916e6cef26a820092688b3570/cocos/ui/UILayout.cpp#L934