Beispiel #1
0
        // Token: 0x0600014E RID: 334 RVA: 0x0000A6FC File Offset: 0x000088FC
        public static void Box(Rect position, GUIContent content, bool selected)
        {
            Color color = GUI.color;

            GUI.color = GUIColors.TextColor(selected);
            GUI.Box(position, content, EditorStyles.whiteLabel);
            GUI.color = color;
        }
Beispiel #2
0
 // Token: 0x06000177 RID: 375 RVA: 0x0000B250 File Offset: 0x00009450
 private void OnGUI()
 {
     try
     {
         GUI.matrix = Matrix4x4.identity;
         if (this._waitforlayout && (int)Event.current.type != 8)
         {
             base.Repaint();
         }
         else
         {
             this._waitforlayout = false;
             if (this._initphase == 1)
             {
                 if (!this.__OnCheckCompatibility())
                 {
                     base.Close();
                 }
                 else
                 {
                     this.__OnCreate();
                     this.__OnResize();
                     this._initphase     = 2;
                     this._waitforlayout = true;
                     base.Repaint();
                 }
             }
             else
             {
                 if (this._initphase == 3)
                 {
                     this._initphase = 4;
                     this.__OnInit();
                     EditorApplication.playModeStateChanged += this.OnPlayModeStateChanged;
                 }
                 if (this._enabled)
                 {
                     if ((int)Event.current.type == 8 && (this._TriggerResize || Mathf.Abs(base.position.width - this._lastposition.width) > 1f || Mathf.Abs(base.position.height - this._lastposition.height) > 1f))
                     {
                         this.__OnResize();
                         base.Repaint();
                         this._lastposition  = base.position;
                         this._TriggerResize = false;
                     }
                     GUIColors.Update();
                     this.__OnGUI();
                     if (this._initphase > 3)
                     {
                         this.DoHandleCommands();
                     }
                 }
                 if (this._initphase == 2 && (int)Event.current.type == 7)
                 {
                     this._initphase     = 3;
                     this._waitforlayout = true;
                     base.Repaint();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         if (!this.IsCriticalException(ex))
         {
             throw ex;
         }
         Debug.LogException(ex);
         string text  = "Unity 2018.2";
         string text2 = base.titleContent.text;
         if (!EditorUtility.DisplayDialog("ka-booom!!!", string.Format("An unhandled error occurred in {0}.\n\nPlease include a screenshot of this message and a description how to reproduce the error if you send a bug-report to the {0} developer (see Unity AssetStore for contact details).\n\n{1}\n\nUnity={2}, Platform={3}, BuildTarget={4}, PluginCreatedWith={5}", new object[]
         {
             text2,
             ex,
             Application.unityVersion,
             Application.platform,
             EditorUserBuildSettings.activeBuildTarget,
             text
         }), "Ignore", string.Format("Close {0}", text2)))
         {
             base.Close();
         }
     }
 }