Introduction to Tui-x and introduction to xwarehouse 3

Source: Internet
Author: User

Introduction to Tui-x and introduction to xwarehouse 3

1. What is Tui-x?

Tui-x is a solution for creating the cocos2d-x UI interface, while builder uses FlashCS to expand the Flash CS by using jsfl to achieve the UI editor function. This jsfl is very simple. For example, if your project is CPP, it will help you export an interface xml and one. h. The xml file will be parsed using the tui Parsing Library, and the header file will be a tag ing table (if it is a Lua project, it will help you export the xml and lua files ), you can use this tag ing table to easily obtain any control.


2. What is the component generated by Tui-x?

The components generated by Tui-x come from CocosWidget. This is an excellent third-party component library that contains rich text, grid, and other advanced controls. It has a large quantity and high quality, no less than any other editor. (Note: CocosWidget (ccw) it is worth mentioning that Tui-x can be used to completely visually generate all ccw controls, including CTableView, CListView, CGridView, and other advanced composite controls, these editing operations are completely completed in Flash CS, and the threshold is very low. You can even submit them to art and planning for interface creation.

(Design Interface)


(Generate Interface)


3. What are the features of Tui-x?

① Tui-x has a low usage threshold. You only need to use FlashCS to create video clips for development. A scenario corresponds to a fla file, which facilitates the division of art and does not depend on each other. All components must be created according to naming rules. If you have played mornui before, it will be very friendly. For example, to create a button, you need to create a video clip and rename it to btn _ prefix, such as btn_ OK, the resource map used by this button will find the corresponding resource based on the path of the library where your video clip is located. For example, if btn_ OK is in the main/directory of the fla library, it will go to btn_ OK _normal.png, btn_ OK _select.png, and btn_ OK _disable.png under Resouce/main/in the game. (Note: If the texture is not found, the _ normal is a fixed suffix naming rule, while btn _ is a fixed prefix naming rule, all naming rules will be listed in detail in the next article.

② Tui-x's resource management is very free and completely managed by the developer. It seems that it is not intelligent to load the plist and delete the plist. In fact, it is actually to return the management right to the developer. This facilitates resource reuse. Controls are created in two modes: spriteFrame and normal png. [SpriteFrame mode: Load plist and use this texture to create a control] [Normal png Image: Create a control using the scatter png directly] In the fla library, the directory structure corresponds to the real resource directory of the project, and the useSpriteFrame switch is enabled in the TuiManager when the control is created.

③ With the inherent advantages of Flash CS, Tui-x can do a lot of things that ccs and ccb cannot do, such as font strokes and shadows, and the running effect is as follows. Edit composite controls, such as CListView and CGridView, to make a backpack so easy.

3. What is the Tui-x touch mechanism?

Strictly speaking, Tui-x is not a framework. It is just a tool to help developers generate ccw. Therefore, its touch mechanism is the tree-like touch method of ccw, all trigger events are distributed by CWidgetWindow,

Related Article

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.