[Unity] Button basics - button replacement picture style

In other words, I modified the content of the project today and found that the button is not very good-looking. I wanted to change it with a picture, and then clicked on the Button, and suddenly found that a lot of content was forgotten. . .

Transition (transition mode): The transition mode of the button itself when the state changes:

Color Tint (color change) 

Sprite Swap (picture switching) 

Animation (execute animation) (detailed later)

 

Sprite Swap (picture switching transition mode):

Highlighted Sprite (highlight picture): Selected state or the mouse will enter the highlighted state.

Pressed Sprite: Press the enter key when the mouse is clicked or the button is selected.

Disabled Sprite: Image when disabled.


 In fact, I am still more interested in this function. The Navigation navigation button is just like we press the left and right keys on the keyboard to select the button.

Navigation (button navigation): If you have four buttons now, when you click the first one, the first one will remain selected, and then by pressing the keyboard arrow keys, it will navigate to switch the selected state to the next button, for example There is a second button below your first button. When you select the first button and press the arrow keys, the selected state of the first button will be canceled, and the second button will enter the selected state, provided that these buttons have navigation enabled Function.

 None (off): Turn off navigation.

 Automatic: Automatically recognizes and navigates to the next control.

 Horizontal: Navigates horizontally to the next control.

 Vertical (vertical navigation): vertical navigation to the next control.

 Explicit (Specify Navigation): Specifically specify which control to navigate to from this button when a specific arrow key is pressed.
 

You can also take a look at this article, it is more complete

The Button of Unity UGUI Foundation Using it, you have almost mastered most of UGUI! 1. Button component: Interactable (available or not): Check it, the button is available, uncheck it, the button is not available, and enter the Disabled state. Transition (transition method): Color Tint (color change) Sprite https://blog.csdn.net/qq992817263/article/details/51754381

Guess you like

Origin blog.csdn.net/CSDN_6954/article/details/122128158