protected override object OnPaintEditor(float width)
{
var control = base.OnPaintEditor(width);
Editor.NewLine(1);
Editor.Label(" TreeView");
Editor.ColorField("BorderColor", BorderColor, (c) => { BorderColor = c; });
var itemHeightBuffer = Editor.IntField("ItemHeight", ItemHeight);
if (itemHeightBuffer.Changed)
ItemHeight = itemHeightBuffer.Value[0];
Editor.ColorField("ScrollBarColor", ScrollBarColor, (c) => { ScrollBarColor = c; });
Editor.ColorField("ScrollBarHoverColor", ScrollBarHoverColor, (c) => { ScrollBarHoverColor = c; });
var scrollSpeedBuffer = Editor.Slider("ScrollSpeed", ScrollSpeed, 0, 255);
if (scrollSpeedBuffer.Changed)
ScrollSpeed = scrollSpeedBuffer.Value;
var scrollIndexBuffer = Editor.Slider("ScrollIndex", ScrollIndex, -1, _nodeList.Count * ItemHeight);
if (scrollIndexBuffer.Changed)
ScrollIndex = scrollIndexBuffer.Value;
Editor.ColorField("SelectionColor", SelectionColor, (c) => { SelectionColor = c; });
Editor.ColorField("SelectionHoverColor", SelectionHoverColor, (c) => { SelectionHoverColor = c; });
var smoothScrollingBuffer = Editor.BooleanField("SmoothScrolling", SmoothScrolling);
if (smoothScrollingBuffer.Changed)
SmoothScrolling = smoothScrollingBuffer.Value;
var useNodeBoundsForSelectionBuffer = Editor.BooleanField("UseNodeBoundsForSelection", UseNodeBoundsForSelection);
if (useNodeBoundsForSelectionBuffer.Changed)
UseNodeBoundsForSelection = useNodeBoundsForSelectionBuffer.Value;
var wrapTextBuffer = Editor.BooleanField("WrapText", WrapText);
if (wrapTextBuffer.Changed)
WrapText = wrapTextBuffer.Value;
if (Editor.Button("Refresh"))
Refresh();
return control;
}
protected virtual void ProccesNode(TreeNode node)