Hi all I have work out how to get the element of polygon’s and different objects but how do I retrieve text between the >Hello World<
here is my XML with just simple Hello world
<object id="260" type="Text" x="30" y="180" width="62.0239" height="12.4217">
<text fontfamily="American Typewriter" pixelsize="10" wrap="1" color="#ffffff" bold="1">Hello World</text>
</object>
I have opened the TMXmapinfo.cpp and added to the function thats ok
I can get all elements but how do I get the string “Hello World”
added this to TMXmapinfo.cpp
else if (elementName == “text”)
{
std::string font = attributeDict[“fontfamily”].asString();
std::string pixelsize = attributeDict[“pixelsize”].asString();
std::string data = attributeDict[“text”].asString();
CCLOG("%s %s %s",font,pixelsize,data);
}
all good but cannot get the text.