GUI create each common control (ii)

Source: Internet
Author: User

Go on!

In my opinion, there is a need to affirm : because it is the knowledge of the GUI, so I just in the review of the rough summary, so the reference value may be limited, more as a record of their own learning and easy to consult.

All right! Dry Goods Continue:

1, similar to Gui.box (new Rect (SCREEN.WIDTH/2,SCREEN.HEIGHT/2,SCREEN.WIDTH/2,SCREEN.HEIGHT/2),
New Guicontent ("This is a title", "hahaha"), the command:
where rect (SCREEN.WIDTH/2,SCREEN.HEIGHT/2,SCREEN.WIDTH/2,SCREEN.HEIGHT/2) table is the position of the control's rectangular area and the size of the rectangle.
Top 2: Refers to the position coordinates of the control (the coordinates of the top-left vertex), and the last two: dimensions;

2. Common controls in the graphical user interface (detailed drawing method time lookup)
1 lable: Used to draw a text or texture label on the screen (no user interaction);
2 Drawtexture: Draw a specified texture map;
3 Drawtexturewithcoords: Draw a texture map in a given coordinate system;
4 box: Draw a graphical box within the custom area;
5 button: Draw a Word press the buttons, the user click the button will trigger the corresponding event;
6 RepeatButton: button: Press to keep active;
7 TextField: Draw a single-line text box;//return value type string
8 Passwordfield: Draw a text box with editable password;//will block the input content with * *
9 TextArea: Multi-line text edit box;
Setnextcontorlname and Getnameoffousedcontrol: The name used to set the event name/get the current control focus for the next control (return value string type)
One focuscontrol: You can use the keyboard input values in the current focus to display;
Toggle: Used to draw a switch (on/OFF), a radio button in the usual sense;
Toolbar: Used to draw a toolbar where you can place some tool buttons (the return value is the index number of the selected button of type int);
Selectiongrid: Used to draw the grid button (the return value is the index number of the selected button of type int);
Horizontalslider: Used to draw a horizontal slider and can set its own threshold value (return value is float type);
Verticalslider: Used to draw a vertical slider and can set its own threshold value (return value is float type);
Horizontalscrollbar: Used to create a horizontal scroll bar, and you can set the threshold value (the return value is the float type);
Verticalscrollbar: Used to create a vertical scroll bar, and you can set the threshold value (the return value is the float type);
BeginGroup and Endgroup:begingroup are used for a start group, but must match a endgroup to end a group;
When you start creating a group, the coordinate system of the GUI control inside is set relative to the upper-left corner of the group (0,0), and all controls are restricted to that group. Groups can be nested, and subgroups will be attached to the parent group,
and using groups is useful when you need to move a batch of GUI controls on the screen.
The Beginscorollview and Endscorollview:beginscorollview are used to create a scrolling view, Endscorollview to undo a scrolling view;
Place components in Beginscorollview and Endscorollview to scroll through components, (you can place documents in them and scroll through them)
Scroolto: For a given coordinate, scrolls the content to the specified position;
Window/dragwindow/bringwindowtofront/bringwindowtoback/focuswindow/unfocuswindow;

"Welcome to Reprint"

Reprint please indicate source: le learning http://www.cnblogs.com/JLZT1223/

GUI create each common control (ii)

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.