mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1136 from Areloch/TabbedEditorFormBaseline
Moves the world Editor guis to be based through a tabbed structure
This commit is contained in:
commit
917cb882e9
20 changed files with 1503 additions and 1471 deletions
|
|
@ -58,6 +58,10 @@ IMPLEMENT_CALLBACK( GuiTabBookCtrl, onTabSelected, void, ( const String& text, U
|
||||||
"Called when a new tab page is selected.\n\n"
|
"Called when a new tab page is selected.\n\n"
|
||||||
"@param text Text of the page header for the tab that is being selected.\n"
|
"@param text Text of the page header for the tab that is being selected.\n"
|
||||||
"@param index Index of the tab page being selected." );
|
"@param index Index of the tab page being selected." );
|
||||||
|
IMPLEMENT_CALLBACK(GuiTabBookCtrl, onTabUnSelected, void, (const String& text, U32 index), (text, index),
|
||||||
|
"Called when a new tab page is unselected.\n\n"
|
||||||
|
"@param text Text of the page header for the tab that is being unselected.\n"
|
||||||
|
"@param index Index of the tab page being unselected.");
|
||||||
IMPLEMENT_CALLBACK( GuiTabBookCtrl, onTabRightClick, void, ( const String& text, U32 index ), ( text, index ),
|
IMPLEMENT_CALLBACK( GuiTabBookCtrl, onTabRightClick, void, ( const String& text, U32 index ), ( text, index ),
|
||||||
"Called when the user right-clicks on a tab page header.\n\n"
|
"Called when the user right-clicks on a tab page header.\n\n"
|
||||||
"@param text Text of the page header for the tab that is being selected.\n"
|
"@param text Text of the page header for the tab that is being selected.\n"
|
||||||
|
|
@ -849,7 +853,10 @@ void GuiTabBookCtrl::selectPage( GuiTabPageCtrl *page )
|
||||||
onTabSelected_callback( tab->getText(), index );
|
onTabSelected_callback( tab->getText(), index );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tab->setVisible( false );
|
{
|
||||||
|
tab->setVisible(false);
|
||||||
|
onTabUnSelected_callback(tab->getText(), index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setUpdateLayout( updateSelf );
|
setUpdateLayout( updateSelf );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ class GuiTabBookCtrl : public GuiContainer
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
DECLARE_CALLBACK( void, onTabSelected, ( const String& text, U32 index ) );
|
DECLARE_CALLBACK( void, onTabSelected, ( const String& text, U32 index ) );
|
||||||
|
DECLARE_CALLBACK(void, onTabUnSelected, (const String& text, U32 index));
|
||||||
DECLARE_CALLBACK( void, onTabRightClick, ( const String& text, U32 index ) );
|
DECLARE_CALLBACK( void, onTabRightClick, ( const String& text, U32 index ) );
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
||||||
// the shape bounds and can often get culled.
|
// the shape bounds and can often get culled.
|
||||||
|
|
||||||
GameConnection *conn = GameConnection::getConnectionToServer();
|
GameConnection *conn = GameConnection::getConnectionToServer();
|
||||||
if (conn->getControlObject())
|
if (conn && conn->getControlObject())
|
||||||
{
|
{
|
||||||
GameBase *conObject = conn->getControlObject();
|
GameBase *conObject = conn->getControlObject();
|
||||||
activeLights.push_back_unique(conObject);
|
activeLights.push_back_unique(conObject);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this )
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
EditorGui.add( EVPathEditor );
|
MainSceneTabPanel.add( EVPathEditor );
|
||||||
EVPathEditor.setVisible( false );
|
EVPathEditor.setVisible( false );
|
||||||
|
|
||||||
%this.EditorMap = new ActionMap();
|
%this.EditorMap = new ActionMap();
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function VerveEditor::LaunchEditor()
|
||||||
{
|
{
|
||||||
%mainScreen.add(VerveEditorGUI);
|
%mainScreen.add(VerveEditorGUI);
|
||||||
VerveEditorGUI.position.y = VerveEditorGUI.Position.y + 20;
|
VerveEditorGUI.position.y = VerveEditorGUI.Position.y + 20;
|
||||||
EditorGUI.add(%mainScreen);
|
MainSceneTabPanel.add(%mainScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear History.
|
// Clear History.
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@ function initializeConvexEditor()
|
||||||
|
|
||||||
ConvexEditorOptionsWindow.setVisible( false );
|
ConvexEditorOptionsWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( ConvexEditorGui );
|
MainSceneTabPanel.add( ConvexEditorGui );
|
||||||
EditorGui.add( ConvexEditorOptionsWindow );
|
MainSceneTabPanel.add( ConvexEditorOptionsWindow );
|
||||||
EditorGui.add( ConvexEditorTreeWindow );
|
MainSceneTabPanel.add( ConvexEditorTreeWindow );
|
||||||
EditorGui.add( ConvexEditorOptionsWindow );
|
MainSceneTabPanel.add( ConvexEditorOptionsWindow );
|
||||||
|
|
||||||
new ScriptObject( ConvexEditorPlugin )
|
new ScriptObject( ConvexEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ function initializeDatablockEditor()
|
||||||
DatablockEditorInspectorWindow.setVisible( false );
|
DatablockEditorInspectorWindow.setVisible( false );
|
||||||
DatablockEditorTreeWindow.setVisible( false );
|
DatablockEditorTreeWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( DatablockEditorInspectorWindow );
|
MainSceneTabPanel.add( DatablockEditorInspectorWindow );
|
||||||
EditorGui.add( DatablockEditorTreeWindow );
|
MainSceneTabPanel.add( DatablockEditorTreeWindow );
|
||||||
|
|
||||||
new ScriptObject( DatablockEditorPlugin )
|
new ScriptObject( DatablockEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ function initializeDecalEditor()
|
||||||
DecalEditorGui.setVisible( false );
|
DecalEditorGui.setVisible( false );
|
||||||
DecalPreviewWindow.setVisible( false );
|
DecalPreviewWindow.setVisible( false );
|
||||||
DecalEditorWindow.setVisible( false );
|
DecalEditorWindow.setVisible( false );
|
||||||
EditorGui.add( DecalEditorGui );
|
MainSceneTabPanel.add( DecalEditorGui );
|
||||||
EditorGui.add( DecalEditorWindow );
|
MainSceneTabPanel.add( DecalEditorWindow );
|
||||||
EditorGui.add( DecalPreviewWindow );
|
MainSceneTabPanel.add( DecalPreviewWindow );
|
||||||
DecalEditorTabBook.selectPage( 0 );
|
DecalEditorTabBook.selectPage( 0 );
|
||||||
|
|
||||||
new ScriptObject( DecalEditorPlugin )
|
new ScriptObject( DecalEditorPlugin )
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ function initializeForestEditor()
|
||||||
ForestEditorPalleteWindow.setVisible( false );
|
ForestEditorPalleteWindow.setVisible( false );
|
||||||
ForestEditorPropertiesWindow.setVisible( false );
|
ForestEditorPropertiesWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( ForestEditorGui );
|
MainSceneTabPanel.add( ForestEditorGui );
|
||||||
EditorGui.add( ForestEditorPalleteWindow );
|
MainSceneTabPanel.add( ForestEditorPalleteWindow );
|
||||||
EditorGui.add( ForestEditorPropertiesWindow );
|
MainSceneTabPanel.add( ForestEditorPropertiesWindow );
|
||||||
|
|
||||||
new ScriptObject( ForestEditorPlugin )
|
new ScriptObject( ForestEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,10 @@ function initializeMaterialEditor()
|
||||||
matEd_addCubemapWindow.setVisible( false );
|
matEd_addCubemapWindow.setVisible( false );
|
||||||
MaterialEditorPropertiesWindow.setVisible( false );
|
MaterialEditorPropertiesWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( MaterialEditorPreviewWindow );
|
MainSceneTabPanel.add( MaterialEditorPreviewWindow );
|
||||||
EditorGui.add( matEd_cubemapEditor );
|
MainSceneTabPanel.add( matEd_cubemapEditor );
|
||||||
EditorGui.add( matEd_addCubemapWindow );
|
MainSceneTabPanel.add( matEd_addCubemapWindow );
|
||||||
EditorGui.add( MaterialEditorPropertiesWindow );
|
MainSceneTabPanel.add( MaterialEditorPropertiesWindow );
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyMaterialEditor()
|
function destroyMaterialEditor()
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ function initializeMeshRoadEditor()
|
||||||
MeshRoadEditorOptionsWindow.setVisible( false );
|
MeshRoadEditorOptionsWindow.setVisible( false );
|
||||||
MeshRoadEditorTreeWindow.setVisible( false );
|
MeshRoadEditorTreeWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( MeshRoadEditorGui );
|
MainSceneTabPanel.add( MeshRoadEditorGui );
|
||||||
EditorGui.add( MeshRoadEditorOptionsWindow );
|
MainSceneTabPanel.add( MeshRoadEditorOptionsWindow );
|
||||||
EditorGui.add( MeshRoadEditorTreeWindow );
|
MainSceneTabPanel.add( MeshRoadEditorTreeWindow );
|
||||||
|
|
||||||
new ScriptObject( MeshRoadEditorPlugin )
|
new ScriptObject( MeshRoadEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ function initializeMissionAreaEditor()
|
||||||
MissionAreaEditorTerrainWindow.setVisible( false );
|
MissionAreaEditorTerrainWindow.setVisible( false );
|
||||||
MissionAreaEditorPropertiesWindow.setVisible( false );
|
MissionAreaEditorPropertiesWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( MissionAreaEditorGui );
|
MainSceneTabPanel.add( MissionAreaEditorGui );
|
||||||
EditorGui.add( MissionAreaEditorTerrainWindow );
|
MainSceneTabPanel.add( MissionAreaEditorTerrainWindow );
|
||||||
EditorGui.add( MissionAreaEditorPropertiesWindow );
|
MainSceneTabPanel.add( MissionAreaEditorPropertiesWindow );
|
||||||
|
|
||||||
new ScriptObject( MissionAreaEditorPlugin )
|
new ScriptObject( MissionAreaEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,10 @@ function initializeNavEditor()
|
||||||
NavEditorTreeWindow.setVisible(false);
|
NavEditorTreeWindow.setVisible(false);
|
||||||
NavEditorConsoleDlg.setVisible(false);
|
NavEditorConsoleDlg.setVisible(false);
|
||||||
|
|
||||||
EditorGui.add(NavEditorGui);
|
MainSceneTabPanel.add(NavEditorGui);
|
||||||
EditorGui.add(NavEditorOptionsWindow);
|
MainSceneTabPanel.add(NavEditorOptionsWindow);
|
||||||
EditorGui.add(NavEditorTreeWindow);
|
MainSceneTabPanel.add(NavEditorTreeWindow);
|
||||||
EditorGui.add(NavEditorConsoleDlg);
|
MainSceneTabPanel.add(NavEditorConsoleDlg);
|
||||||
|
|
||||||
new ScriptObject(NavEditorPlugin)
|
new ScriptObject(NavEditorPlugin)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ function initializeParticleEditor()
|
||||||
exec( "./particleParticleEditor.ed." @ $TorqueScriptFileExtension );
|
exec( "./particleParticleEditor.ed." @ $TorqueScriptFileExtension );
|
||||||
|
|
||||||
PE_Window.setVisible( false );
|
PE_Window.setVisible( false );
|
||||||
EditorGui.add( PE_Window );
|
MainSceneTabPanel.add( PE_Window );
|
||||||
|
|
||||||
new ScriptObject( ParticleEditorPlugin )
|
new ScriptObject( ParticleEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@ function initializeRiverEditor()
|
||||||
RiverEditorOptionsWindow.setVisible( false );
|
RiverEditorOptionsWindow.setVisible( false );
|
||||||
RiverEditorTreeWindow.setVisible( false );
|
RiverEditorTreeWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( RiverEditorGui );
|
MainSceneTabPanel.add( RiverEditorGui );
|
||||||
EditorGui.add( RiverEditorOptionsWindow );
|
MainSceneTabPanel.add( RiverEditorOptionsWindow );
|
||||||
EditorGui.add( RiverEditorTreeWindow );
|
MainSceneTabPanel.add( RiverEditorTreeWindow );
|
||||||
|
|
||||||
new ScriptObject( RiverEditorPlugin )
|
new ScriptObject( RiverEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@ function initializeRoadEditor()
|
||||||
RoadEditorOptionsWindow.setVisible( false );
|
RoadEditorOptionsWindow.setVisible( false );
|
||||||
RoadEditorTreeWindow.setVisible( false );
|
RoadEditorTreeWindow.setVisible( false );
|
||||||
|
|
||||||
EditorGui.add( RoadEditorGui );
|
MainSceneTabPanel.add( RoadEditorGui );
|
||||||
EditorGui.add( RoadEditorOptionsWindow );
|
MainSceneTabPanel.add( RoadEditorOptionsWindow );
|
||||||
EditorGui.add( RoadEditorTreeWindow );
|
MainSceneTabPanel.add( RoadEditorTreeWindow );
|
||||||
|
|
||||||
new ScriptObject( RoadEditorPlugin )
|
new ScriptObject( RoadEditorPlugin )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ function initializeShapeEditor()
|
||||||
ShapeEdSelectWindow.setVisible(false);
|
ShapeEdSelectWindow.setVisible(false);
|
||||||
ShapeEdPropWindow.setVisible(false);
|
ShapeEdPropWindow.setVisible(false);
|
||||||
|
|
||||||
EditorGui.add(ShapeEdPreviewGui);
|
MainSceneTabPanel.add(ShapeEdPreviewGui);
|
||||||
EditorGui.add(ShapeEdAnimWindow);
|
MainSceneTabPanel.add(ShapeEdAnimWindow);
|
||||||
EditorGui.add(ShapeEdAdvancedWindow);
|
MainSceneTabPanel.add(ShapeEdAdvancedWindow);
|
||||||
|
|
||||||
EditorGui.add(ShapeEdSelectWindow);
|
MainSceneTabPanel.add(ShapeEdSelectWindow);
|
||||||
EditorGui.add(ShapeEdPropWindow);
|
MainSceneTabPanel.add(ShapeEdPropWindow);
|
||||||
|
|
||||||
new ScriptObject(ShapeEditorPlugin)
|
new ScriptObject(ShapeEditorPlugin)
|
||||||
{
|
{
|
||||||
|
|
@ -186,7 +186,7 @@ function ShapeEditorPlugin::open(%this, %shapeAsset)
|
||||||
ShapeEdPropWindow.setVisible(true);
|
ShapeEdPropWindow.setVisible(true);
|
||||||
ShapeEdAnimWindow.setVisible(true);
|
ShapeEdAnimWindow.setVisible(true);
|
||||||
ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue());
|
ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue());
|
||||||
EditorGui.bringToFront(ShapeEdPreviewGui);
|
MainSceneTabPanel.bringToFront(ShapeEdPreviewGui);
|
||||||
|
|
||||||
ToolsPaletteArray->WorldEditorMove.performClick();
|
ToolsPaletteArray->WorldEditorMove.performClick();
|
||||||
%this.map.push();
|
%this.map.push();
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,7 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
|
||||||
Profile = "ToolsMenubarProfile";
|
Profile = "ToolsMenubarProfile";
|
||||||
HorizSizing = "right";
|
HorizSizing = "right";
|
||||||
VertSizing = "bottom";
|
VertSizing = "bottom";
|
||||||
Position = "0 41";
|
Position = "0 38";
|
||||||
Extent = "0 33";
|
Extent = "0 33";
|
||||||
MinExtent = "8 2";
|
MinExtent = "8 2";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ function EditorGui::init(%this)
|
||||||
|
|
||||||
if( isObject( EWToolsPaletteWindow ) )
|
if( isObject( EWToolsPaletteWindow ) )
|
||||||
{
|
{
|
||||||
%this.add( EWToolsPaletteWindow );
|
MainSceneTabPanel.add( EWToolsPaletteWindow );
|
||||||
EWToolsPaletteWindow.init();
|
EWToolsPaletteWindow.init();
|
||||||
EWToolsPaletteWindow.setVisible( false );
|
EWToolsPaletteWindow.setVisible( false );
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ function EditorGui::init(%this)
|
||||||
exec("~/worldEditor/gui/ToolsToolbar.ed.gui");
|
exec("~/worldEditor/gui/ToolsToolbar.ed.gui");
|
||||||
if( isObject( EWToolsToolbar ) )
|
if( isObject( EWToolsToolbar ) )
|
||||||
{
|
{
|
||||||
%this.add( EWToolsToolbar );
|
MainSceneTabPanel.add( EWToolsToolbar );
|
||||||
EWToolsToolbar.setVisible( true );
|
EWToolsToolbar.setVisible( true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue