You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
964 B
35 lines
964 B
using UnityEditor.EditorTools;
|
|
using UnityEditor.Toolbars;
|
|
using UnityEngine;
|
|
using UnityEngine.UIElements;
|
|
|
|
namespace UnityEditor.Splines
|
|
{
|
|
[EditorToolbarElement("Spline Tool Settings/Handle Visuals")]
|
|
sealed class SplineHandleSettingsDropdown : EditorToolbarDropdown
|
|
{
|
|
public SplineHandleSettingsDropdown()
|
|
{
|
|
var content = EditorGUIUtility.TrTextContent("Visuals", "Visual settings for handles");
|
|
|
|
text = content.text;
|
|
tooltip = content.tooltip;
|
|
icon = (Texture2D)content.image;
|
|
|
|
clicked += OnClick;
|
|
|
|
RegisterCallback<AttachToPanelEvent>(AttachToPanel);
|
|
}
|
|
|
|
void OnClick()
|
|
{
|
|
SplineHandleSettingsWindow.Show(worldBound);
|
|
}
|
|
|
|
void AttachToPanel(AttachToPanelEvent evt)
|
|
{
|
|
var toolType = ToolManager.activeToolType;
|
|
SetEnabled(toolType != typeof(KnotPlacementTool));
|
|
}
|
|
}
|
|
}
|