فهرست منبع

Initial WIP of the Modern Editor Layout

Areloch 6 سال پیش
والد
کامیت
81dcac1190
63فایلهای تغییر یافته به همراه1082 افزوده شده و 0 حذف شده
  1. 22 0
      Engine/source/gui/containers/guiSplitContainer.cpp
  2. 2 0
      Engine/source/gui/containers/guiSplitContainer.h
  3. 207 0
      Templates/Full/game/tools/MainEditor/MainEditor.cs
  4. 9 0
      Templates/Full/game/tools/MainEditor/MainEditor.module
  5. BIN
      Templates/Full/game/tools/MainEditor/art/Button.png
  6. BIN
      Templates/Full/game/tools/MainEditor/art/GroupBackground.png
  7. BIN
      Templates/Full/game/tools/MainEditor/art/GroupBackground_h.png
  8. BIN
      Templates/Full/game/tools/MainEditor/art/GroupBackground_i.png
  9. BIN
      Templates/Full/game/tools/MainEditor/art/PropertyRollout.png
  10. BIN
      Templates/Full/game/tools/MainEditor/art/ScrollBar.png
  11. BIN
      Templates/Full/game/tools/MainEditor/art/ScrollBar_.png
  12. BIN
      Templates/Full/game/tools/MainEditor/art/Spacer.png
  13. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddEvent.png
  14. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddEvent_d.png
  15. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddEvent_h.png
  16. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddGroup.png
  17. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddGroup_d.png
  18. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddGroup_h.png
  19. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddL.png
  20. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddL_d.png
  21. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddL_h.png
  22. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddR.png
  23. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddR_d.png
  24. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddR_h.png
  25. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddSml.png
  26. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddSml_d.png
  27. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddSml_h.png
  28. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddTrack.png
  29. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddTrack_d.png
  30. BIN
      Templates/Full/game/tools/MainEditor/art/btn_AddTrack_h.png
  31. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Delete.png
  32. BIN
      Templates/Full/game/tools/MainEditor/art/btn_DeleteSml.png
  33. BIN
      Templates/Full/game/tools/MainEditor/art/btn_DeleteSml_d.png
  34. BIN
      Templates/Full/game/tools/MainEditor/art/btn_DeleteSml_h.png
  35. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Delete_d.png
  36. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Delete_h.png
  37. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Forward.png
  38. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Forward_d.png
  39. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Forward_h.png
  40. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Palette_d.png
  41. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Palette_h.png
  42. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Palette_n.png
  43. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Pause.png
  44. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Pause_d.png
  45. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Pause_h.png
  46. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Play.png
  47. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Play_d.png
  48. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Play_h.png
  49. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Rewind.png
  50. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Rewind_d.png
  51. BIN
      Templates/Full/game/tools/MainEditor/art/btn_Rewind_h.png
  52. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepB.png
  53. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepB_d.png
  54. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepB_h.png
  55. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepF.png
  56. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepF_d.png
  57. BIN
      Templates/Full/game/tools/MainEditor/art/btn_StepF_h.png
  58. 485 0
      Templates/Full/game/tools/MainEditor/guis/MainEditorWindow.gui
  59. 213 0
      Templates/Full/game/tools/MainEditor/scripts/GuiProfiles.cs
  60. 103 0
      Templates/Full/game/tools/MainEditor/scripts/newEditorGui.cs
  61. 26 0
      Templates/Full/game/tools/Tools.cs
  62. 8 0
      Templates/Full/game/tools/Tools.module
  63. 7 0
      Templates/Full/game/tools/main.cs

+ 22 - 0
Engine/source/gui/containers/guiSplitContainer.cpp

@@ -613,3 +613,25 @@ void GuiSplitContainer::onMouseDragged( const GuiEvent &event )
       solvePanelConstraints(newDragPos, firstPanel, secondPanel, clientRect);
    }
 }
+
+void GuiSplitContainer::setSplitPoint(Point2I splitPoint)
+{
+   GuiContainer *firstPanel = dynamic_cast<GuiContainer*>(at(0));
+   GuiContainer *secondPanel = dynamic_cast<GuiContainer*>(at(1));
+
+   // This function will constrain the panels to their minExtents and update the mSplitPoint
+   if (firstPanel && secondPanel)
+   {
+      RectI clientRect = getClientRect();
+
+      solvePanelConstraints(splitPoint, firstPanel, secondPanel, clientRect);
+
+      layoutControls(clientRect);
+   }
+}
+
+DefineEngineMethod(GuiSplitContainer, setSplitPoint, void, (Point2I splitPoint), ,
+   "Set the window's collapsing state.")
+{
+   object->setSplitPoint(splitPoint);
+}

+ 2 - 0
Engine/source/gui/containers/guiSplitContainer.h

@@ -87,6 +87,8 @@ public:
    virtual void solvePanelConstraints(Point2I newDragPos, GuiContainer * firstPanel, GuiContainer * secondPanel, const RectI& clientRect);
    virtual Point2I getMinExtent() const;   
 
+   void setSplitPoint(Point2I splitPoint);
+
 protected:
 
    S32         mFixedPanel; 

+ 207 - 0
Templates/Full/game/tools/MainEditor/MainEditor.cs

@@ -0,0 +1,207 @@
+function MainEditor::onCreate( %this )
+{
+   echo("\n--------- Initializing MainEditor ---------");
+   
+   //exec("tools/gui/profiles.ed.cs");
+   //exec("./scripts/GuiProfiles.cs");
+
+   exec("./guis/MainEditorWindow.gui");
+   
+   //exec("./scripts/newEditorGui.cs");
+   
+   $UsePanelLayout = false;
+   $AssetBrowserPanelState = true;
+   $AssetBrowserPanelSplit = 0;
+   $InspectorPanelState = true;
+   $InspectorPanelSplit = 0;
+   $ToolsPanelState = true;
+   $ToolsPanelSplit = 0;
+}
+
+function MainEditor::onDestroy( %this )
+{
+}
+
+function NewEditorGui::addNewEditorTab(%this, %editorName)
+{
+   %editorTab = new GuiTabPageCtrl()
+   {
+      Profile = "ToolsGuiEditorTabPage";
+      position = "0 0";
+      extent = Editor_MainViewTabBook.extent;
+      AnchorTop = "1";
+      AnchorBottom = "0";
+      AnchorLeft = "1";
+      AnchorRight = "0";
+      horizSizing = "width";
+      vertSizing = "height";
+      text = %editorName;
+   };
+   
+   Editor_MainViewTabBook.add(%editorTab);
+   
+   return %editorTab;
+}
+
+function togglePanelLayout()
+{
+   $UsePanelLayout = !$UsePanelLayout;
+   
+   if($UsePanelLayout)
+   {
+      EditorGui.add(NewEditorGui);
+      
+      //Nudge us down so we show the toolbar
+      NewEditorGui.resize(0, EditorGuiToolbar.extent.y, EditorGui.extent.x, EditorGui.extent.y - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y);
+      
+      %mainEditViewTitle = "Level - " @ getScene(0).getName();
+      %mainEditViewCtrl = NewEditorGui.addNewEditorTab(%mainEditViewTitle);
+      
+      %mainEditViewCtrl.add(EWorldEditor);
+      EWorldEditor.position = "0 24";
+      EWorldEditor.extent = %mainEditViewCtrl.extent.x SPC %mainEditViewCtrl.extent.y - 24;
+      
+      Editor_AssetBrowserPanel.add(AssetBrowser);
+      AssetBrowser.resize(0,0, Editor_AssetBrowserPanel.extent.x, Editor_AssetBrowserPanel.extent.y);
+      AssetBrowser.horizSizing = "width";
+      AssetBrowser.vertSizing = "height";
+      AssetBrowserWindow.resize(0,0, AssetBrowser.extent.x, AssetBrowser.extent.y);
+      AssetBrowserWindow.horizSizing = "width";
+      AssetBrowserWindow.vertSizing = "height";
+      AssetBrowserWindow.canClose = false;
+      AssetBrowserWindow.canCollapse = false;
+      AssetBrowserWindow.canMaximize = false;
+      AssetBrowserWindow.canMinimize = false;
+      AssetBrowserWindow.canMove = false;
+      AssetBrowserWindow.resizeWidth = false;
+      AssetBrowserWindow.resizeHeight = false;
+      
+      //Prep it
+      AssetBrowser.loadFilters();
+     
+      Editor_SceneTreePanel.add(EWTreeWindow);
+      EWTreeWindow.resize(0,0, Editor_SceneTreePanel.extent.x, Editor_SceneTreePanel.extent.y);
+      EWTreeWindow.horizSizing = "width";
+      EWTreeWindow.vertSizing = "height";
+      EWTreeWindow.canClose = false;
+      EWTreeWindow.canCollapse = false;
+      EWTreeWindow.canMaximize = false;
+      EWTreeWindow.canMinimize = false;
+      EWTreeWindow.canMove = false;
+      EWTreeWindow.resizeWidth = false;
+      EWTreeWindow.resizeHeight = false;
+      
+      if(!isObject(Scenes))
+      {
+         $scenesRootGroup = new SimGroup(Scenes);
+      
+         $scenesRootGroup.add(getScene(0));
+      }
+      
+      EditorTree.open($scenesRootGroup,true);
+      
+      Editor_PropertiesPanel.add(EWInspectorWindow);
+      EWInspectorWindow.resize(0,0, Editor_PropertiesPanel.extent.x, Editor_PropertiesPanel.extent.y);
+      EWInspectorWindow.horizSizing = "width";
+      EWInspectorWindow.vertSizing = "height";
+      EWInspectorWindow.canClose = false;
+      EWInspectorWindow.canCollapse = false;
+      EWInspectorWindow.canMaximize = false;
+      EWInspectorWindow.canMinimize = false;
+      EWInspectorWindow.canMove = false;
+      EWInspectorWindow.resizeWidth = false;
+      EWInspectorWindow.resizeHeight = false;
+   }
+   else
+   {
+      EditorGui.remove(NewEditorGui);
+      
+      EditorGui.add(EWorldEditor);
+      
+      EditorGui.add(AssetBrowser);
+      AssetBrowserWindow.canClose = false;
+      AssetBrowserWindow.canCollapse = false;
+      AssetBrowserWindow.canMaximize = false;
+      AssetBrowserWindow.canMinimize = false;
+      AssetBrowserWindow.canMove = false;
+      
+      EditorGui.add(EWTreeWindow);
+      
+      EditorGui.add(EWInspectorWindow);
+   }
+}
+
+function Editor_AssetBrowserButton::onClick(%this)
+{
+   $AssetBrowserPanelState = !$AssetBrowserPanelState;
+   
+   //If we're collapsing
+   if(!$AssetBrowserPanelState)
+   {
+      //Store the original
+      $AssetBrowserPanelSplit = Editor_MainViewSplit.splitPoint.y;
+      
+      //collapse it
+      Editor_MainViewSplit.setSplitPoint(Editor_MainViewSplit.splitPoint.x SPC  Editor_MainViewSplit.extent.y - Editor_MainViewSplit.splitterSize);
+   }
+   else
+   {
+      //restore the original
+      Editor_MainViewSplit.setSplitPoint(Editor_MainViewSplit.splitPoint.x SPC $AssetBrowserPanelSplit);
+   }
+}
+
+function Editor_InspectorSidebarButton::onClick(%this)
+{
+   $InspectorPanelState = !$InspectorPanelState;
+   
+   //If we're collapsing
+   if(!$InspectorPanelState)
+   {
+      //Store the original
+      $InspectorPanelSplit = NewEditorGuiLayout.splitPoint.x;
+      
+      //collapse it
+      NewEditorGuiLayout.setSplitPoint(NewEditorGui.extent.x - NewEditorGuiLayout.splitterSize SPC NewEditorGuiLayout.splitPoint.y);
+   }
+   else
+   {
+      //restore the original
+      NewEditorGuiLayout.setSplitPoint($InspectorPanelSplit SPC NewEditorGuiLayout.splitPoint.y);
+   }
+}
+
+function Editor_ToolsSidebarButton::onClick(%this)
+{
+   $ToolsPanelState = !$ToolsPanelState;
+   
+   //If we're collapsing
+   if(!$ToolsPanelState)
+   {
+      //Store the original
+      $ToolsPanelSplit = Editor_ToolsMainSplit.splitPoint.x;
+      
+      //collapse it
+      Editor_ToolsMainSplit.setSplitPoint(Editor_ToolsMainSplit.splitterSize SPC Editor_ToolsMainSplit.splitPoint.y);
+   }
+   else
+   {
+      //restore the original
+      Editor_ToolsMainSplit.setSplitPoint($ToolsPanelSplit SPC Editor_ToolsMainSplit.splitPoint.y);
+   }
+}
+
+function Editor_VisibilityOptionsButton::onClick(%this)
+{
+   if ( EVisibility.visible  )
+   {
+      EVisibility.setVisible(false);
+      //visibilityToggleBtn.setStateOn(0);
+   }
+   else
+   {
+      EVisibility.setVisible(true);
+      //visibilityToggleBtn.setStateOn(1);
+      EVisibility.setExtent("200 540");
+   }  
+}

+ 9 - 0
Templates/Full/game/tools/MainEditor/MainEditor.module

@@ -0,0 +1,9 @@
+<ModuleDefinition
+	ModuleId="MainEditor"
+	VersionId="1"
+	Description="Tool that can be used to view/edit an object."
+	ScriptFile="MainEditor.cs"
+	CreateFunction="onCreate"
+	DestroyFunction="onDestroy"
+	Group="Tools">
+</ModuleDefinition>

BIN
Templates/Full/game/tools/MainEditor/art/Button.png


BIN
Templates/Full/game/tools/MainEditor/art/GroupBackground.png


BIN
Templates/Full/game/tools/MainEditor/art/GroupBackground_h.png


BIN
Templates/Full/game/tools/MainEditor/art/GroupBackground_i.png


BIN
Templates/Full/game/tools/MainEditor/art/PropertyRollout.png


BIN
Templates/Full/game/tools/MainEditor/art/ScrollBar.png


BIN
Templates/Full/game/tools/MainEditor/art/ScrollBar_.png


BIN
Templates/Full/game/tools/MainEditor/art/Spacer.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddEvent.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddEvent_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddEvent_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddGroup.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddGroup_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddGroup_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddL.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddL_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddL_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddR.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddR_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddR_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddSml.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddSml_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddSml_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddTrack.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddTrack_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_AddTrack_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Delete.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_DeleteSml.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_DeleteSml_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_DeleteSml_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Delete_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Delete_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Forward.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Forward_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Forward_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Palette_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Palette_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Palette_n.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Pause.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Pause_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Pause_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Play.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Play_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Play_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Rewind.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Rewind_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_Rewind_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepB.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepB_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepB_h.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepF.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepF_d.png


BIN
Templates/Full/game/tools/MainEditor/art/btn_StepF_h.png


+ 485 - 0
Templates/Full/game/tools/MainEditor/guis/MainEditorWindow.gui

@@ -0,0 +1,485 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiContainer(NewEditorGui) {
+   margin = "0 0 0 0";
+   padding = "0 0 0 0";
+   anchorTop = "1";
+   anchorBottom = "0";
+   anchorLeft = "1";
+   anchorRight = "0";
+   position = "0 0";
+   extent = "1920 1080";
+   minExtent = "8 8";
+   horizSizing = "right";
+   vertSizing = "bottom";
+   profile = "ToolsGuiDefaultProfile";
+   visible = "1";
+   active = "1";
+   tooltipProfile = "GuiToolTipProfile";
+   hovertime = "1000";
+   isContainer = "1";
+   canSave = "1";
+   canSaveDynamicFields = "1";
+      enabled = "1";
+
+   new GuiSplitContainer(NewEditorGuiLayout) {
+      orientation = "Vertical";
+      splitterSize = "2";
+      splitPoint = "1661 100";
+      fixedPanel = "None";
+      useMinExtent="0";
+      fixedSize = "260";
+      docking = "None";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "0 0";
+      extent = "1921 1081";
+      minExtent = "64 64";
+      horizSizing = "width";
+      vertSizing = "height";
+      profile = "GuiDefaultProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiPanel() {
+         docking = "Client";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "0 0";
+         extent = "1659 1081";
+         minExtent = "0 0";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         internalName = "Panel1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiSplitContainer(Editor_ToolsMainSplit) {
+            orientation = "Vertical";
+            splitterSize = "2";
+            splitPoint = "230 100";
+            fixedPanel = "None";
+            useMinExtent="0";
+            fixedSize = "1429";
+            docking = "None";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "1659 1081";
+            minExtent = "64 64";
+            horizSizing = "width";
+            vertSizing = "height";
+            profile = "GuiDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiPanel(Editor_ToolSidebarPanel) {
+               docking = "Client";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "228 1081";
+               minExtent = "0 0";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               internalName = "Panel1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiWindowCtrl(Editor_ToolsSidebarWindow) {
+                  text = "Tool Settings";
+                  resizeWidth = "0";
+                  resizeHeight = "0";
+                  canMove = "0";
+                  canClose = "0";
+                  canMinimize = "0";
+                  canMaximize = "0";
+                  canCollapse = "0";
+                  edgeSnap = "1";
+                  margin = "0 0 0 0";
+                  padding = "0 0 0 0";
+                  anchorTop = "1";
+                  anchorBottom = "0";
+                  anchorLeft = "1";
+                  anchorRight = "0";
+                  position = "0 0";
+                  extent = "228 1081";
+                  minExtent = "8 2";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiWindowProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+            new GuiPanel(Editor_MainWindowPanel) {
+               docking = "Client";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "232 0";
+               extent = "1427 1081";
+               minExtent = "0 0";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               internalName = "panel2";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiSplitContainer(Editor_MainViewSplit) {
+                  orientation = "Horizontal";
+                  splitterSize = "2";
+                  splitPoint = "182 745";
+                  fixedPanel = "None";
+                  useMinExtent="0";
+                  fixedSize = "273";
+                  docking = "None";
+                  margin = "0 0 0 0";
+                  padding = "0 0 0 0";
+                  anchorTop = "1";
+                  anchorBottom = "0";
+                  anchorLeft = "1";
+                  anchorRight = "0";
+                  position = "0 0";
+                  extent = "1427 1081";
+                  minExtent = "64 64";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+
+                  new GuiPanel(Editor_MainViewPanel) {
+                     docking = "Client";
+                     margin = "0 0 0 0";
+                     padding = "0 0 0 0";
+                     anchorTop = "1";
+                     anchorBottom = "0";
+                     anchorLeft = "1";
+                     anchorRight = "0";
+                     position = "0 0";
+                     extent = "1427 743";
+                     minExtent = "0 0";
+                     horizSizing = "right";
+                     vertSizing = "bottom";
+                     profile = "GuiDefaultProfile";
+                     visible = "1";
+                     active = "1";
+                     tooltipProfile = "GuiToolTipProfile";
+                     hovertime = "1000";
+                     isContainer = "1";
+                     internalName = "Panel1";
+                     canSave = "1";
+                     canSaveDynamicFields = "0";
+
+                     new GuiTabBookCtrl(Editor_MainViewTabBook) {
+                        tabPosition = "Top";
+                        tabMargin = "7";
+                        minTabWidth = "64";
+                        tabHeight = "20";
+                        allowReorder = "0";
+                        defaultPage = "-1";
+                        selectedPage = "-1";
+                        frontTabPadding = "0";
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 0";
+                        extent = "1427 743";
+                        minExtent = "8 2";
+                        horizSizing = "width";
+                        vertSizing = "height";
+                        profile = "ToolsGuiTabBookProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+                     };
+                     new GuiBitmapButtonCtrl(Editor_InspectorSidebarButton) {
+                        bitmap = "tools/gui/images/iconAdd.png";
+                        bitmapMode = "Stretched";
+                        autoFitExtents = "0";
+                        useModifiers = "0";
+                        useStates = "1";
+                        masked = "0";
+                        groupNum = "-1";
+                        buttonType = "PushButton";
+                        useMouseEvents = "0";
+                        position = "1411 61";
+                        extent = "15 15";
+                        minExtent = "8 2";
+                        horizSizing = "left";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "0";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+                     };
+                     new GuiBitmapButtonCtrl(Editor_ToolsSidebarButton) {
+                        bitmap = "tools/gui/images/iconAdd.png";
+                        bitmapMode = "Stretched";
+                        autoFitExtents = "0";
+                        useModifiers = "0";
+                        useStates = "1";
+                        masked = "0";
+                        groupNum = "-1";
+                        buttonType = "PushButton";
+                        useMouseEvents = "0";
+                        position = "0 61";
+                        extent = "15 15";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "0";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+                     };
+                     new GuiBitmapButtonCtrl(Editor_AssetBrowserButton) {
+                        bitmap = "tools/gui/images/iconAdd.png";
+                        bitmapMode = "Stretched";
+                        autoFitExtents = "0";
+                        useModifiers = "0";
+                        useStates = "1";
+                        masked = "0";
+                        groupNum = "-1";
+                        buttonType = "PushButton";
+                        useMouseEvents = "0";
+                        position = "1411 725";
+                        extent = "15 15";
+                        minExtent = "8 2";
+                        horizSizing = "left";
+                        vertSizing = "top";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "0";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+                     };
+                     new GuiBitmapButtonCtrl(Editor_VisibilityOptionsButton) {
+                        bitmap = "tools/gui/images/visible";
+                        bitmapMode = "Stretched";
+                        autoFitExtents = "0";
+                        useModifiers = "0";
+                        useStates = "1";
+                        masked = "0";
+                        groupNum = "-1";
+                        buttonType = "PushButton";
+                        useMouseEvents = "0";
+                        position = "16 30";
+                        extent = "18 18";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "0";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+                     };
+                  };
+                  new GuiPanel(Editor_AssetBrowserPanel) {
+                     docking = "Client";
+                     margin = "0 0 0 0";
+                     padding = "0 0 0 0";
+                     anchorTop = "1";
+                     anchorBottom = "0";
+                     anchorLeft = "1";
+                     anchorRight = "0";
+                     position = "0 747";
+                     extent = "1427 334";
+                     minExtent = "16 2";
+                     horizSizing = "right";
+                     vertSizing = "bottom";
+                     profile = "GuiDefaultProfile";
+                     visible = "1";
+                     active = "1";
+                     tooltipProfile = "GuiToolTipProfile";
+                     hovertime = "1000";
+                     isContainer = "1";
+                     internalName = "panel2";
+                     canSave = "1";
+                     canSaveDynamicFields = "0";
+                  };
+               };
+            };
+         };
+      };
+      new GuiPanel(Editor_InspectorPanel) {
+         docking = "Client";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "1663 0";
+         extent = "258 1081";
+         minExtent = "0 0";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         internalName = "panel2";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiSplitContainer() {
+            orientation = "Horizontal";
+            splitterSize = "2";
+            splitPoint = "182 556";
+            fixedPanel = "None";
+            useMinExtent="0";
+            fixedSize = "100";
+            docking = "None";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "258 1081";
+            minExtent = "64 64";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiPanel(Editor_SceneTreePanel) {
+               docking = "Client";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "258 554";
+               minExtent = "0 0";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               internalName = "Panel1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiPanel(Editor_PropertiesPanel) {
+               docking = "Client";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 558";
+               extent = "258 523";
+               minExtent = "0 0";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               internalName = "panel2";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+         };
+      };
+   };
+};
+//--- OBJECT WRITE END ---

+ 213 - 0
Templates/Full/game/tools/MainEditor/scripts/GuiProfiles.cs

@@ -0,0 +1,213 @@
+//-----------------------------------------------------------------------------
+// Verve
+// Copyright (C) - Violent Tulip
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile( VEditorDefaultProfile )
+{
+    opaque        = true;
+    fillColor     = "70 70 70";
+    fillColorHL   = "90 90 90";
+    fillColorNA   = "70 70 70";
+    
+    border        = 1;
+    borderColor   = "120 120 120";
+    borderColorHL = "100 100 100";
+    borderColorNA = "240 240 240";
+
+    fontType      = "Arial";
+    fontSize      = 12;
+    fontCharset   = ANSI;
+
+    fontColor     = "255 255 255";
+    fontColorHL   = "255 255 255";
+    fontColorNA   = "255 255 255";
+    fontColorSEL  = "255 255 255";
+};
+
+singleton GuiControlProfile( VEditorTestProfile )
+{
+    opaque        = true;
+    fillColor     = "255 255 0";
+    fillColorHL   = "255 255 0";
+    fillColorNA   = "255 255 0";
+};
+
+singleton GuiControlProfile( VEditorNoFillProfile : VEditorDefaultProfile )
+{
+    opaque = false;
+};
+
+singleton GuiControlProfile( VEditorNoBorderProfile : VEditorDefaultProfile )
+{
+    border = false;
+};
+
+singleton GuiControlProfile( VEditorTransparentProfile : VEditorDefaultProfile )
+{
+    opaque = false;
+    border = false;
+};
+
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile( VEditorTextProfile : VEditorDefaultProfile )
+{
+    border = false;
+    opaque = false;
+    
+    fontType = "Arial Bold";
+};
+
+singleton GuiControlProfile( VEditorTextEditProfile : VEditorDefaultProfile )
+{
+    fillColor      = "70 70 70";
+    fillColorHL    = "90 90 90";
+    fillColorSEL   = "0 0 0";
+    fillColorNA    = "70 70 70";
+    
+    fontColor      = "255 255 255";
+    fontColorHL    = "0 0 0";
+    fontColorSEL   = "128 128 128";
+    fontColorNA    = "128 128 128";
+    
+    textOffset     = "4 2";
+    autoSizeWidth  = false;
+    autoSizeHeight = false;
+    justify        = "left";
+    tab            = true;
+    canKeyFocus    = true;
+};
+
+singleton GuiControlProfile( VEditorPopupMenuProfile : GuiPopUpMenuProfile )
+{
+    FillColorHL    = "90 90 90";
+    FillColorSEL   = "0 0 0";
+    
+    FontColorHL    = "255 255 255";
+};
+
+singleton GuiControlProfile ( VEditorBitmapButtonProfile : VEditorDefaultProfile  )
+{
+    justify = "center";
+    
+    hasBitmapArray = true;
+    bitmap         = "./Images/Button";
+};
+
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile( VEditorGroupHeaderProfile : VEditorDefaultProfile )
+{
+    CanKeyFocus = true;
+    TextOffset  = "23 0";
+    
+    fontColor   = "70 70 70";
+};
+
+singleton GuiControlProfile( VEditorGroupHeaderErrorProfile : VEditorGroupHeaderProfile )
+{
+    fontColor = "255 70 70";
+};
+
+singleton GuiControlProfile( VEditorGroupTrackProfile : VEditorTransparentProfile )
+{
+    CanKeyFocus = true;
+};
+
+singleton GuiControlProfile( VEditorTrackProfile : VEditorDefaultProfile )
+{
+    CanKeyFocus = true;
+    TextOffset  = "33 0";
+    
+    opaque      = true;
+    fillColor   = "255 255 255 15";
+    fillColorHL = "151 166 191 60";
+    
+    borderColor = "100 100 100";
+};
+
+singleton GuiControlProfile( VEditorTrackErrorProfile : VEditorTrackProfile )
+{
+    fontColor = "255 70 70";
+};
+
+singleton GuiControlProfile( VEditorEventProfile : VEditorDefaultProfile )
+{
+    CanKeyFocus   = true;
+    Justify       = "left";
+    TextOffset    = "6 1";
+    
+    fillColor     = "81 81 81";
+    fillColorHL   = "102 102 102";
+    
+    borderColor   = "255 255 255";
+    borderColorHL = "255 255 255";
+    borderColorNA = "100 100 100";
+};
+
+singleton GuiControlProfile( VEditorTimeLineProfile : VEditorDefaultProfile )
+{
+    CanKeyFocus = true;
+    
+    opaque      = false;
+    fillColorHL = "255 255 255 15";
+    
+    border      = false;
+    borderColor = "100 100 100";
+};
+
+singleton GuiControlProfile( VEditorPropertyProfile : VEditorDefaultProfile )
+{
+    fillColor = "102 102 102";
+};
+
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile ( VEditorScrollProfile : VEditorDefaultProfile )
+{
+    opaque = false;
+    border = false;
+    
+    hasBitmapArray = true;
+    bitmap         = "./Images/ScrollBar";
+};
+
+singleton GuiControlProfile ( VEditorCheckBoxProfile : GuiCheckBoxProfile )
+{
+    // Void.
+};
+
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile( VEditorPropertyRolloutProfile : GuiRolloutProfile )
+{
+    border = 0;
+    hasBitmapArray = true;
+    bitmap = "./Images/PropertyRollout";
+
+    fontType      = "Arial";
+    fontSize      = 12;
+    fontCharset   = ANSI;
+
+    fontColor     = "255 255 255";
+    fontColorHL   = "255 255 255";
+    fontColorNA   = "255 255 255";
+    fontColorSEL  = "255 255 255";
+};
+
+singleton GuiControlProfile( VEditorPropertyLabelProfile : VEditorTextProfile )
+{
+    border  = "1";
+    justify = "center";
+};
+
+//-----------------------------------------------------------------------------
+
+singleton GuiControlProfile( VEditorPreferenceLabelProfile : GuiTextProfile )
+{
+    opaque      = true;
+    fillColor   = "242 241 240";
+    fillColorHL = "242 241 240";
+    fillColorNA = "242 241 240";
+};

+ 103 - 0
Templates/Full/game/tools/MainEditor/scripts/newEditorGui.cs

@@ -0,0 +1,103 @@
+function NewEditorGui::AddWindow(%this)
+{
+   %page = new GuiTabPageCtrl()
+   {
+      fitBook = "1";
+      text = "Object Viewer";
+      maxLength = "1024";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "0 0";
+      extent = "1024 768";
+      minExtent = "8 2";
+      horizSizing = "width";
+      vertSizing = "height";
+      profile = "GuiTabPageProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      canSave = "1";
+      canSaveDynamicFields = "1";
+   };
+   
+   %page.add(ObjectViewer);
+   
+   MainEditorBasePanel.add(%page);
+   
+   //Ensure the sidebar is spaced sanely
+   %pos = MainEditorBasePanel.extent.x * 0.8;
+   ObjectViewer-->splitContainer.splitPoint.x = MainEditorBasePanel.extent.x * 0.8;
+   
+}
+
+function AssetBrowserWindow::onMouseDragged(%this)
+{
+   %payload = new GuiBitmapButtonCtrl();
+   %payload.assignFieldsFrom( %this );
+   %payload.className = "AssetPreviewControl";
+   %payload.position = "0 0";
+   %payload.dragSourceControl = %this;
+   %payload.bitmap = %this.icon;
+   %payload.extent.x /= 2;
+   %payload.extent.y /= 2;
+   
+   %xOffset = getWord( %payload.extent, 0 ) / 2;
+   %yOffset = getWord( %payload.extent, 1 ) / 2;
+   
+   // Compute the initial position of the GuiDragAndDrop control on the cavas based on the current
+   // mouse cursor position.
+   
+   %cursorpos = Canvas.getCursorPos();
+   %xPos = getWord( %cursorpos, 0 ) - %xOffset;
+   %yPos = getWord( %cursorpos, 1 ) - %yOffset;
+   
+   if(!isObject(EditorDragAndDropLayer))
+   {
+      new GuiControl(EditorDragAndDropLayer)
+      {
+         position = "0 0";
+         extent = Canvas.extent;
+      };
+   }
+   
+   // Create the drag control.
+   %ctrl = new GuiDragAndDropControl()
+   {
+      canSaveDynamicFields    = "0";
+      Profile                 = "GuiSolidDefaultProfile";
+      HorizSizing             = "right";
+      VertSizing              = "bottom";
+      Position                = %xPos SPC %yPos;
+      extent                  = %payload.extent;
+      MinExtent               = "4 4";
+      canSave                 = "1";
+      Visible                 = "1";
+      hovertime               = "1000";
+
+      // Let the GuiDragAndDropControl delete itself on mouse-up.  When the drag is aborted,
+      // this not only deletes the drag control but also our payload.
+      deleteOnMouseUp         = true;
+      
+      useWholeCanvas = true;
+
+      // To differentiate drags, use the namespace hierarchy to classify them.
+      // This will allow a color swatch drag to tell itself apart from a file drag, for example.
+      class                   = "AssetPreviewControlType_AssetDrop";
+   };
+   
+   // Add the temporary color swatch to the drag control as the payload.
+   %ctrl.add( %payload );
+   
+   // Start drag by adding the drag control to the canvas and then calling startDragging().
+   //Canvas.getContent().add( %ctrl );
+   EditorDragAndDropLayer.add(%ctrl);
+   Canvas.pushDialog(EditorDragAndDropLayer);
+   
+   %ctrl.startDragging( %xOffset, %yOffset );
+}

+ 26 - 0
Templates/Full/game/tools/Tools.cs

@@ -0,0 +1,26 @@
+
+function ToolsModule::onCreate(%this)
+{
+   // ----------------------------------------------------------------------------
+   // Initialize core sub system functionality such as audio, the Canvas, PostFX,
+   // rendermanager, light managers, etc.
+   //
+   // Note that not all of these need to be initialized before the client, although
+   // the audio should and the canvas definitely needs to be.  I've put things here
+   // to distinguish between the purpose and functionality of the various client
+   // scripts.  Game specific script isn't needed until we reach the shell menus
+   // and start a game or connect to a server. We get the various subsystems ready
+   // to go, and then use initClient() to handle the rest of the startup sequence.
+   //
+   // If this is too convoluted we can reduce this complexity after futher testing
+   // to find exactly which subsystems should be readied before kicking things off. 
+   // ----------------------------------------------------------------------------
+   
+   ModuleDatabase.LoadExplicit( "MainEditor" );
+   ModuleDatabase.LoadExplicit( "Tools_ObjectViewer" );
+}
+
+function ToolsModule::onDestroy(%this)
+{
+
+}

+ 8 - 0
Templates/Full/game/tools/Tools.module

@@ -0,0 +1,8 @@
+<ModuleDefinition
+	ModuleId="ToolsModule"
+	VersionId="1"
+	Description="Module that implements the tools and editor suite."
+	ScriptFile="Tools.cs"
+	CreateFunction="onCreate"
+	DestroyFunction="onDestroy"
+	Group="Tools"/>

+ 7 - 0
Templates/Full/game/tools/main.cs

@@ -130,6 +130,13 @@ package Tools
       // resources can override, redefine, or add functionality.
       Tools::LoadResources( $Tools::resourcePath );
       
+      //Now, go through and load any tool-group modules
+      ModuleDatabase.setModuleExtension("module");
+      
+      //Any common tool modules
+      ModuleDatabase.scanModules( "tools", false );
+      ModuleDatabase.LoadGroup( "Tools" );
+      
       //$Scripts::ignoreDSOs = %toggle;
    }