String handling in IRRLICHT
Posted: Thu Dec 08, 2016 12:49 pm
Hi all,
I have problems working with strings in irrlicht.
For instance I have a string like “model.3ds” in an XML file und want to use it as text label on a GUI element.
How can the content be transported from the xml file to the GUI label?
XML handling:
In the case above StartUpModelFile hast the typewhile the method expects
When I have to enter a string hardcoded I would write: setText(L”blabla”);
But how am I expected to use the variable StartUpModelFile?
doesn’t work
neither.
Nor
Any help appreciated
Greetings
Markus
I have problems working with strings in irrlicht.
For instance I have a string like “model.3ds” in an XML file und want to use it as text label on a GUI element.
How can the content be transported from the xml file to the GUI label?
XML handling:
Code: Select all
case io::EXN_ELEMENT:
{
if (core::stringw("startUpModel") == xml->getNodeName())
{
StartUpModelFile = xml->getAttributeValue(L"file");
}
Code: Select all
core::stringc
Code: Select all
setText()
Code: Select all
const wchar_t*
But how am I expected to use the variable StartUpModelFile?
Code: Select all
setText(StartUpModelFile)
Code: Select all
setText(StartUpModelFile.c_str())
Nor
Code: Select all
setText(L(StartUpModelFile))
Greetings
Markus