Utilizes old method to clean up tree items in GuiTreeViewCtrl to resolve guiEditor crashes

Updates probeManager to correctly utilize skylight idx to infer if a skylight is active, and set the SKYLIGHT_ONLY macro correctly, resolving erroneous behavior
Cleaned up some of the guiEditor initialization script to remove redundancy
Cleaned up tools modules loading script to remove redundancy
This commit is contained in:
Areloch 2019-09-18 01:41:57 -05:00
parent 9db95f4fb2
commit ff4c2d59fc
6 changed files with 155 additions and 167 deletions

View file

@ -74,22 +74,14 @@ function toggleGuiEditor( %make )
{
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
toggleEditor( true );
if( !isObject( GuiEditCanvas ) )
new GuiControl( GuiEditCanvas, EditorGuiGroup );
if( GuiEditorIsActive() )
if( $InGuiEditor || GuiEditorIsActive() )
{
GuiEditor.close();
}
else
{
GuiEditor.open();
// Cancel the scheduled event to prevent
// the level from cycling after it's duration
// has elapsed.
cancel($Game::Schedule);
}
// Cancel the scheduled event to prevent
@ -115,6 +107,9 @@ package GuiEditor_BlockDialogs
function GuiEditor::open(%this)
{
if( !isObject( GuiEditCanvas ) )
new GuiControl( GuiEditCanvas, EditorGuiGroup );
GuiEditCanvas.onCreateMenu();
GuiEditContent(Canvas.getContent());

View file

@ -31,7 +31,7 @@ function GuiEditCanvas::onAdd( %this )
{
// %this.setWindowTitle("Torque Gui Editor");
%this.onCreateMenu();
//%this.onCreateMenu();
}
//---------------------------------------------------------------------------------------------