Show GUI in front of meshes

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
Jgwman
Posts: 12
Joined: Sat Dec 29, 2012 6:26 pm

Show GUI in front of meshes

Post by Jgwman »

Hello,
I am working on a project which requires a GUI, and it needs to be visible above all meshes (for example, since I don't have any of my own levels yet, I am using a Quake mesh). I am confused about how to do this - I have found something about the function bringToFront, but I am unsure of how to use it - it looks like it only works on siblings (i.e. one window in front of another, but not in front of the mesh). Would I have to parent the GUI Environment to a particular scene node (possibly the root scene node) and then bring the whole environment to the front, or am I on the completely wrong track? If anyone can show me how to do this it would be great.

This is what I tried (which seemed to only work on siblings (if at all - I have no other GUI at the moment)):

Code: Select all

window->getParent()->bringToFront(window);
Thanks in advance.
polylux
Posts: 267
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU

Re: Show GUI in front of meshes

Post by polylux »

Maybe I get you wrong, but how about drawing the GUIEnvironment AFTER

Code: Select all

ISceneManager->drawAll();
in your program's main loop?
beer->setMotivationCallback(this);
Jgwman
Posts: 12
Joined: Sat Dec 29, 2012 6:26 pm

Re: Show GUI in front of meshes

Post by Jgwman »

Wow. I'm really smart. Thanks, for some reason I didn't even think of that.
polylux
Posts: 267
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU

Re: Show GUI in front of meshes

Post by polylux »

Hehe, cheers!
beer->setMotivationCallback(this);
Post Reply