2 windows in a single scene?
by Isaac Barbosa · in Torque Game Builder · 11/10/2009 (1:06 pm) · 11 replies
Hi,
I was searching the forums unsuccesfully...
It is possible to have 2 scenes in a single level? Maybe I´m asking in the wrong way. What I want to achieve is to have a camera moving along a window while the other window is static... is that possible, how?
Thanks
isaac
I was searching the forums unsuccesfully...
It is possible to have 2 scenes in a single level? Maybe I´m asking in the wrong way. What I want to achieve is to have a camera moving along a window while the other window is static... is that possible, how?
Thanks
isaac
#2
But how...? My problem is that I don´t know the how. :( Can you give more details please?
Isaac
11/10/2009 (1:56 pm)
Thanks Willian,But how...? My problem is that I don´t know the how. :( Can you give more details please?
Isaac
#3
GUI works somewhat different than everything else in torque :(
Here's briefly how it works:
- In file: common/gamescripts/projectManagement.cs u can find path that automatically loads the gameScripts/guiProfiles.cs file.
- In that file you can write detailed properties of GUI elements. For eg. only here u can set font size and stuff.
- somewhere else you should exec() other *.gui files that holds the definitions of included gui elements (position, size... and attached gui profiles from guiProfiles.cs file)
- Gui element can be called by his name that must be written in parenthesis: new guiElement( guiName ) {}
-Gui editor can be opened with F10 but, of course, it can be buggy sometimes.
- You can't set the transparency of gui raster images, but you can set transparancy of gui fills.
And of course, search the forum for this same problem that other may also had before, just like you have it now.
11/11/2009 (6:16 am)
U'll have to deal with GUI.GUI works somewhat different than everything else in torque :(
Here's briefly how it works:
- In file: common/gamescripts/projectManagement.cs u can find path that automatically loads the gameScripts/guiProfiles.cs file.
- In that file you can write detailed properties of GUI elements. For eg. only here u can set font size and stuff.
- somewhere else you should exec() other *.gui files that holds the definitions of included gui elements (position, size... and attached gui profiles from guiProfiles.cs file)
- Gui element can be called by his name that must be written in parenthesis: new guiElement( guiName ) {}
-Gui editor can be opened with F10 but, of course, it can be buggy sometimes.
- You can't set the transparency of gui raster images, but you can set transparancy of gui fills.
And of course, search the forum for this same problem that other may also had before, just like you have it now.
#4
I did it :) Now I can load 2 scene windows in a single scenegraph, but I can´t see second one. Is there a way to set up if second window is on top or below one?
@Mila,
Thanks for your help ;)
Isaac
11/11/2009 (3:52 pm)
@William,I did it :) Now I can load 2 scene windows in a single scenegraph, but I can´t see second one. Is there a way to set up if second window is on top or below one?
@Mila,
Thanks for your help ;)
Isaac
#5
11/11/2009 (4:13 pm)
Make sure your scene windows don't use the GuiBlackContentProfile (you can just use the GuiContentProfile instead).
#6
Thanks. i did it but doesn´t works. Is there a special setting for the canvas?
Canvas.setContent(mainScreenGui); // see first level
Canvas.setContent(mainScreenGui);
Canvas.setContent(mainScreenGui2); // works the same
11/11/2009 (4:24 pm)
@William,Thanks. i did it but doesn´t works. Is there a special setting for the canvas?
Canvas.setContent(mainScreenGui); // see first level
Canvas.setContent(mainScreenGui);
Canvas.setContent(mainScreenGui2); // works the same
#7
11/11/2009 (4:29 pm)
Ahhh! You should add both GUIs as children of another GUI. Then just do "Canvas.setContent(<PARENT_GUI_OF_2_SCENE_WINDOWS>);".
#8
Sorry for my ignorance... can´t do that! Can you please give a code snipet?
Thanks in advance!
Isaac
11/11/2009 (6:10 pm)
@William,Sorry for my ignorance... can´t do that! Can you please give a code snipet?
Thanks in advance!
Isaac
#9
11/11/2009 (7:54 pm)
Have you tried the GUI tutorials? They will help you learn how to put together multiple GUI elements (like 2 scene windows).
#11
http://tdn.garagegames.com/wiki/TGB/MiniTutorials/GUIParticles
The trick is here :)
cheers
Isaac
11/11/2009 (8:25 pm)
Thanks William!http://tdn.garagegames.com/wiki/TGB/MiniTutorials/GUIParticles
The trick is here :)
cheers
Isaac
Associate William Lee Sims
Machine Code Games