quick-cocos2d-x3.3 Study (i)---------create a UI tag

Source: Internet
Author: User

Create a UI tag:

1 cc.ui.UILabel.new ({2Uilabeltype =2, Text ="Hello, World", size = - 3 })4 : Align (display. CENTER, Display.cx, display.cy)5 : AddTo (self)6 7 uilabeltype: Format used to create text objects8     1represents the creation of a text display object using a bitmap font, which returns a Labelbmfont9     2represents the creation of a text display object using the TTF font, which returns a labelTen Text: Texts to display One Size : Text Size A  - Aligin: Setting the and position of the anchor Point - addto: Adding text to the scene the  -Display.cx, Display.cy: The x, y coordinates of the center of the design resolution
View Code

quick-cocos2d-x3.3 Study (i)---------create a UI tag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.