Text on billboard

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
interceptor
Posts: 22
Joined: Thu Aug 23, 2007 12:39 pm

Text on billboard

Post by interceptor »

I'm trying to add some custom text to a billboard, so the user can change what it says. I really can't work out how to do this, or even how to explain it, so i have a picture to explain what i'm trying to do.

This is from Garry's Mod, the text in the bill is changable.

Image

Any ideas folks?

Thanks in advance.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

use the scene manager to add a billboard text scene node (probably) and then use functions from the scene collision manager (use shown in the collision tutorial) to detect a mouse click on the billboard and then you can handle putting different text in it.
Image Image Image
interceptor
Posts: 22
Joined: Thu Aug 23, 2007 12:39 pm

Post by interceptor »

Ah, i'm so stoopid, it didnt even occour to me that there would be a text based billboard. Durrr.

Thanks!
interceptor
Posts: 22
Joined: Thu Aug 23, 2007 12:39 pm

Post by interceptor »

Quick related question,

THe textbillboard needs a const wchar_t. I have an irr::c8, how can i convert an irr::c8 to a const wchar_t? i tryed a cast like

Code: Select all

(const wchar_t *)myirrstring
but it doesnt seem to work? :S Sometimes it returns "0" depending on what the string is.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

c8 cstr = "hello";
core::stringw wstr(cstr);

core::stringw::c_str() returns a wchar_t* for you
Image Image Image
interceptor
Posts: 22
Joined: Thu Aug 23, 2007 12:39 pm

Post by interceptor »

JP wrote:c8 cstr = "hello";
core::stringw wstr(cstr);

core::stringw::c_str() returns a wchar_t* for you
You're a bloody legend! Thank you!
Post Reply