Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle auto layout with scaled widget #17822

Merged
merged 3 commits into from
May 26, 2017
Merged

Handle auto layout with scaled widget #17822

merged 3 commits into from
May 26, 2017

Conversation

thuydx55
Copy link
Contributor

No description provided.

@minggo minggo requested a review from zilongshanren May 19, 2017 09:22
@zilongshanren
Copy link
Member

hi, @thuydx55

What issue does this PR address?

@thuydx55
Copy link
Contributor Author

@zilongshanren I got problem while displaying scaled Widget in a Layout. They're placed in weird positions. This PR uses boundingBox instead of contentSize for calculating Widget position in layout

@zilongshanren
Copy link
Member

@thuydx55
could you add a test in cpp-tests to reproduce the scaled widget in Layout issue, thanks.

@thuydx55
Copy link
Contributor Author

thuydx55 commented May 22, 2017

@zilongshanren I've added test for this issue (C++)

51. Node: UI > 1. GUI Dynamic Create Test > 16. Layout Test > 10. Layout Scaled Widget

Before:
simulator screen shot may 22 2017 1 42 26 pm

After:
simulator screen shot may 22 2017 1 29 54 pm

@thuydx55
Copy link
Contributor Author

Just added test for JS

@thuydx55
Copy link
Contributor Author

@zilongshanren All checks are passed

Copy link
Member

@zilongshanren zilongshanren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, this PR looks good to me.
@minggo

@zilongshanren
Copy link
Member

@thuydx55
Thanks

@minggo minggo added this to the 3.16 milestone May 26, 2017
@minggo minggo merged commit afcffc7 into cocos2d:v3 May 26, 2017
@thuydx55
Copy link
Contributor Author

@zilongshanren Pls take a look at cocos2d/cocos2d-html5#3488. Thanks

@thuydx55 thuydx55 deleted the ui_layout_scaling branch May 26, 2017 04:50
stevetranby added a commit to stevetranby/cocos2d-x that referenced this pull request Jun 16, 2017
* commit '639737286f594f3e06c07b22b352dddb01858883':
  before draw event (cocos2d#17669)
  Handle auto layout with scaled widget (cocos2d#17822)
  fix to problem with updating APK in Google Play keeping old OBB (cocos2d#17689)
  update console to fix compiling issue on with Xcode 8.3+ (cocos2d#17862)
  Fix iskindof (cocos2d#17785)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17857)
  fix action running times for instant actions (cocos2d#17849)
  make fps stable on iOS (cocos2d#17852)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17848)
  LayerRadialGradient works on mac and iOS (cocos2d#17826)
  Fixing serious XMLHTTP leak when CC_ENABLE_GC_FOR_NATIVE_OBJECTS enabled (cocos2d#17844)
  Call 'update' method in 'stop/stopAll' to cleanup immediately (cocos2d#17846)
  Add const keyword to Node::isScheduled (cocos2d#17841)
  small BillBoard optimizations (cocos2d#17825)
  Allow visit Sprite without camera for render to texture (cocos2d#17824)

# Conflicts:
#	cocos/base/CCDirector.cpp
#	cocos/base/CCDirector.h
#	cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
#	cocos/ui/UILayoutManager.cpp
#	tools/cocos2d-console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants