private Rect DrawTag(Rect position)
        {
            //Draw tagType
            Rect   newPosition = EditorTool.DrawPropertyField(position, tagType);
            float  height      = newPosition.height;
            string tagTypeName = tagType.enumNames[tagType.enumValueIndex];

            //Draw necissary fields based on tag type
            switch (tagTypeName)
            {
            case "SpeakerName":
                //Draw text
                newPosition = EditorTool.DrawTextField(newPosition, tagName, "Speaker Name");
                height     += newPosition.height;
                break;

            case "ChangeBranch":
                newPosition = EditorTool.DrawIntField(newPosition, id, "ID");
                height     += newPosition.height;
                break;

            case "ChangeStage":
                //draw id
                newPosition = EditorTool.DrawIntField(newPosition, id, "ID");
                height     += newPosition.height;
                break;
            }
            newPosition = EditorTool.DrawReorderableList(newPosition, instructionsList, "Instructions");
            height     += newPosition.height;
            newPosition = new Rect(newPosition.x, newPosition.y, newPosition.width, height);
            //EditorGUI.DrawRect(newPosition, Color.blue);
            return(newPosition);
        }
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name
            newPosition = EditorTool.DrawTextField(newPosition, name, "Name");
            //draw data array
            newPosition = EditorTool.DrawReorderableList(newPosition, reorderableList, "Myths");
        }
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            Rect newPosition = new Rect(position.x, position.y, position.width, 0F);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name
            newPosition = EditorTool.DrawTextField(newPosition, name, "Name");
            //draw id
            newPosition = EditorTool.DrawIntField(newPosition, maxValue, "Max Value");
        }
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            //draw label
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //Draw name
            newPosition = EditorTool.DrawTextField(newPosition, name, "Text");
            //Draw tag
            newPosition = DrawTag(newPosition);
        }
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            //draw label
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name field
            newPosition = EditorTool.DrawTextField(newPosition, name, "Name");
            //draw lines
            newPosition = EditorTool.DrawReorderableList(newPosition, linesList, "Lines");
        }
Exemple #6
0
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            //ensure all properties set
            SetProperties(property);

            //draw defaults label
            Rect newPostion = EditorTool.DrawTopLabel(position, "Defaults");

            //draw continue text
            newPostion = EditorTool.DrawTextField(newPostion, continueText, "Reply");
            //draw end text
            newPostion = EditorTool.DrawTextField(newPostion, endText, "Last Reply");
        }
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            //draw label
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw defaults
            newPosition = EditorTool.DrawTextField(newPosition, defaultRepy, "Default Reply");
            newPosition = EditorTool.DrawTextField(newPosition, defaultEndReply, "Default End Reply");
            //draw conversations
            newPosition = EditorTool.DrawReorderableList(newPosition, reorderableList, "Conversations");
        }
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect sentPosition, SerializedProperty property)
        {
            //draw label
            Rect newPosition = DrawTopLabel(sentPosition);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name field
            newPosition = EditorTool.DrawTextField(newPosition, name, "Name");
            //draw topic question field
            newPosition = EditorTool.DrawTextField(newPosition, topicQuestion, "Topic Question");
            //draw stages
            newPosition = EditorTool.DrawReorderableList(newPosition, stageList, "Stages");
        }
Exemple #9
0
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name
            newPosition = EditorTool.DrawTextField(newPosition, name, "Name");
            //draw id
            newPosition = EditorTool.DrawIntField(newPosition, id, "Myth ID");
            //draw dev description
            newPosition = EditorTool.DrawTextArea(newPosition, devDescription, "Dev Description");
            //draw data array
            newPosition = EditorTool.DrawReorderableList(newPosition, reorderableList, "Stories");
        }
        //called from base OnGUI, handles child property drawing
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            //draw label
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name field
            newPosition = EditorTool.DrawTextField(newPosition, topic, "Topic");
            //draw identifier
            newPosition = EditorTool.DrawArray(newPosition, identifier, "Identifier");
            //newPosition = new Rect(newPosition.x, newPosition.y + lineHeight, newPosition.width, 50F);
            //draw branches
            newPosition = EditorTool.DrawReorderableList(newPosition, firstBranchesList, "Branches");
            newPosition = EditorTool.DrawReorderableList(newPosition, secondBranchesList, null);
        }