Game Development Community

Is this possible to set t2dSceneObject in top of the GUI layer?

by mohanmartin · in Torque Game Builder · 11/21/2008 (11:55 pm) · 2 replies

Hi,

can we set the t2dSceneObjects to top of the GUI layer?..

in my project i push a GUI above the sceneWindow, and i wish to display the animated sprites on top of that GUI

is this possible in TGB?

#1
11/22/2008 (3:22 am)
Not if you're using just a single scene window and want some sprites below and some above. If the scene window is below the GUI then regardless of what layer you try to set t2d objects to, they will always render below the scene window. Likewise if you re-order your GUI and have the scene window above your GUI, then sprites will always render above the GUI.

However, there's nothing stopping you having a 2nd scene window above your first window and GUI.

There's a few ways to ensure ordering. Adding it at the bottom of the .gui file underneath all your other GUI controls will allow you to render objects in that window above all your GUI and first scene window's objects. Or, using the BringToFront/PushToBack on the sceneWindow. Or you could look into using the pushDialog( ) layer support.

That way you can render above or below by using the appropriate scene window.
#2
11/24/2008 (3:39 am)
Where can i use BringToFront/PushToBack commands?

Canvas.pushDialog(someGUIname);

someGUIname.PushToBack(sceneWindow2d);.... is this correct?