예제 #1
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);
        }
예제 #2
0
        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");
        }
예제 #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 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");
        }
예제 #4
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");
        }
        protected Rect DrawTag(Rect position)
        {
            //Draw tagType
            Rect newPosition = EditorTool.DrawPropertyField(position, tagType);

            //add indent
            newPosition = EditorTool.GetIndentedPosition(newPosition);
            //Draw necissary fields based on tag type
            switch (tagType.intValue)
            {
            case 2:
                //Draw id
                newPosition = EditorTool.DrawIntField(newPosition, id, "ID");
                break;

            case 3:
                //Draw id
                newPosition = EditorTool.DrawIntField(newPosition, id, "ID");
                break;
            }
            return(newPosition);
        }