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

Widget Alignment.md Document Suggestions #698

Closed
ggnewt opened this issue Nov 6, 2018 · 1 comment
Closed

Widget Alignment.md Document Suggestions #698

ggnewt opened this issue Nov 6, 2018 · 1 comment
Assignees

Comments

@ggnewt
Copy link

ggnewt commented Nov 6, 2018

URL : https://github.com/cocos-creator/creator-docs/blob/master/en/ui/widget-align.md

Just some suggestions to improve the doc. :)

Alignment sStrategy

To realize achieve a perfect multi-resolution fit effect..

Such an effect can be realized by We can do this with the Widget component.

Buttons and small elements that need to be aligned by borders
Aligning Buttons and Small Elements with the Border

Then Only a few simple steps are needed:

Taking alignment To Align something with the bottom left corner of the screen for as an example, open the alignment of check the Left and Bottom tick boxes in the Widget component.

the left margin is set as 50px, right the bottom margin is set as 30px.

After setting up the Widget component like this~~,~~ no matter what the actual screen resolution is**/extra space/** , this node element will remain on at the bottom left corner of the screen.

For example, Left is ticked off on in the above example

Nesting aAlignment eElements

The method of aligning with the border of the screen is introduced above.
We just showed how to align something with the border of the screen in the example above.

Next, we will use Here's a simple example to explain it. Supposinge we have a node hierarchical relation hierarchy as follows:

We can respectively add Widget components to **both of ** these two nodes

@xunyi0
Copy link
Contributor

xunyi0 commented Nov 8, 2018

Thank you very much for your feedback and we will revise it as soon as possible!

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

No branches or pull requests

3 participants