Unity3d plugin daikon forge GUI Chinese tutorial-2-Use of basic control label

Source: Internet
Author: User
Tags control label word wrap

(The first launch of the game manniu) Hello everyone, I'm Sun Guangdong. The official website provides professional video tutorials. However, the tutorial still provides better text for viewing and searching.

Let's first set the screen size in Ui root as follows: 1024*768

 

2.1 create a label Control

Let's take a look at control properties (basically all controls are shared) and we will not discuss it later. parameters:

To set layout and anchor, we need to fully understand some coordinate issues.

The relationship between transform. Position and layout. position. Is changed at the same time.

Transform. position is the unit of the world coordinate system in meters. When xy is (512,384), it is right facing the center point left and top () of the screen ). Layout. position is the unit of the screen coordinate system. Left and top (0, 0) are in the upper left corner of the screen.

We are trying to set it as follows:

That is, 1 meter corresponds to 384 pixels (768-384 or 896-512 ).

Observe the position in scene. I used the red line to deepen the big dotted line mesh (one meter * one meter) in the scenario. Observe it by yourself.

Continue:

We don't need to mention the parameters in size. We often don't need to consider this height, and we also have a proper width, because we often select the following content: auto height or auto size check box.

The rotate rotation axis is about the position of the transform. Rotation Axis that rotates itself around X and Y axes.

The anchor concept is very important. Is the coordinate origin position of the control. You just need to combine the two.

Center center: to make the two axes of the widget overlap with the two axes of the screen.

Size limits, you can restrict it and test it. Zero is no limit. The hot zone scale refers to the border distance between text and text. For example, if I set it to (): [1--1] = [], there is no extra width. If I set it) [3-1] = [2-1.


The next "be havior" will not be mentioned. What is the meaning.

In other:

Opacity: opacity. 1 is completely opaque.

Z-order: it can be understood as the order of who will cover who and who will cover who.

The tab index can be understood as the value of moving the focus focused by pressing the Enter key.

Tooltip allows you to enter prompt information.

 

 

Label properties is unique to a tag.

Atlas: The genie inside is used as the background of the tag. It will be created later. You can get to know it online first.

Font font: Dynamic font and static font. Later.

In appearance:

Font size: the font size is commonly used, and the font size is displayed.

The spacing of char spacing characters.

In background and colors:

You can select the genie in the gallery as the background image.

Back color: The main color of the image.

Text color: text color

In formatting:

Text alignment (left and right)

Vertical Method

Word Wrap: automatic line feed

Process markup: it is also the function of colorize sprites.

Padding between top, bottom, and left of padding. Note the differences with hot zonescale.

 

In text effects:

The color gradient of the draw gradient font.

The back of draw outline

Shadow of draw shadow.

The text to be displayed.

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.