Пример #1
0
        //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.DrawTextArea(newPosition, name, "Text");
            //tag header
            newPosition = EditorTool.DrawLabel(newPosition, "Tag");
            //tag
            newPosition = DrawTag(newPosition);
            //remove indent
            newPosition = EditorTool.GetIndentedPosition(newPosition, false);
            //replies header
            newPosition = EditorTool.DrawLabel(newPosition, "Replies");
            //Draw useDefaultReply
            newPosition     = EditorTool.DrawBoolField(newPosition, useDefaultReply, "Use Default Replies");
            isDetailExpaned = useDefaultReply.boolValue;
            //Draw replies if not default
            if (isDetailExpaned == false)
            {
                newPosition = EditorTool.DrawReorderableList(newPosition, repliesList);
            }
        }
Пример #2
0
        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);
        }
Пример #3
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 data array
            newPosition = EditorTool.DrawReorderableList(newPosition, reorderableList, "Myths");
        }
        //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");
        }
        //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");
        }
Пример #7
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");
        }
Пример #8
0
        protected override void DrawChildProperties(Rect position, SerializedProperty property)
        {
            Rect newPosition = DrawTopLabel(position);

            //draw unique id
            newPosition = DrawUniqueID(newPosition);
            //draw name
            newPosition = EditorTool.DrawTextArea(newPosition, name, "Name");
            //draw id
            newPosition = EditorTool.DrawIntField(newPosition, id, "Stage ID");
            //draw notes
            newPosition = EditorTool.DrawReorderableList(newPosition, notesList, "Notes");
            //draw stage points
            newPosition = EditorTool.DrawReorderableList(newPosition, stagePointsList, "Stage Points");
        }
        //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);
        }