private void DrawExtraFeatures()
 {
     if (icon == null)
     {
         icon = FindIcon();
     }
     if (dialogueSystemController == null || icon == null)
     {
         return;
     }
     if (iconButtonStyle == null)
     {
         iconButtonStyle = new GUIStyle(EditorStyles.label);
         iconButtonStyle.normal.background = icon;
         iconButtonStyle.active.background = icon;
     }
     if (iconButtonContent == null)
     {
         iconButtonContent = new GUIContent(string.Empty, "Click to open Dialogue Editor.");
     }
     GUILayout.BeginHorizontal();
     if (GUILayout.Button(iconButtonContent, iconButtonStyle, GUILayout.Width(icon.width), GUILayout.Height(icon.height)))
     {
         Selection.activeObject = dialogueSystemController.initialDatabase;
         PixelCrushers.DialogueSystem.DialogueEditor.DialogueEditorWindow.OpenDialogueEditorWindow();
     }
     GUILayout.FlexibleSpace();
     if (GUILayout.Button("Wizard...", GUILayout.Width(64)))
     {
         DialogueManagerWizard.Init();
     }
     GUILayout.EndHorizontal();
     EditorWindowTools.DrawHorizontalLine();
 }
Esempio n. 2
0
        private void CheckDialogueUI(GameObject newDialogueUIObject)
        {
            var newUIs = dialogueSystemController.displaySettings.dialogueUI.GetComponentsInChildren <UnityUIDialogueUI>(true);

            if (newUIs.Length > 0)
            {
                DialogueManagerWizard.HandleUnityUIDialogueUI(newUIs[0], DialogueManager.Instance);
            }
        }
        private void CheckDialogueUI(GameObject newDialogueUIObject)
        {
            if (dialogueSystemController.displaySettings.dialogueUI == null)
            {
                return;
            }
            var newUIs = dialogueSystemController.displaySettings.dialogueUI.GetComponentsInChildren <CanvasDialogueUI>(true);

            if (newUIs.Length > 0)
            {
                DialogueManagerWizard.HandleCanvasDialogueUI(newUIs[0], DialogueManager.instance);
            }
        }
Esempio n. 4
0
 private void DrawButtons()
 {
     GUILayout.BeginArea(new Rect(5, 40, position.width - 10, position.height - 40));
     try
     {
         EditorWindowTools.DrawHorizontalLine();
         EditorGUILayout.HelpBox("Welcome to the Dialogue System for Unity!\n\nThe buttons below are shortcuts to commonly-used functions. You can find even more in Tools > Pixel Crushers > Dialogue System.", MessageType.None);
         EditorWindowTools.DrawHorizontalLine();
         GUILayout.Label("Help", EditorStyles.boldLabel);
         GUILayout.BeginHorizontal();
         try
         {
             if (GUILayout.Button(new GUIContent("Quick\nStart\n", "Open Quick Start tutorial"), GUILayout.Width(ButtonWidth)))
             {
                 Application.OpenURL("http://www.pixelcrushers.com/dialogue_system/manual2x/html/quick_start.html");
             }
             if (GUILayout.Button(new GUIContent("\nManual\n", "Open online manual"), GUILayout.Width(ButtonWidth)))
             {
                 Application.OpenURL("http://www.pixelcrushers.com/dialogue_system/manual2x/html/");
             }
             if (GUILayout.Button(new GUIContent("\nVideos\n", "Open video tutorial list"), GUILayout.Width(ButtonWidth)))
             {
                 Application.OpenURL("http://www.pixelcrushers.com/dialogue-system-tutorials/");
             }
             if (GUILayout.Button(new GUIContent("Scripting\nReference\n", "Open scripting & API reference"), GUILayout.Width(ButtonWidth)))
             {
                 Application.OpenURL("http://www.pixelcrushers.com/dialogue_system/manual2x/html/scripting.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();
         }
         EditorWindowTools.DrawHorizontalLine();
         GUILayout.Label("Wizards & Resources", EditorStyles.boldLabel);
         GUILayout.BeginHorizontal();
         try
         {
             if (GUILayout.Button(new GUIContent("Dialogue\nEditor\n", "Open the Dialogue Editor window"), GUILayout.Width(ButtonWidth)))
             {
                 PixelCrushers.DialogueSystem.DialogueEditor.DialogueEditorWindow.OpenDialogueEditorWindow();
             }
             if (GUILayout.Button(new GUIContent("Dialogue\nManager\nWizard", "Configure a Dialogue Manager, the component that coordinates all Dialogue System activity"), GUILayout.Width(ButtonWidth)))
             {
                 DialogueManagerWizard.Init();
             }
             if (GUILayout.Button(new GUIContent("Player\nSetup\nWizard", "Configure a player GameObject to work with the Dialogue System"), GUILayout.Width(ButtonWidth)))
             {
                 PlayerSetupWizard.Init();
             }
             if (GUILayout.Button(new GUIContent("NPC\nSetup\nWizard", "Configure a non-player character or other interactive GameObject to work with the Dialogue System"), GUILayout.Width(ButtonWidth)))
             {
                 NPCSetupWizard.Init();
             }
             if (GUILayout.Button(new GUIContent("Free\nExtras\n", "Go to the Dialogue System free extras website"), GUILayout.Width(ButtonWidth)))
             {
                 Application.OpenURL("http://www.pixelcrushers.com/dialogue-system-extras/");
             }
         }
         finally
         {
             GUILayout.EndHorizontal();
         }
         EditorWindowTools.DrawHorizontalLine();
     }
     finally
     {
         GUILayout.EndArea();
     }
 }