Ejemplo n.º 1
0
        //Calculate the height of this property
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            //Ensure all properties are set
            SetProperties(property);
            float totalHeight = EditorTool.InitialVerticalPadding;

            //Add Text header height
            totalHeight += EditorTool.AddedLineHeight;
            //Add unique ID
            totalHeight += EditorTool.AddedLineHeight;
            //Add Text height
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(name));
            //tag header
            totalHeight += EditorTool.AddedLineHeight;
            //Add tag height
            totalHeight += EditorTool.GetAddedHeight(GetTagHeight(property));
            //replies label
            totalHeight += EditorTool.AddedLineHeight;
            //Add default replies toggle height
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(useDefaultReply));
            if (isDetailExpaned == false)
            {
                //Add Replies height
                totalHeight += EditorTool.GetAddedHeight(repliesList.GetHeight());
            }
            //added padding
            totalHeight += EditorTool.AddedLineHeight;
            return(totalHeight);
        }
Ejemplo n.º 2
0
        //Calculate the tag height
        private float GetTagHeight(SerializedProperty property)
        {
            float totalHeight = 0f;

            //add tagtype
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(tagType));
            string tagTypeName = tagType.enumNames[tagType.enumValueIndex];

            switch (tagTypeName)
            {
            case "SpeakerName":
                //add text height
                totalHeight += EditorTool.AddedLineHeight;
                break;

            case "ChangeBranch":
                //add id height
                totalHeight += EditorTool.AddedLineHeight;
                break;

            case "ChangeStage":
                //add id height
                totalHeight += EditorTool.AddedLineHeight;
                break;
            }
            //instructions label
            totalHeight += EditorTool.AddedLineHeight;
            //instructions
            totalHeight += EditorTool.GetAddedHeight(instructionsList.GetHeight());
            return(totalHeight);
        }
Ejemplo n.º 3
0
        //Calculate the height of this property
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            //Ensure all properties are set
            SetProperties(property);
            float totalHeight = EditorTool.InitialVerticalPadding;

            //add topic label
            totalHeight = totalHeight + EditorTool.AddedLineHeight;
            //add topic field
            totalHeight = totalHeight + EditorTool.AddedLineHeight;
            //add identifier
            float identifierHeight = EditorTool.AddedLineHeight;

            for (int i = 0; i < identifier.arraySize; i++)
            {
                identifierHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(identifier.GetArrayElementAtIndex(i)));
            }
            totalHeight += identifierHeight;
            //add branches label
            totalHeight = totalHeight + EditorTool.AddedLineHeight;

            //add first branch
            totalHeight += EditorTool.GetAddedHeight(firstBranchesList.GetHeight());
            //add second branch
            totalHeight += EditorTool.GetAddedHeight(secondBranchesList.GetHeight());
            //add final line height for padding
            totalHeight = totalHeight + EditorTool.AddedLineHeight;
            return(totalHeight);
        }
Ejemplo n.º 4
0
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            SetProperties(property);
            float totalHeight = 0F;

            //unique id
            totalHeight += EditorTool.AddedLineHeight;
            //name
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(name));
            //id
            totalHeight += EditorTool.AddedLineHeight;
            return(totalHeight);
        }
Ejemplo n.º 5
0
        //Calculate the tag height
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            //Ensure all properties are set
            SetProperties(property);
            //add initial padding
            float totalHeight = EditorTool.InitialVerticalPadding;

            //add label
            totalHeight += EditorTool.AddedLineHeight;
            //add unique id
            totalHeight += EditorTool.AddedLineHeight;
            //Add Text height
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(name));
            //Add tag height
            totalHeight += EditorTool.GetAddedHeight(GetTagHeight(property));
            //add padding
            totalHeight += EditorTool.AddedLineHeight;
            return(totalHeight);
        }
Ejemplo n.º 6
0
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            SetProperties(property);
            float totalHeight = EditorTool.InitialVerticalPadding;

            //label
            totalHeight += EditorTool.AddedLineHeight;
            //unique id
            totalHeight += EditorTool.AddedLineHeight;
            //name
            totalHeight += EditorTool.AddedLineHeight;
            //id
            totalHeight += EditorTool.AddedLineHeight;
            //dev description
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(devDescription));
            //label
            totalHeight += EditorTool.AddedLineHeight;
            //array
            totalHeight += EditorTool.GetAddedHeight(reorderableList.GetHeight());
            return(totalHeight);
        }
Ejemplo n.º 7
0
        //Calculate the height of this property
        protected float GetTagHeight(SerializedProperty property)
        {
            //Ensure all properties are set
            SetProperties(property);
            float totalHeight = 0F;

            // add tag type
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(tagType));
            switch (tagType.intValue)
            {
            case 2:
                //add text height
                totalHeight += EditorTool.AddedLineHeight;
                break;

            case 3:
                //add text height
                totalHeight += EditorTool.AddedLineHeight;
                break;
            }
            return(totalHeight);
        }
Ejemplo n.º 8
0
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            SetProperties(property);
            float totalHeight = EditorTool.InitialVerticalPadding;

            //label
            totalHeight += EditorTool.AddedLineHeight;
            //unique id
            totalHeight += EditorTool.AddedLineHeight;
            //name
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(name));
            //id
            totalHeight += EditorTool.AddedLineHeight;
            //label
            totalHeight += EditorTool.AddedLineHeight;
            //notes
            totalHeight += EditorTool.GetAddedHeight(notesList.GetHeight());
            //label
            totalHeight += EditorTool.AddedLineHeight;
            //stagePoints
            totalHeight += EditorTool.GetAddedHeight(stagePointsList.GetHeight());
            return(totalHeight);
        }