コード例 #1
0
        public override void Draw()
        {
            endPoint.Draw();

            GUI.Box(rect, "", style);
            GUI.Label(rect, "END", style);
        }
コード例 #2
0
        public override void Draw()
        {
            startPoint.Draw();

            GUI.Box(rect, "", style);
            GUI.Label(rect, "START", style);
        }
コード例 #3
0
        public override void Draw()
        {
            //calc height needed
            rect.height = offset + ((3 + triggers.Count) * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing)) + 10 + button_height + (EditorGUIUtility.singleLineHeight * 5);


            inPoint.Draw();
            for (int i = triggers.Count - 1; i >= 0; i--)
            {
                outPoints[i].Draw(rect.y + offset + ((2 + i) * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing)) - (outPoints[i].rect.height * 0.5f) + (EditorGUIUtility.singleLineHeight * 0.5f) + button_height);
            }

            GUI.Box(rect, title, style);

            GUILayout.BeginArea(new Rect(rect.x, rect.y + offset, rect.width, rect.height - offset));
            GUILayout.BeginVertical();

            title = EditorGUILayout.TextField("Title", title);
            EditorGUILayout.PrefixLabel("Text");
            text = EditorGUILayout.TextArea(text, GUILayout.Height(EditorGUIUtility.singleLineHeight * 5));
            clip = (AudioClip)EditorGUILayout.ObjectField("Audio", clip, typeof(AudioClip), false);

            GUILayout.BeginHorizontal();
            isRemoveClicked = GUILayout.Button("-");
            isAddClicked    = GUILayout.Button("+");
            GUILayout.EndHorizontal();

            for (int i = 0; i < triggers.Count; i++)
            {
                triggers[i] = EditorGUILayout.TextField("Option " + i, triggers[i]);
            }

            GUILayout.EndVertical();
            GUILayout.EndArea();
        }