public override void Render(Action preRender = null) { base.Render(preRender); directParentSerializedObject.Update(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(EditorGUI.indentLevel * 10f * Settings.indentation); if (inlineClassRenderer != null) { EditorGUILayout.BeginVertical(InspectorStyle.DefaultStyle.inlineFoldableBackgroundStyle); } else { EditorGUILayout.BeginVertical(); } ReorderableListGUI.Title(label); listControl.Draw(listAdaptor); if (inlineClassRenderer != null) { inlineClassRenderer.Render(preRender); } EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); directParentSerializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); _itemsReorderableListControl.Draw(new SerializedPropertyAdaptor(_itemsSerializedProperty)); serializedObject.ApplyModifiedProperties(); }
public void DrawControl(Rect position) { var y = position.y; itemWidth = position.width - HandlesWidth; var height = listControl.CalculateListHeight(this); var listPosition = new Rect ( position.x, y, position.width, height ); listControl.Draw(listPosition, this); }
public bool Field(Rect position, GUIContent label) { var y = position.y; if (widthMode == WidthMode.Thin) { position = Inspector.BeginBlock(metadata, position, label); } else { if (widthMode == WidthMode.Edge) { position.x = 0; position.width = LudiqGUIUtility.currentInspectorWidthWithoutScrollbar; } Inspector.BeginBlock(metadata, position, GUIContent.none); } position.height += 10; // Restore default padding itemWidth = position.width - 52; var height = position.height; if (widthMode != WidthMode.Thin && label != GUIContent.none) { var titlePosition = new Rect ( position.x, y, position.width, GetTitleHeight(position.width, label) ); OnTitleGUI(titlePosition, label); y += titlePosition.height - 1; height -= titlePosition.height; } else { height = listControl.CalculateListHeight(this); } var listPosition = new Rect ( position.x, y, position.width, height ); listControl.Draw(listPosition, this); return(Inspector.EndBlock(metadata)); }
public override void OnInspectorGUI() { EditorGUILayout.Space(); var node = this.target as RouteNode; Rotorz.Games.Collections.ReorderableListGUI.Title("Node Events"); listControl.Draw(listAdaptor); EditorUtility.SetDirty(target); }
public override void OnGUI(Rect position, ReflectedProperty property, GUIContent label) { guiRect.SetRect(position); EditorGUIX.Foldout(guiRect.GetFieldRect(), property); if (property.IsExpanded) { listControl.Draw(guiRect.GetRect(), adapter); } }
void DrawSideBar_Entries_Normal() { scrollPos_EntryBar = GUILayout.BeginScrollView(scrollPos_EntryBar, GUILayout.Width(sidebarWidth * 2)); GUILayout.BeginVertical(); GUILayout.Label("Entries"); GUILayout.BeginVertical(GUILayout.ExpandHeight(true)); _listControl.Draw(_listAdaptor); GUILayout.EndVertical(); GUILayout.EndVertical(); GUILayout.EndScrollView(); Rect temp = GUILayoutUtility.GetLastRect(); Handles.color = new Color(0, 0, 0, 0.4f); Handles.DrawLine(new Vector2(temp.xMax, temp.yMax), new Vector2(temp.xMax, temp.yMin)); }
private void DrawRouteList(RouteSet routeset) { Rotorz.Games.Collections.ReorderableListGUI.Title("Routes"); listControl.Draw(listAdaptor); listControl.Draw(listAdaptor); }
private void DrawNodeList(Route route) { Rotorz.Games.Collections.ReorderableListGUI.Title("Nodes"); listControl.Draw(listAdaptor); }