private void DrawSetupGUI()
        {
            Rect position = new Rect(0f, 30f, this._headerSize.x, this._headerSize.y);

            GUI.DrawTexture(position, this._headerImg, ScaleMode.StretchToFill, false);
            GUILayout.Space((position.y + this._headerSize.y) + 2f);
            GUILayout.Label(this._innerTitle, DOTween.isDebugBuild ? EditorGUIUtils.redLabelStyle : EditorGUIUtils.boldLabelStyle, new GUILayoutOption[0]);
            if (this._setupRequired)
            {
                GUI.backgroundColor = Color.red;
                GUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
                GUILayout.Label("DOTWEEN SETUP REQUIRED", EditorGUIUtils.setupLabelStyle, new GUILayoutOption[0]);
                GUILayout.EndVertical();
                GUI.backgroundColor = Color.white;
            }
            else
            {
                GUILayout.Space(8f);
            }
            if (GUILayout.Button("Setup DOTween...", EditorGUIUtils.btStyle, new GUILayoutOption[0]))
            {
                DOTweenSetupMenuItem.Setup(false);
                this._setupRequired = EditorUtils.DOTweenSetupRequired();
            }
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(_HalfBtSize) };
            if (GUILayout.Button("Documentation", EditorGUIUtils.btStyle, options))
            {
                Application.OpenURL("http://dotween.demigiant.com/documentation.php");
            }
            GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.Width(_HalfBtSize) };
            if (GUILayout.Button("Support", EditorGUIUtils.btStyle, optionArray2))
            {
                Application.OpenURL("http://dotween.demigiant.com/support.php");
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayoutOption[] optionArray3 = new GUILayoutOption[] { GUILayout.Width(_HalfBtSize) };
            if (GUILayout.Button("Changelog", EditorGUIUtils.btStyle, optionArray3))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php");
            }
            GUILayoutOption[] optionArray4 = new GUILayoutOption[] { GUILayout.Width(_HalfBtSize) };
            if (GUILayout.Button("Check Updates", EditorGUIUtils.btStyle, optionArray4))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php?v=" + DOTween.Version);
            }
            GUILayout.EndHorizontal();
            GUILayout.Space(14f);
            if (GUILayout.Button(this._footerImg, EditorGUIUtils.btImgStyle, new GUILayoutOption[0]))
            {
                Application.OpenURL("http://www.demigiant.com/");
            }
        }
Exemple #2
0
        void OnGUI()
        {
            SetGUIStyles();

            Rect headerRect = new Rect(0, 0, _headerSize.x, _headerSize.y);

            GUI.DrawTexture(headerRect, _headerImg, ScaleMode.StretchToFill, false);
            GUILayout.Space(_headerSize.y + 2);
            GUILayout.Label(_innerTitle, DOTween.isDebugBuild ? _redLabelStyle : _boldLabelStyle);

            if (_setupRequired)
            {
                GUI.backgroundColor = Color.red;
                GUILayout.BeginVertical(GUI.skin.box);
                GUILayout.Label("DOTWEEN SETUP REQUIRED", _setupLabelStyle);
                GUILayout.EndVertical();
                GUI.backgroundColor = Color.white;
            }
            else
            {
                GUILayout.Space(8);
            }
            if (GUILayout.Button("Setup DOTween...", _btStyle))
            {
                DOTweenSetupMenuItem.Setup();
                _setupRequired = EditorUtils.DOTweenSetupRequired();
            }

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Documentation", _btStyle, GUILayout.Width(_HalfBtSize)))
            {
                Application.OpenURL("http://dotween.demigiant.com/documentation.php");
            }
            if (GUILayout.Button("Support", _btStyle, GUILayout.Width(_HalfBtSize)))
            {
                Application.OpenURL("http://dotween.demigiant.com/support.php");
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Changelog", _btStyle, GUILayout.Width(_HalfBtSize)))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php");
            }
            if (GUILayout.Button("Check Updates", _btStyle, GUILayout.Width(_HalfBtSize)))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php?v=" + DOTween.Version);
            }
            GUILayout.EndHorizontal();
            GUILayout.Space(14);
            if (GUILayout.Button(_footerImg, _btImgStyle))
            {
                Application.OpenURL("http://www.demigiant.com/");
            }
        }
 public static void SetupWindow()
 {
     DOTweenSetupMenuItem.Setup(false);
 }