Bläddra i källkod

Merge pull request #399 from Areloch/MiscEditorGUIFixups

Misc Editor and editor GUI fixups/improvements
Brian Roberts 4 år sedan
förälder
incheckning
72281880ee

+ 6 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs

@@ -111,6 +111,12 @@ function AssetBrowser::editGUIAsset(%this, %assetDef)
       exec(%assetDef.mScriptFilePath);
    }
    
+   if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
+         toggleEditor( true );
+         
+   if( !$InGuiEditor && !GuiEditorIsActive() )
+      GuiEditor.open();
+      
    GuiEditContent(%assetDef.assetName);  
 }
 

BIN
Templates/BaseGame/game/tools/gui/images/menubar/probe_d.png


BIN
Templates/BaseGame/game/tools/gui/images/menubar/probe_h.png


BIN
Templates/BaseGame/game/tools/gui/images/menubar/probe_n.png


BIN
Templates/BaseGame/game/tools/gui/images/menubar/settings_d.png


BIN
Templates/BaseGame/game/tools/gui/images/menubar/settings_h.png


BIN
Templates/BaseGame/game/tools/gui/images/menubar/settings_n.png


+ 2 - 2
Templates/BaseGame/game/tools/materialEditor/main.cs

@@ -42,7 +42,7 @@ function initializeMaterialEditor()
    //exec("./gui/profiles.ed.cs");
    
    MaterialEditorPreviewWindow.setVisible( false );
-   matEd_cubemapEditor.setVisible( false );
+   //matEd_cubemapEditor.setVisible( false );
    matEd_addCubemapWindow.setVisible( false );
    MaterialEditorPropertiesWindow.setVisible( false );
    
@@ -64,7 +64,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this )
    
    // Add ourselves to the ToolsToolbar
    %tooltip = "Material Editor (" @ %accel @ ")"; 
-   EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/matterial-editor"), %tooltip );
+   EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/material-editor"), %tooltip );
 
    //connect editor windows
    GuiWindowCtrl::attach( MaterialEditorPropertiesWindow, MaterialEditorPreviewWindow);

+ 1 - 1
Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui

@@ -1353,7 +1353,7 @@
                buttonType = "PushButton";
                useMouseEvents = "0";
                buttonMargin = "0 4";
-               iconBitmap = "tools/worldEditor/images/toolbar/matterial-editor_n";
+               iconBitmap = "tools/worldEditor/images/toolbar/material-editor_n";
                textMargin = "25";
             };
             new GuiCheckBoxCtrl() {

+ 0 - 69
Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerWindow.ed.gui

@@ -66,75 +66,6 @@
          TabMargin = "7";
          MinTabWidth = "8";
 
-         new GuiTabPageCtrl() {
-            canSaveDynamicFields = "0";
-            Profile = "ToolsGuiTabPageProfile";
-            HorizSizing = "width";
-            VertSizing = "height";
-            Docking = "Client";
-            Margin = "-1 0 0 0";
-            Position = "0 14";
-            Extent = "164 220";
-            MinExtent = "8 2";
-            canSave = "1";
-            Visible = "0";
-            hovertime = "1000";
-            text = "Visual";
-            maxLength = "255";
-            
-            new GuiScrollCtrl() {
-               canSaveDynamicFields = "0";
-               Enabled = "1";
-               isContainer = "1";
-               Profile = "ToolsGuiScrollProfile";
-               HorizSizing = "width";
-               VertSizing = "height";
-               Docking = "Client";
-               Position = "4 12";
-               Extent = "156 190";
-               MinExtent = "8 2";
-               canSave = "1";
-               isDecoy = "0";
-               Visible = "1";
-               tooltipprofile = "ToolsGuiToolTipProfile";
-               hovertime = "1000";
-               Margin = "0 0 0 0";
-               Padding = "0 0 0 0";
-               AnchorTop = "1";
-               AnchorBottom = "0";
-               AnchorLeft = "1";
-               AnchorRight = "0";
-               willFirstRespond = "1";
-               hScrollBar = "alwaysOff";
-               vScrollBar = "dynamic";
-               lockHorizScroll = "true";
-               lockVertScroll = "false";
-               constantThumbHeight = "0";
-               childMargin = "2 0";
-
-               new GuiStackControl() {
-                  StackingType = "Vertical";
-                  HorizStacking = "Left to Right";
-                  VertStacking = "Top to Bottom";
-                  Padding = "-2";
-                  canSaveDynamicFields = "0";
-                  internalName = "theVisOptionsList";
-                  Enabled = "1";
-                  isContainer = "1";
-                  Profile = "ToolsGuiDefaultProfile";
-                  HorizSizing = "width";
-                  VertSizing = "bottom";
-                  Position = "1 0";
-                  Extent = "156 16";
-                  MinExtent = "16 16";
-                  canSave = "1";
-                  isDecoy = "0";
-                  Visible = "1";
-                  tooltipprofile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-               };
-            };
-         };
          new GuiTabPageCtrl() {
             canSaveDynamicFields = "0";
             Profile = "ToolsGuiTabPageProfile";

+ 51 - 1
Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui

@@ -8,7 +8,7 @@
    HorizSizing = "right";
    VertSizing = "bottom";
    Position = "306 0";
-   Extent = "550" SPC getWord(EditorGuiToolbar.extent, 1);
+   Extent = "600" SPC getWord(EditorGuiToolbar.extent, 1);
    MinExtent = "8 2";
    canSave = "1";
    Visible = "1";
@@ -494,6 +494,56 @@
             useMouseEvents = "0";
          };
       };
+      
+      new GuiBitmapButtonCtrl() {
+         canSaveDynamicFields = "0";
+         internalName = "bakeProbesBtn";
+         Enabled = "1";
+         isContainer = "0";
+         Profile = "ToolsGuiButtonProfile";
+         HorizSizing = "right";
+         VertSizing = "bottom";
+         Position = "452 3";
+         Extent = "29 27";
+         MinExtent = "8 8";
+         canSave = "1";
+         Visible = "1";
+         Variable = "";
+         Command = "updateReflectionProbes();";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         ToolTip = "Update Reflection Probes";
+         hovertime = "1000";
+         bitmap = "tools/gui/images/menubar/probe";
+         text = "";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+      };
+      
+      new GuiBitmapButtonCtrl() {
+         canSaveDynamicFields = "0";
+         internalName = "editorSettingsBtn";
+         Enabled = "1";
+         isContainer = "0";
+         Profile = "ToolsGuiButtonProfile";
+         HorizSizing = "right";
+         VertSizing = "bottom";
+         Position = "484 3";
+         Extent = "29 27";
+         MinExtent = "8 8";
+         canSave = "1";
+         Visible = "1";
+         Variable = "";
+         Command = "ESettingsWindow.toggleEditorSettings();";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         ToolTip = "Open Editor Settings";
+         hovertime = "1000";
+         bitmap = "tools/gui/images/menubar/settings";
+         text = "";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+      };
 
       new GuiContainer(objectCenterDropdown){
          Profile = "IconDropdownProfile";

+ 0 - 0
Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_d.png → Templates/BaseGame/game/tools/worldEditor/images/toolbar/material-editor_d.png


+ 0 - 0
Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_h.png → Templates/BaseGame/game/tools/worldEditor/images/toolbar/material-editor_h.png


+ 0 - 0
Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_n.png → Templates/BaseGame/game/tools/worldEditor/images/toolbar/material-editor_n.png


+ 0 - 1
Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs

@@ -566,7 +566,6 @@ function EditorGui::onWake( %this )
    // before activating an editor plugin, so that if the plugin
    // installs an ActionMap, it will be highest on the stack.
    
-   MoveMap.push();
    EditorMap.push();
    
    // Active the current editor plugin.

+ 0 - 51
Templates/BaseGame/game/tools/worldEditor/scripts/visibility/visibilityLayer.ed.cs

@@ -276,57 +276,6 @@ function EVisibility::onWake( %this )
       %this.classArray = new ArrayObject();
       %this.addClassOptions();   
    }
-
-   %this.updateOptions();
-
-}
-
-function EVisibility::updateOptions( %this )
-{
-   // First clear the stack control.
-   %this-->theVisOptionsList.clear();   
-    
-   // Go through all the
-   // parameters in our array and
-   // create a check box for each.
-   for ( %i = 0; %i < %this.array.count(); %i++ )
-   {
-      %text = "  " @ %this.array.getValue( %i );
-      %val = %this.array.getKey( %i );
-      %var = getWord( %val, 0 );
-      %toggleFunction = getWord( %val, 1 );         
-      
-      %textLength = strlen( %text );
-      
-      %cmd = "";
-      if ( %toggleFunction !$= "" )
-         %cmd = %toggleFunction @ "( $thisControl.getValue() );";      
-      
-      %checkBox = new GuiCheckBoxCtrl()
-      {
-         canSaveDynamicFields = "0";
-         isContainer = "0";
-         Profile = "ToolsGuiCheckBoxListProfile";
-         HorizSizing = "right";
-         VertSizing = "bottom";
-         Position = "0 0";
-         Extent = (%textLength * 4) @ " 18";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         Variable = %var;
-         tooltipprofile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         text = %text;
-         groupNum = "-1";
-         buttonType = "ToggleButton";
-         useMouseEvents = "0";
-         useInactiveState = "0";
-         Command = %cmd;
-      };
-
-      %this-->theVisOptionsList.addGuiControl( %checkBox );
-   }   
 }
 
 function EVisibility::addOption( %this, %text, %varName, %toggleFunction )