public static void VariablesPopup(GameObject go, string fsmName, UIHint hint, SkillString variable)
 {
     if (SkillEditorGUILayout.BrowseButton(go != null, Strings.get_Tooltip_Browse_variables_in_FSM()))
     {
         StringEditor.editingVariable = variable;
         StringEditor.DoVariablesMenu(go, fsmName, hint);
     }
 }
 public static void AnimationNamePopup(GameObject go, SkillString variable, object obj = null, FieldInfo field = null)
 {
     if (SkillEditorGUILayout.BrowseButton(go != null, Strings.get_Tooltip_Browse_Animations_on_GameObject()))
     {
         StringEditor.editingVariable = variable;
         StringEditor.editingObject   = obj;
         StringEditor.editingField    = field;
         StringEditor.DoAnimationNameMenu(go);
     }
 }
 private static void DoAnimatorParameterPopup(GameObject go, AnimatorControllerParameterType parameterType, SkillString variable, object obj = null, FieldInfo field = null)
 {
     if (SkillEditorGUILayout.BrowseButton(go != null, string.Format(Strings.get_Tooltip_Browse_Animator_Parameters(), parameterType)))
     {
         StringEditor.editingVariable = variable;
         StringEditor.editingObject   = obj;
         StringEditor.editingField    = field;
         StringEditor.DoAnimatorParameterMenu(go, parameterType);
     }
 }
 public static void SortingLayerNameBrowseButton(SkillString variable, object obj = null, FieldInfo field = null)
 {
     if (SkillEditorGUILayout.BrowseButton(true, Strings.get_Label_Sorting_Layers()))
     {
         StringEditor.editingVariable = variable;
         StringEditor.editingObject   = obj;
         StringEditor.editingField    = field;
         StringEditor.DoSortingLayerMenu();
     }
 }
 public static void LayerNamePopup(GUIContent label, SkillString variable, object obj = null, FieldInfo field = null)
 {
     SkillEditorGUILayout.PrefixLabel(label);
     if (GUILayout.Button(variable.get_Value(), EditorStyles.get_popup(), new GUILayoutOption[0]))
     {
         StringEditor.editingVariable = variable;
         StringEditor.editingObject   = obj;
         StringEditor.editingField    = field;
         StringEditor.DoLayerMenu();
     }
 }
示例#6
0
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     SkillEditorGUILayout.ToolWindowLargeTitle(this, "Doc Helpers");
     if (SkillEditor.Instance == null)
     {
         GUILayout.Label("Please open the PlayMaker Editor...", new GUILayoutOption[0]);
         return;
     }
     if (!this.capturingGUI)
     {
         EditorGUILayout.HelpBox("This tool generates the screenshots and html required to document actions in the online wiki.", 1);
         GUILayout.Label("Source", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
         this.selectedCategory = EditorGUILayout.Popup("Action Category", this.selectedCategory, this.categoryChoices, new GUILayoutOption[0]);
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         GUILayout.Label("Export Settings", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
         this.screenshotsSavePath = EditorGUILayout.TextField("Save Screenshots", this.screenshotsSavePath, new GUILayoutOption[0]);
         this.htmlSavePath        = EditorGUILayout.TextField("Save Html", this.htmlSavePath, new GUILayoutOption[0]);
         this.imagesUrl           = EditorGUILayout.TextField("Images Url", this.imagesUrl, new GUILayoutOption[0]);
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         if (GUILayout.Button("Capture Screenshots", new GUILayoutOption[]
         {
             GUILayout.MinHeight(30f)
         }))
         {
             this.StartCaptureActionScreenshots();
         }
         if (GUILayout.Button("Generate Wiki Html", new GUILayoutOption[]
         {
             GUILayout.MinHeight(30f)
         }))
         {
             this.GenerateActionWikiHtml();
             this.GenerateActionsEnum();
         }
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         if (GUI.get_changed())
         {
             this.SavePreferences();
         }
         GUILayout.FlexibleSpace();
         GUILayout.Label("Resize window height to fit largest action screenshot...", new GUILayoutOption[0]);
     }
     else
     {
         ActionEditor.PreviewMode = true;
         if (this.previewAction != null)
         {
             SkillEditorGUILayout.LabelWidth(150f);
             EditorGUILayout.Space();
             EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
             SkillEditor.ActionEditor.OnGUI(this.previewAction);
             EditorGUILayout.EndVertical();
             if (Event.get_current().get_type() == 7)
             {
                 this.SaveActionScreenshot();
                 this.NextActionScreenshot();
             }
             GUILayout.FlexibleSpace();
             if (this.capturingGUI)
             {
                 EditorUtility.DisplayProgressBar("Saving Action Screenshots...", "Press Escape to cancel", (float)this.actionIndex / (float)Actions.List.get_Count());
             }
         }
     }
     ActionEditor.PreviewMode = false;
 }