Ejemplo n.º 1
0
 private void DoToolbar()
 {
     using (new EditorGUI.DisabledScope(this.m_BoundingBoxMode.intValue != 2))
     {
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.FlexibleSpace();
         EditMode.SceneViewEditMode editMode = EditMode.editMode;
         EditorGUI.BeginChangeCheck();
         EditMode.DoInspectorToolbar(LightProbeProxyVolumeEditor.Styles.sceneViewEditModes, LightProbeProxyVolumeEditor.Styles.toolContents, this.GetGlobalBounds(), this);
         if (EditorGUI.EndChangeCheck())
         {
             LightProbeProxyVolumeEditor.s_LastInteractedEditor = this;
         }
         if (editMode != EditMode.editMode && Toolbar.get != null)
         {
             Toolbar.get.Repaint();
         }
         GUILayout.FlexibleSpace();
         GUILayout.EndHorizontal();
         GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]);
         string text = LightProbeProxyVolumeEditor.Styles.baseSceneEditingToolText;
         if (this.sceneViewEditing)
         {
             int num = ArrayUtility.IndexOf <EditMode.SceneViewEditMode>(LightProbeProxyVolumeEditor.Styles.sceneViewEditModes, EditMode.editMode);
             if (num >= 0)
             {
                 text = LightProbeProxyVolumeEditor.Styles.toolNames[num].text;
             }
         }
         GUILayout.Label(text, LightProbeProxyVolumeEditor.Styles.richTextMiniLabel, new GUILayoutOption[0]);
         GUILayout.EndVertical();
         EditorGUILayout.Space();
     }
 }
 private void DoToolbar()
 {
     using (new EditorGUI.DisabledScope(this.m_BoundingBoxMode.intValue != 2))
     {
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.FlexibleSpace();
         UnityEditorInternal.EditMode.SceneViewEditMode editMode = UnityEditorInternal.EditMode.editMode;
         EditorGUI.BeginChangeCheck();
         UnityEditorInternal.EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, this.GetGlobalBounds(), this);
         if (EditorGUI.EndChangeCheck())
         {
             s_LastInteractedEditor = this;
         }
         if ((editMode != UnityEditorInternal.EditMode.editMode) && (Toolbar.get != null))
         {
             Toolbar.get.Repaint();
         }
         GUILayout.FlexibleSpace();
         GUILayout.EndHorizontal();
         GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]);
         string baseSceneEditingToolText = Styles.baseSceneEditingToolText;
         if (this.sceneViewEditing)
         {
             int index = ArrayUtility.IndexOf <UnityEditorInternal.EditMode.SceneViewEditMode>(Styles.sceneViewEditModes, UnityEditorInternal.EditMode.editMode);
             if (index >= 0)
             {
                 baseSceneEditingToolText = Styles.toolNames[index].text;
             }
         }
         GUILayout.Label(baseSceneEditingToolText, Styles.richTextMiniLabel, new GUILayoutOption[0]);
         GUILayout.EndVertical();
         EditorGUILayout.Space();
     }
 }
 private void DoToolbar()
 {
     using (new EditorGUI.DisabledScope(this.m_BoundingBoxMode.intValue != 2))
     {
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.FlexibleSpace();
         EditMode.SceneViewEditMode editMode = EditMode.editMode;
         EditorGUI.BeginChangeCheck();
         EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, this.GetGlobalBounds(), this);
         if (EditorGUI.EndChangeCheck())
         {
             s_LastInteractedEditor = this;
         }
         if ((editMode != EditMode.editMode) && (Toolbar.get != null))
         {
             Toolbar.get.Repaint();
         }
         GUILayout.FlexibleSpace();
         GUILayout.EndHorizontal();
         GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]);
         string baseSceneEditingToolText = Styles.baseSceneEditingToolText;
         if (this.sceneViewEditing)
         {
             int index = ArrayUtility.IndexOf<EditMode.SceneViewEditMode>(Styles.sceneViewEditModes, EditMode.editMode);
             if (index >= 0)
             {
                 baseSceneEditingToolText = Styles.toolNames[index].text;
             }
         }
         GUILayout.Label(baseSceneEditingToolText, Styles.richTextMiniLabel, new GUILayoutOption[0]);
         GUILayout.EndVertical();
         EditorGUILayout.Space();
     }
 }
        void DoToolbar()
        {
            using (new EditorGUI.DisabledScope(m_BoundingBoxMode.intValue != (int)LightProbeProxyVolume.BoundingBoxMode.Custom))
            {
                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                var oldEditMode = EditMode.editMode;

                EditorGUI.BeginChangeCheck();
                EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, this);
                if (EditorGUI.EndChangeCheck())
                {
                    s_LastInteractedEditor = this;
                }

                if (oldEditMode != EditMode.editMode)
                {
                    if (Toolbar.get != null)
                    {
                        Toolbar.get.Repaint();
                    }
                }

                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();

                // Info box for tools
                GUILayout.BeginVertical(EditorStyles.helpBox);
                string helpText = Styles.baseSceneEditingToolText;
                if (sceneViewEditing)
                {
                    int index = ArrayUtility.IndexOf(Styles.sceneViewEditModes, EditMode.editMode);
                    if (index >= 0)
                    {
                        helpText = Styles.toolNames[index].text;
                    }
                }
                GUILayout.Label(helpText, Styles.richTextMiniLabel);
                GUILayout.EndVertical();
                EditorGUILayout.Space();
            }
        }