Ugui Button control

Source: Internet
Author: User

To learn about the button control today, the button control is actually formed by the text,button,image component. Here's a quick introduction to the button component

Interactable: represents whether the component interacts, and we have previously let the component interact with the usual components.  Enable = False to do so. Now just change the properties to

Transition: This word translates to the meaning of transition, letting some state-> Transition-> another state. It has four types of transitions:

None: No transitions

Color Tint: Transition of colour change

Sprite Swap: Picture change transitions

Animation: Transition by some animations

Color Tinit Colors Transition state:

Normal Color: Default state
Highlighted Color: Mouse hover State
Pressed Color: Click Down Status
diabled Color: Disabled state
Color Multiplier When the color multiplier is set high, it turns white.
Fade Duration State switching, color easing time

Sprite Swap: Picture transition state: The same as the state of the color, except that each state renders a different picture

Naviation This attribute I do not quite understand, seemingly is auxiliary in the page layout! (If you know the small partners please leave a message to study the next OH)

Animation: Animation transitions, Previous button animations we generally use itween or Ngui built-in animation components to zoom in and out when the mouse moves up and down.

To learn here you need to first understand the animation and animation state machine.

Click: Auto Generate Animation button, will automatically help you to create an animation state machine. (You can also manually create your own, as long as the animation block name, switch state parameters as well)

You can set for each state, the game object a component of the property changes, select the Game object, click Window–> Animation Open the window, you can look at the.

Let's add a frame animation for the button pressed state.

Button event: Simple onclick event with three selection boxes

1. Runtime only executes this event in all environments, off means no execution, Editor and runtime (I don't quite understand this option =.=),

The other two checkboxes are game objects, with the function selected for execution.

Ugui Button control

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.