예제 #1
0
        public static FeedbackWindow ShowFeedbackWindow()
        {
            FeedbackWindow window = EditorWindow.GetWindow <FeedbackWindow>();

            window.Show();
            window.minSize = new Vector2(100, 50);
            return(window);
        }
예제 #2
0
        private void OnGUI()
        {
            if (wordwrapStyle == null)
            {
                wordwrapStyle          = new GUIStyle(GUI.skin.label);
                wordwrapStyle.wordWrap = true;
            }

            if (Event.current.IsKeyDown(KeyCode.W) && Event.current.modifiers == EventModifiers.Control)
            {
                Close();
                Event.current.UseEvent();
            }
            float pictureSize = 128;

            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

            GUI.skin.label.fontSize = 20;
            try
            {
            }
            catch (ArgumentException)
            {
                EditorGUILayout.BeginHorizontal();

                EditorGUILayout.LabelField("InAudio Introduction", GUI.skin.label, GUILayout.Height(30), GUILayout.Width(250));
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();
            }
            GUI.skin.label.fontSize = 11;

            //*********************************************************************//
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical(GUILayout.Width(pictureSize + 3));
            if (GUILayout.Button(EditorResources.Book, GUILayout.Width(pictureSize), GUILayout.Height(pictureSize)))
            {
                Application.OpenURL("http://innersystems.net/wiki/");
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginVertical();
            EditorGUILayout.LabelField("Documentation", EditorStyles.boldLabel);
            EditorGUILayout.LabelField("If you are looking to getting started or need more details, the documentation is for you.", wordwrapStyle);
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
            //*********************************************************************//
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical(GUILayout.Width(pictureSize + 3));
            if (GUILayout.Button(EditorResources.Question, GUILayout.Width(pictureSize), GUILayout.Height(pictureSize)))
            {
                Application.OpenURL("http://forum.unity3d.com/threads/inaudio-2-new-open-source.232490/");
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginVertical();
            EditorGUILayout.LabelField("Forum", EditorStyles.boldLabel);
            EditorGUILayout.LabelField("Do you have a general question? Check out the Unity forum and ask your question or see if it is already answered.", wordwrapStyle);
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
            //*********************************************************************//
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical(GUILayout.Width(pictureSize + 3));
            if (GUILayout.Button(EditorResources.Support, GUILayout.Width(pictureSize), GUILayout.Height(pictureSize)))
            {
                FeedbackWindow window = EditorWindow.GetWindow <FeedbackWindow>();

                window.Show();
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginVertical();


            EditorGUILayout.LabelField("Direct Support", EditorStyles.boldLabel);
            GUI.skin.label.wordWrap = true;
            EditorGUILayout.LabelField("Do you have a question, bug report or feedback you want to say directly to the developer? Please do! Your feedback is always welcome.\nYou can send it directly from Unity or send an email to [email protected]", wordwrapStyle);


            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
            //*********************************************************************//

            //GUILayout.Label(EditorResources.Support, GUIStyle.none);
            //GUILayout.Label(EditorResources.Question, GUIStyle.none);

            EditorGUILayout.EndScrollView();
            GUILayout.FlexibleSpace();
            EditorGUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            try
            {
                if (!PlayerPrefs.HasKey("InAudioIntro"))
                {
                    PlayerPrefs.SetInt("InAudioIntro", 1);
                }
                int  toggle = PlayerPrefs.GetInt("InAudioIntro");
                bool t      = GUILayout.Toggle(Convert.ToBoolean(toggle), "Show on startup");
                PlayerPrefs.SetInt("InAudioIntro", Convert.ToInt32(t));
            }
            catch (Exception)
            { }
            EditorGUILayout.EndHorizontal();
        }