About selecting the UI Editor

Source: Internet
Author: User

I have been trying to parse MT's uii files these days and perform XML analysis through rapidxml. Here is also an episode, because we need to recursively find a child element through the attribute name, the result of this recursive function has never been completed before the error is found.CodeTo commemorate:

 
Void Global: findnodebyattribute (const char * strnodeattr, xml_node <> * pnode, xml_node <> * & rresult) {If (pnode) {xml_node <> * pergnode = NULL; char * pnameattr = NULL; xml_attribute <char> * pattr = NULL; For (pergnode = pnode; pergnode = pergnode-> next_sibling ()) {pattr = pergnode-> first_attribute ("name"); If (pattr) {pnameattr = pattr-> value (); If (strcmp (pnameattr, strnodeattr) = 0) rresult = pergnode; elsefindnodebyattribute (strnodeattr, pergnode-> first_node (), rresult );}}}}

Later with a compilation tool, found that MT itself even cocos2d-x ccnode class have re-written a cluaui_node, so gave up the idea. Taking into account the need to redo new things, we certainly will not use the original file and parsing method, the reason is very simple: we cannot get the MT editor.

In the afternoon, the Group members discussed how to proceed to the next step. The result was that the UI editor of cocosbuilder was used to re-import the original Mt resources to cocosbuilder and then generate the desired target file.

This is good, because I want to reverse parse the UI goal of MT a little far away.

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.