Пример #1
0
    // Overrides the Inspecotr GUI for the Dialogue Script
    public override void OnInspectorGUI()
    {
        var Script = target as DialogueScript;

        CGHeader();

        EditorGUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();

        if (GUILayout.Button("Open Editor"))
        {
            DialogueEditorWindow.ShowWindow();
        }

        if (GUILayout.Button("Documentation"))
        {
            //Application.OpenURL("");
        }

        GUILayout.FlexibleSpace();
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("File Active: ", GUILayout.Width(65));
        Script.File = (DialogueFile)EditorGUILayout.ObjectField(Script.File, typeof(DialogueFile), false);
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Name Txt: ", GUILayout.Width(80));
        Script.NameTxt = (Text)EditorGUILayout.ObjectField(Script.NameTxt, typeof(Text), false);
        EditorGUILayout.EndHorizontal();


        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Dialogue Txt: ", GUILayout.Width(80));
        Script.DialTxt = (Text)EditorGUILayout.ObjectField(Script.DialTxt, typeof(Text), false);
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Display Mode: ", GUILayout.Width(85));
        Script.DisplayStyle = (Styles)EditorGUILayout.EnumPopup(Script.DisplayStyle, GUILayout.Width(100));
        EditorGUILayout.EndHorizontal();

        base.OnInspectorGUI();
    }
    // Overrides the Inspecotr GUI for the Dialogue Script
    public override void OnInspectorGUI()
    {
        var Script = target as DialogueScript;

        //EditorGUILayout.BeginHorizontal();
        //GUILayout.FlexibleSpace();
        //// Carter Games Logo
        //if (GUILayout.Button(Resources.Load<Texture2D>("CarterGames/Logo"), GUIStyle.none, GUILayout.Width(50), GUILayout.Height(50)))
        //{
        //    GUI.FocusControl(null);
        //}
        //GUILayout.FlexibleSpace();
        //EditorGUILayout.EndHorizontal();


        //EditorGUILayout.BeginHorizontal();
        //GUILayout.FlexibleSpace();
        //EditorGUILayout.LabelField("Dialogue Manager | V: 1.0");
        //GUILayout.FlexibleSpace();
        //EditorGUILayout.EndHorizontal();

        GUILayout.Space(20);

        EditorGUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();

        if (GUILayout.Button("Open File Editor"))
        {
            DialogueEditorWindow.ShowWindow();
        }

        //if (GUILayout.Button("Documentation"))
        //{
        //          //Application.OpenURL("");
        //}

        GUILayout.FlexibleSpace();
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("File in use: ", GUILayout.MaxWidth(65));
        Script.File = (DialogueFile)EditorGUILayout.ObjectField(Script.File, typeof(DialogueFile), false);
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Character Name: ", GUILayout.MaxWidth(100));
        Script.DialName = (Text)EditorGUILayout.ObjectField(Script.DialName, typeof(Text), false);
        EditorGUILayout.EndHorizontal();


        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Character Text: ", GUILayout.MaxWidth(100));
        Script.DialText = (Text)EditorGUILayout.ObjectField(Script.DialText, typeof(Text), false);
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(10f);

        EditorGUILayout.BeginHorizontal();
        //Script.DisplayStyle = (Styles)EditorGUILayout.EnumPopup("Display Mode: ", Script.DisplayStyle);
        EditorGUILayout.EndHorizontal();


        // Base inspector - Disabled as this isn't used really.
        base.OnInspectorGUI();
    }