Ejemplo n.º 1
0
        private void Reset()
        {
            string newLine = Environment.get_NewLine();

            this.area           = BugReportWindow.ScoutArea.Editor;
            this.frequencyIndex = 0;
            this.description    = "";
            this.extra          = string.Concat(new string[]
            {
                Strings.get_BugReportWindow_What_happened(),
                newLine,
                newLine,
                newLine,
                newLine,
                Strings.get_BugReportWindow_How_can_we_reproduce_it(),
                newLine,
                newLine
            });
            this.email = EditorPrefs.GetString(EditorPrefStrings.get_UserEmail(), "");
            base.Repaint();
        }
Ejemplo n.º 2
0
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     SkillEditorGUILayout.ToolWindowLargeTitle(this, Strings.get_BugReportWindow_Title());
     SkillEditorGUILayout.LabelWidth(200f);
     this.controlsScrollPosition = EditorGUILayout.BeginScrollView(this.controlsScrollPosition, new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_BugReportWindow_Bug_Title_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     this.description = EditorGUILayout.TextField(this.description, new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_BugReportWindow_Bug_Description_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     this.extra = EditorGUILayout.TextArea(this.extra, SkillEditorStyles.TextAreaWithWordWrap, new GUILayoutOption[]
     {
         GUILayout.ExpandHeight(true)
     });
     this.area           = (BugReportWindow.ScoutArea)EditorGUILayout.EnumPopup(Strings.get_BugReportWindow_Where_does_it_happen(), this.area, new GUILayoutOption[0]);
     this.frequencyIndex = EditorGUILayout.Popup(Strings.get_BugReportWindow_How_often_does_it_happen(), this.frequencyIndex, BugReportWindow.frequencyChoices, new GUILayoutOption[0]);
     this.email          = EditorGUILayout.TextField(new GUIContent(Strings.get_BugReportWindow_Your_E_mail(), Strings.get_BugReportWindow_Your_E_mail_Tooltip()), this.email, new GUILayoutOption[0]);
     EditorGUILayout.EndScrollView();
     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.Label("PlayMaker: " + VersionInfo.AssemblyVersion, new GUILayoutOption[0]);
     GUILayout.Label("Unity: " + Application.get_unityVersion(), new GUILayoutOption[0]);
     GUILayout.Label("Build Target: " + EditorUserBuildSettings.get_activeBuildTarget(), new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     if (GUILayout.Button(Strings.get_BugReportWindow_Submit_Button(), new GUILayoutOption[0]))
     {
         if (!this.isValid)
         {
             EditorUtility.DisplayDialog(Strings.get_BugReportWindow_Title(), this.errorString, Strings.get_OK());
         }
         else
         {
             this.SubmitBugReportByMail();
         }
         GUIUtility.ExitGUI();
         return;
     }
     if (GUILayout.Button(new GUIContent(Strings.get_Command_Copy(), Strings.get_BugReportWindow_Copy_Tooltip()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         this.CopyReportToClipboard();
     }
     if (GUILayout.Button(new GUIContent(Strings.get_Command_Reset()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         GUIUtility.set_keyboardControl(0);
         this.Reset();
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(10f);
     if (GUI.get_changed())
     {
         this.UpdateGUI();
         GUIUtility.ExitGUI();
     }
 }