public override void OnGUI(Rect rect)
 {
   if ((Object) this.m_Editor == (Object) null)
   {
     this.editorWindow.Close();
   }
   else
   {
     if (this.s_Styles == null)
       this.s_Styles = new ObjectPreviewPopup.Styles();
     GUILayout.BeginArea(new Rect(rect.x, rect.y, rect.width, 17f), this.s_Styles.toolbar);
     EditorGUILayout.BeginHorizontal();
     GUILayout.FlexibleSpace();
     this.m_Editor.OnPreviewSettings();
     EditorGUILayout.EndHorizontal();
     GUILayout.EndArea();
     GUI.Label(new Rect(rect.x + 5f, rect.y, rect.width - 140f, 17f), this.m_ObjectName, this.s_Styles.toolbarText);
     this.m_Editor.OnPreviewGUI(new Rect(rect.x, rect.y + 17f, rect.width, rect.height - 17f), this.s_Styles.background);
   }
 }
Ejemplo n.º 2
0
        public override void OnGUI(Rect rect)
        {
            if (this.m_Editor == null)
            {
                base.editorWindow.Close();
                return;
            }
            if (this.s_Styles == null)
            {
                this.s_Styles = new ObjectPreviewPopup.Styles();
            }
            GUILayout.BeginArea(new Rect(rect.x, rect.y, rect.width, 17f), this.s_Styles.toolbar);
            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.FlexibleSpace();
            this.m_Editor.OnPreviewSettings();
            EditorGUILayout.EndHorizontal();
            GUILayout.EndArea();
            GUI.Label(new Rect(rect.x + 5f, rect.y, rect.width - 140f, 17f), this.m_ObjectName, this.s_Styles.toolbarText);
            Rect r = new Rect(rect.x, rect.y + 17f, rect.width, rect.height - 17f);

            this.m_Editor.OnPreviewGUI(r, this.s_Styles.background);
        }