internal void OnGUI(Rect rect) { Rect titleRect = new Rect(rect.x, rect.y, rect.width, TITLE_HEIGHT); EGUI.DrawBoxHeader(titleRect, Contents.titleStr, EGUIStyles.BoxedHeaderCenterStyle); Track trackData = EditorData.Data.GetSelectedTrack(); if (trackData == null) { return; } Rect scrollRect = new Rect(rect.x, titleRect.y + titleRect.height, rect.width, rect.height - titleRect.height); GUILayout.BeginArea(scrollRect); { EGUI.BeginLabelWidth(100); { trackData.Name = EditorGUILayout.TextField(Contents.nameContent, trackData.Name); } EGUI.EndLableWidth(); } GUILayout.EndArea(); }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { SerializedProperty scriptPathProperty = property.FindPropertyRelative("scriptPath"); SerializedProperty paramValuesProperty = property.FindPropertyRelative("paramValues"); Rect headerRect = new Rect(position.x, position.y, position.width, EditorGUIUtility.singleLineHeight); EGUI.DrawBoxHeader(headerRect, label.text); Rect scriptRect = headerRect; scriptRect.y += headerRect.height; scriptRect.height = EditorGUIUtility.singleLineHeight * 2; DrawScriptProperty(scriptRect, scriptPathProperty); Rect paramValuesRect = scriptRect; paramValuesRect.y += scriptRect.height; paramValuesRect.height = position.height - headerRect.height - scriptRect.height; string paramValuesPropertyPath = paramValuesProperty.propertyPath; if (!rListDic.TryGetValue(paramValuesPropertyPath, out var rList)) { rList = new ReorderableListProperty(paramValuesProperty); rListDic.Add(paramValuesPropertyPath, rList); } rList.OnGUI(paramValuesRect); }
public void OnGUI(Rect rect) { if (!string.IsNullOrEmpty(HeaderContent)) { EGUI.DrawBoxHeader(new Rect(rect.x, rect.y, rect.width, HEADER_HEIGHT), HeaderContent, EGUIStyles.BoxedHeaderCenterStyle); } rect.height -= HEADER_HEIGHT; treeView?.OnGUI(rect); }
public override void OnGUI(Rect rect) { Rect viewRect = rect; if (!string.IsNullOrEmpty(listView.Header)) { EGUI.DrawBoxHeader(new Rect(rect.x, rect.y, rect.width, 30), listView.Header, EGUIStyles.BoxedHeaderCenterStyle); viewRect.y += 20; viewRect.height -= 20; } base.OnGUI(viewRect); }