NGUI 3.9.0 Tween Implementation Toggle Click the drop-down menu (Common Corner Main menu entry in the game)

Source: Internet
Author: User

This familiar button in a stand-alone game will pop up the following menu, and I believe the first time I see it, I'm sure it will be amazing, that ' s great! Let me tell you how it is done next.


1. Create toggle, foreground map (Background) for, checkmark for. (Two sprite, choose from the set, about how to add Sprite and make Atlas, do not do the main narration here)


2. Make a drop-down menu, (1) Create a panel as the parent container. (2) Add a sprite below the panel named Menulistpanelbksprite, which is the background image of the drop-down menu. (3) Add five sprites below the Menulistpanelbksprite: Hero package, store, copy, icon for the event.

The hierarchy directory is as follows:

3, add tween, click Menutoggle to add Playtween component to it, set

4, add tween scale component to M-Listpanel, specific settings


Note: This method allows the panel to be scaled with its children without affecting the visual effect when the scaling speed is fairly fast. Its scaling changes are centered on the panel's anchor point, and to achieve a pull-down effect (or other effect), the Panel's anchor point should be placed at the top of the menulistpanelbksprite.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

NGUI 3.9.0 Tween Implementation Toggle Click the drop-down menu (Common Corner Main menu entry in the game)

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.