Split-screen Troubles (Solved)
by practicing01 · in Torque 2D Beginner · 03/03/2013 (11:31 pm) · 4 replies
I've got this in a taml:
this before the call to exec the Sandbox equivalent of scene.cs
and this within the Sandbox equivalent of scene.cs
The taml is read fine, the gui is pushed fine but the screen doesn't split to what the proggywindow tells it to.
Edit: I also tried setting both "width" and "height" to "relative", didn't work.
Edit#2: The solution was to call: Canvas.setContent(gui_mainscreen);
<GuiControl Name="gui_mainscreen" Profile="GuiDefaultProfile" HorizSizing="width" VertSizing="height" Position="0 0" Extent="1280 800"> <SceneWindow Name="proggywindow" Profile="proggywindowprofile" HorizSizing="width" VertSizing="height" Position="0 0" Extent="640 400"/> </GuiControl>
this before the call to exec the Sandbox equivalent of scene.cs
proggy.add(TamlRead("./gui/gui_mainscreen.gui.taml"));and this within the Sandbox equivalent of scene.cs
// Sanity!
if ( !isObject(proggywindow) )
{
// Create the scene window.
new SceneWindow(proggywindow);
// Set profile.
proggywindow.Profile = SandboxWindowProfile;
// Push the window.
Canvas.setContent( proggywindow );
}
else
{
echo("successfully read window from taml");//this is echoed, like it should be
Canvas.setContent(proggywindow);
Canvas.pushDialog(gui_mainscreen);
}The taml is read fine, the gui is pushed fine but the screen doesn't split to what the proggywindow tells it to.
Edit: I also tried setting both "width" and "height" to "relative", didn't work.
Edit#2: The solution was to call: Canvas.setContent(gui_mainscreen);
#2
03/06/2013 (6:58 am)
The above method I used worked somewhat but the method the "multiplewindow" toy uses is better. However, when the split scene goes into an area that doesn't have anything drawn onto it (i.e. outside level boundaries) the main scene's contents are displayed instead of black. I tried setting the main scene visibility off, also active off: didn't work. I tried setting the split scene's background to black: didn't work. pic: http://i50.tinypic.com/4u9shc.jpg
#4
03/07/2013 (3:58 am)
Yep, that tip did it. Thanks all for the help.
Community Manager Michael Perry
ZombieShortbus