public static void RefreshList(System.Type type) { if (IsType(typeof(EntityType), type)) { m_entityList = null; } else if (IsType(typeof(Faction), type)) { m_factionList = null; } else if (IsType(typeof(Drive), type)) { m_driveList = null; } else if (IsType(typeof(UrgencyFunction), type)) { m_urgencyList = null; } else if (IsType(typeof(PixelCrushers.QuestMachine.Action), type)) { m_actionList = null; } else if (IsType(typeof(DomainType), type)) { m_domainList = null; } else { return; } QuestGeneratorEditorWindow.RepaintNow(); }
private void OnEnable() { m_instance = this; titleContent.text = "Quest Generator"; if (m_windowGUI == null) { m_windowGUI = new QuestGeneratorEditorWindowGUI(); } Undo.undoRedoPerformed += Repaint; }
private void DrawButtons() { GUILayout.BeginArea(new Rect(5, 56, position.width - 10, position.height - 56)); try { EditorGUILayout.HelpBox("Welcome to Quest Machine!\n\nThe buttons below are shortcuts to common functions.", MessageType.None); GUILayout.Label("Help", EditorStyles.boldLabel); GUILayout.BeginHorizontal(); try { if (GUILayout.Button(new GUIContent("\nManual\n", "Open the Quest Machine manual."), GUILayout.Width(ButtonWidth))) { Application.OpenURL("file://" + Application.dataPath + "/Plugins/Pixel Crushers/Quest Machine/Documentation/Quest_Machine_Manual.pdf"); } if (GUILayout.Button(new GUIContent("\nVideos\n", "Open the video tutorial list."), GUILayout.Width(ButtonWidth))) { Application.OpenURL("http://www.pixelcrushers.com/quest-machine-video-tutorials/"); } if (GUILayout.Button(new GUIContent("Scripting\nReference\n", "Open the scripting & API reference."), GUILayout.Width(ButtonWidth))) { Application.OpenURL("http://pixelcrushers.com/quest_machine/api/html"); } if (GUILayout.Button(new GUIContent("\nForum\n", "Go to the Pixel Crushers forum."), GUILayout.Width(ButtonWidth))) { Application.OpenURL("http://www.pixelcrushers.com/phpbb"); } } finally { GUILayout.EndHorizontal(); } GUILayout.Label("Editors", EditorStyles.boldLabel); GUILayout.BeginHorizontal(); try { if (GUILayout.Button(new GUIContent("Quest\nEditor\n", "Open the Quest Editor."), GUILayout.Width(ButtonWidth))) { QuestEditorWindow.ShowWindow(); } if (GUILayout.Button(new GUIContent("Quest\nGenerator\n", "Open the Quest Generator Editor."), GUILayout.Width(ButtonWidth))) { QuestGeneratorEditorWindow.ShowWindow(); } if (GUILayout.Button(new GUIContent("Quest\nReference\n", "Open the Quest Reference utility window."), GUILayout.Width(ButtonWidth))) { QuestReferenceEditorWindow.ShowWindow(); } if (GUILayout.Button(new GUIContent("Text\nTable\nEditor", "Open the Text Table editor."), GUILayout.Width(ButtonWidth))) { TextTableEditorWindow.ShowWindow(); } } finally { GUILayout.EndHorizontal(); } } finally { GUILayout.EndArea(); } }
private void OnDisable() { m_instance = null; Undo.undoRedoPerformed -= Repaint; }