Cocos2d-x cainiao intern study-menu coordinates

Source: Internet
Author: User

[Cpp] space_Menu-> setPosition (CCPointZero); in the twinkling of an eye, another week has passed, and the eight consecutive days after the New Year's Day does not have a great impact on you. I watched the Southern Weekend Report last night. See it earlier. Almost all Weibo posts forwarded have been deleted. Many people may not know this, or do not want to pay attention to it. The biggest tragedy is not the arrogance of the bad guys, but the silence of the good guys-Martin. luther. jin's blog is actually a note, but it's not very technical, but it was done by this coordinate when I added the menu for the first time. [Cpp] CCMenuItemImage * building = CCMenuItemImage: create ("feng1.png", "feng2.png", this, menu_selector (FengDi: callFarming); building-> setAnchorPoint (CCPointZero ); // set its anchor here to (10,225) building-> setPosition (ccp (-); // set the coordinates of this menu! Note! The coordinates are the actual coordinates of the menu. building-> setScale (0.5f); CCMenu * space_Menu = CCMenu: create (building, NULL); // Add the menu created above. It is equivalent to registering this-> addChild (space_Menu, 2); [cpp] <span style = "white-space: pre"> space_Menu-> setPosition (CCPointZero ); </span> // set the coordinates to 0 so that the coordinates of the preceding menu are valid [cpp] [cpp] [cpp]

Related Article

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.