//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); }
//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); }
//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); }
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); }
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; //label totalHeight += EditorTool.AddedLineHeight; //array totalHeight += EditorTool.GetAddedHeight(reorderableList.GetHeight()); return(totalHeight); }
//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; //name label totalHeight += EditorTool.AddedLineHeight; //unique id totalHeight += EditorTool.AddedLineHeight; //name field totalHeight += EditorTool.AddedLineHeight; //lines label totalHeight += EditorTool.AddedLineHeight; //lines totalHeight += EditorTool.GetAddedHeight(linesList.GetHeight()); return(totalHeight); }
//calculate the height of this property public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { SetProperties(property); //additional start padding float totalHeight = EditorTool.InitialVerticalPadding; //unique id totalHeight += EditorTool.AddedLineHeight; //defaults totalHeight += EditorTool.AddedLineHeight; totalHeight += EditorTool.AddedLineHeight; //conversations label totalHeight += EditorTool.AddedLineHeight; //conversations totalHeight += EditorTool.GetAddedHeight(reorderableList.GetHeight()); //end padding totalHeight += EditorTool.AddedLineHeight; return(totalHeight); }
//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); }
//calculate the height of this property //some unnecissary duplicate code, but this layout keeps it easy to track height public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { //Ensure all properties are set SetProperties(property); //initial padding height float totalHeight = EditorTool.InitialVerticalPadding; //add name label totalHeight += EditorTool.AddedLineHeight; //add name field totalHeight += EditorTool.AddedLineHeight; //add topic question totalHeight += EditorTool.AddedLineHeight; //add stages label totalHeight += EditorTool.AddedLineHeight; //add stages totalHeight += EditorTool.GetAddedHeight(stageList.GetHeight()); //end padding totalHeight += EditorTool.AddedLineHeight; return(totalHeight); }
//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); }
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); }