void OnGUI() { GUILayout.Space(20); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("What is the problem related to", GUILayout.Width(200)); problemType = (PROBLEM_TYPE)EditorGUILayout.EnumPopup(problemType); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("How often does it happen", GUILayout.Width(200)); problemOccurrence = (PROBLEM_OCCURRENCE)EditorGUILayout.EnumPopup(problemOccurrence); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("your email adress", GUILayout.Width(200)); emailField = EditorGUILayout.TextArea(emailField, GUILayout.Width(200)); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.LabelField("Title"); titleField = EditorGUILayout.TextArea(titleField); EditorGUILayout.LabelField("Describe the problem"); descriptionField = EditorGUILayout.TextArea(descriptionField, GUILayout.Height(200)); EditorGUILayout.BeginHorizontal(); if (attachments != null && attachments.Count > 0) { if (attachments.Count == 1) { GUILayout.Label("Added " + attachments.Count + " attachment."); } else { GUILayout.Label("Added " + attachments.Count + " attachments."); } } GUILayout.FlexibleSpace(); if (GUILayout.Button("Cancel")) { this.Close(); } if (GUILayout.Button("Send")) { SendEmail(); } EditorGUILayout.EndHorizontal(); if (Event.current.type == EventType.KeyDown) { if (Event.current.keyCode == KeyCode.Escape) { this.Close(); } } }
public static void ResetToDefault() { descriptionField = defaultDescription; titleField = null; problemType = PROBLEM_TYPE.PleaseSpecify; problemOccurrence = PROBLEM_OCCURRENCE.PleaseSpecify; attachments.Clear(); }
public static void ResetToDefault() { descriptionField = defaultDescription; titleField = null; problemType = PROBLEM_TYPE.PleaseSpecify; problemOccurrence = PROBLEM_OCCURRENCE.PleaseSpecify; attachments.Clear(); }
void OnGUI() { GUILayout.Space(20); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("What is the problem related to", GUILayout.Width(200)); problemType = (PROBLEM_TYPE)EditorGUILayout.EnumPopup(problemType); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("How often does it happen", GUILayout.Width(200)); problemOccurrence = (PROBLEM_OCCURRENCE)EditorGUILayout.EnumPopup(problemOccurrence); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("your email adress", GUILayout.Width(200)); emailField = EditorGUILayout.TextArea(emailField, GUILayout.Width(200)); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.LabelField("Title"); titleField = EditorGUILayout.TextArea(titleField); EditorGUILayout.LabelField("Describe the problem"); descriptionField = EditorGUILayout.TextArea(descriptionField, GUILayout.Height(200)); EditorGUILayout.BeginHorizontal(); if(attachments != null && attachments.Count > 0) { if(attachments.Count == 1) { GUILayout.Label("Added "+attachments.Count+" attachment."); } else { GUILayout.Label("Added "+attachments.Count+" attachments."); } } GUILayout.FlexibleSpace(); if(GUILayout.Button("Cancel")) { this.Close(); } if(GUILayout.Button("Send")) { SendEmail(); } EditorGUILayout.EndHorizontal(); if (Event.current.type == EventType.KeyDown) { if (Event.current.keyCode == KeyCode.Escape) { this.Close(); } } }