Change the text of an ITextSceneNode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
CyberP1708
Posts: 10
Joined: Sat Feb 19, 2005 6:37 pm

Change the text of an ITextSceneNode

Post by CyberP1708 »

How can I change the text of an ITextSceneNode ?
after-life
Posts: 69
Joined: Wed Mar 30, 2005 8:16 am
Location: Keerbergen, Belgium

Post by after-life »

smgr->addTextSceneNode(gui->getBuiltInFont(), L"YOUR TEXT GOES HERE", video::SColor(255,255,255,255), node);

where gui is your gui environment and node is the scene node you are attaching it to.

hope this helps :D

BTW: you can edit the colors 2
rincewind
Posts: 35
Joined: Thu Mar 25, 2004 5:28 pm
Location: Germany --> Bonn

Post by rincewind »

It seems, that the documentation for the ITextSceneNode is missing. Looking into the source, i would suggest to use ITextSceneNode::setText(const wchar_t* text).
after-life
Posts: 69
Joined: Wed Mar 30, 2005 8:16 am
Location: Keerbergen, Belgium

Post by after-life »

ah, he meant to change it after he made the node.
CyberP1708
Posts: 10
Joined: Sat Feb 19, 2005 6:37 pm

Post by CyberP1708 »

It's working thank you
In fact I was missing ITextSceneNode.h so I created one using CTextSceneNode.h in the source
Post Reply