mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +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
|
|
@ -58,6 +58,10 @@ IMPLEMENT_CALLBACK( GuiTabBookCtrl, onTabSelected, void, ( const String& text, U
|
|||
"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 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 ),
|
||||
"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"
|
||||
|
|
@ -849,7 +853,10 @@ void GuiTabBookCtrl::selectPage( GuiTabPageCtrl *page )
|
|||
onTabSelected_callback( tab->getText(), index );
|
||||
}
|
||||
else
|
||||
tab->setVisible( false );
|
||||
{
|
||||
tab->setVisible(false);
|
||||
onTabUnSelected_callback(tab->getText(), index);
|
||||
}
|
||||
}
|
||||
setUpdateLayout( updateSelf );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ class GuiTabBookCtrl : public GuiContainer
|
|||
/// @{
|
||||
|
||||
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 ) );
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
// the shape bounds and can often get culled.
|
||||
|
||||
GameConnection *conn = GameConnection::getConnectionToServer();
|
||||
if (conn->getControlObject())
|
||||
if (conn && conn->getControlObject())
|
||||
{
|
||||
GameBase *conObject = conn->getControlObject();
|
||||
activeLights.push_back_unique(conObject);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this )
|
|||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
EditorGui.add( EVPathEditor );
|
||||
MainSceneTabPanel.add( EVPathEditor );
|
||||
EVPathEditor.setVisible( false );
|
||||
|
||||
%this.EditorMap = new ActionMap();
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function VerveEditor::LaunchEditor()
|
|||
{
|
||||
%mainScreen.add(VerveEditorGUI);
|
||||
VerveEditorGUI.position.y = VerveEditorGUI.Position.y + 20;
|
||||
EditorGUI.add(%mainScreen);
|
||||
MainSceneTabPanel.add(%mainScreen);
|
||||
}
|
||||
|
||||
// Clear History.
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ function initializeConvexEditor()
|
|||
|
||||
ConvexEditorOptionsWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( ConvexEditorGui );
|
||||
EditorGui.add( ConvexEditorOptionsWindow );
|
||||
EditorGui.add( ConvexEditorTreeWindow );
|
||||
EditorGui.add( ConvexEditorOptionsWindow );
|
||||
MainSceneTabPanel.add( ConvexEditorGui );
|
||||
MainSceneTabPanel.add( ConvexEditorOptionsWindow );
|
||||
MainSceneTabPanel.add( ConvexEditorTreeWindow );
|
||||
MainSceneTabPanel.add( ConvexEditorOptionsWindow );
|
||||
|
||||
new ScriptObject( ConvexEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ function initializeDatablockEditor()
|
|||
DatablockEditorInspectorWindow.setVisible( false );
|
||||
DatablockEditorTreeWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( DatablockEditorInspectorWindow );
|
||||
EditorGui.add( DatablockEditorTreeWindow );
|
||||
MainSceneTabPanel.add( DatablockEditorInspectorWindow );
|
||||
MainSceneTabPanel.add( DatablockEditorTreeWindow );
|
||||
|
||||
new ScriptObject( DatablockEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ function initializeDecalEditor()
|
|||
DecalEditorGui.setVisible( false );
|
||||
DecalPreviewWindow.setVisible( false );
|
||||
DecalEditorWindow.setVisible( false );
|
||||
EditorGui.add( DecalEditorGui );
|
||||
EditorGui.add( DecalEditorWindow );
|
||||
EditorGui.add( DecalPreviewWindow );
|
||||
MainSceneTabPanel.add( DecalEditorGui );
|
||||
MainSceneTabPanel.add( DecalEditorWindow );
|
||||
MainSceneTabPanel.add( DecalPreviewWindow );
|
||||
DecalEditorTabBook.selectPage( 0 );
|
||||
|
||||
new ScriptObject( DecalEditorPlugin )
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ function initializeForestEditor()
|
|||
ForestEditorPalleteWindow.setVisible( false );
|
||||
ForestEditorPropertiesWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( ForestEditorGui );
|
||||
EditorGui.add( ForestEditorPalleteWindow );
|
||||
EditorGui.add( ForestEditorPropertiesWindow );
|
||||
MainSceneTabPanel.add( ForestEditorGui );
|
||||
MainSceneTabPanel.add( ForestEditorPalleteWindow );
|
||||
MainSceneTabPanel.add( ForestEditorPropertiesWindow );
|
||||
|
||||
new ScriptObject( ForestEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ function initializeMaterialEditor()
|
|||
matEd_addCubemapWindow.setVisible( false );
|
||||
MaterialEditorPropertiesWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( MaterialEditorPreviewWindow );
|
||||
EditorGui.add( matEd_cubemapEditor );
|
||||
EditorGui.add( matEd_addCubemapWindow );
|
||||
EditorGui.add( MaterialEditorPropertiesWindow );
|
||||
MainSceneTabPanel.add( MaterialEditorPreviewWindow );
|
||||
MainSceneTabPanel.add( matEd_cubemapEditor );
|
||||
MainSceneTabPanel.add( matEd_addCubemapWindow );
|
||||
MainSceneTabPanel.add( MaterialEditorPropertiesWindow );
|
||||
}
|
||||
|
||||
function destroyMaterialEditor()
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ function initializeMeshRoadEditor()
|
|||
MeshRoadEditorOptionsWindow.setVisible( false );
|
||||
MeshRoadEditorTreeWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( MeshRoadEditorGui );
|
||||
EditorGui.add( MeshRoadEditorOptionsWindow );
|
||||
EditorGui.add( MeshRoadEditorTreeWindow );
|
||||
MainSceneTabPanel.add( MeshRoadEditorGui );
|
||||
MainSceneTabPanel.add( MeshRoadEditorOptionsWindow );
|
||||
MainSceneTabPanel.add( MeshRoadEditorTreeWindow );
|
||||
|
||||
new ScriptObject( MeshRoadEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ function initializeMissionAreaEditor()
|
|||
MissionAreaEditorTerrainWindow.setVisible( false );
|
||||
MissionAreaEditorPropertiesWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( MissionAreaEditorGui );
|
||||
EditorGui.add( MissionAreaEditorTerrainWindow );
|
||||
EditorGui.add( MissionAreaEditorPropertiesWindow );
|
||||
MainSceneTabPanel.add( MissionAreaEditorGui );
|
||||
MainSceneTabPanel.add( MissionAreaEditorTerrainWindow );
|
||||
MainSceneTabPanel.add( MissionAreaEditorPropertiesWindow );
|
||||
|
||||
new ScriptObject( MissionAreaEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ function initializeNavEditor()
|
|||
NavEditorTreeWindow.setVisible(false);
|
||||
NavEditorConsoleDlg.setVisible(false);
|
||||
|
||||
EditorGui.add(NavEditorGui);
|
||||
EditorGui.add(NavEditorOptionsWindow);
|
||||
EditorGui.add(NavEditorTreeWindow);
|
||||
EditorGui.add(NavEditorConsoleDlg);
|
||||
MainSceneTabPanel.add(NavEditorGui);
|
||||
MainSceneTabPanel.add(NavEditorOptionsWindow);
|
||||
MainSceneTabPanel.add(NavEditorTreeWindow);
|
||||
MainSceneTabPanel.add(NavEditorConsoleDlg);
|
||||
|
||||
new ScriptObject(NavEditorPlugin)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function initializeParticleEditor()
|
|||
exec( "./particleParticleEditor.ed." @ $TorqueScriptFileExtension );
|
||||
|
||||
PE_Window.setVisible( false );
|
||||
EditorGui.add( PE_Window );
|
||||
MainSceneTabPanel.add( PE_Window );
|
||||
|
||||
new ScriptObject( ParticleEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ function initializeRiverEditor()
|
|||
RiverEditorOptionsWindow.setVisible( false );
|
||||
RiverEditorTreeWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( RiverEditorGui );
|
||||
EditorGui.add( RiverEditorOptionsWindow );
|
||||
EditorGui.add( RiverEditorTreeWindow );
|
||||
MainSceneTabPanel.add( RiverEditorGui );
|
||||
MainSceneTabPanel.add( RiverEditorOptionsWindow );
|
||||
MainSceneTabPanel.add( RiverEditorTreeWindow );
|
||||
|
||||
new ScriptObject( RiverEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ function initializeRoadEditor()
|
|||
RoadEditorOptionsWindow.setVisible( false );
|
||||
RoadEditorTreeWindow.setVisible( false );
|
||||
|
||||
EditorGui.add( RoadEditorGui );
|
||||
EditorGui.add( RoadEditorOptionsWindow );
|
||||
EditorGui.add( RoadEditorTreeWindow );
|
||||
MainSceneTabPanel.add( RoadEditorGui );
|
||||
MainSceneTabPanel.add( RoadEditorOptionsWindow );
|
||||
MainSceneTabPanel.add( RoadEditorTreeWindow );
|
||||
|
||||
new ScriptObject( RoadEditorPlugin )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ function initializeShapeEditor()
|
|||
ShapeEdSelectWindow.setVisible(false);
|
||||
ShapeEdPropWindow.setVisible(false);
|
||||
|
||||
EditorGui.add(ShapeEdPreviewGui);
|
||||
EditorGui.add(ShapeEdAnimWindow);
|
||||
EditorGui.add(ShapeEdAdvancedWindow);
|
||||
MainSceneTabPanel.add(ShapeEdPreviewGui);
|
||||
MainSceneTabPanel.add(ShapeEdAnimWindow);
|
||||
MainSceneTabPanel.add(ShapeEdAdvancedWindow);
|
||||
|
||||
EditorGui.add(ShapeEdSelectWindow);
|
||||
EditorGui.add(ShapeEdPropWindow);
|
||||
MainSceneTabPanel.add(ShapeEdSelectWindow);
|
||||
MainSceneTabPanel.add(ShapeEdPropWindow);
|
||||
|
||||
new ScriptObject(ShapeEditorPlugin)
|
||||
{
|
||||
|
|
@ -186,7 +186,7 @@ function ShapeEditorPlugin::open(%this, %shapeAsset)
|
|||
ShapeEdPropWindow.setVisible(true);
|
||||
ShapeEdAnimWindow.setVisible(true);
|
||||
ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue());
|
||||
EditorGui.bringToFront(ShapeEdPreviewGui);
|
||||
MainSceneTabPanel.bringToFront(ShapeEdPreviewGui);
|
||||
|
||||
ToolsPaletteArray->WorldEditorMove.performClick();
|
||||
%this.map.push();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,7 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
|
|||
Profile = "ToolsMenubarProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 41";
|
||||
Position = "0 38";
|
||||
Extent = "0 33";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ function EditorGui::init(%this)
|
|||
|
||||
if( isObject( EWToolsPaletteWindow ) )
|
||||
{
|
||||
%this.add( EWToolsPaletteWindow );
|
||||
MainSceneTabPanel.add( EWToolsPaletteWindow );
|
||||
EWToolsPaletteWindow.init();
|
||||
EWToolsPaletteWindow.setVisible( false );
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ function EditorGui::init(%this)
|
|||
exec("~/worldEditor/gui/ToolsToolbar.ed.gui");
|
||||
if( isObject( EWToolsToolbar ) )
|
||||
{
|
||||
%this.add( EWToolsToolbar );
|
||||
MainSceneTabPanel.add( EWToolsToolbar );
|
||||
EWToolsToolbar.setVisible( true );
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue