Make tool strip buttons more responsive by also reaction to double left clicks

This commit is contained in:
Zode
2025-06-11 17:47:27 +03:00
committed by GitHub
parent aa59a6faf7
commit 00055ef663

View File

@@ -215,6 +215,22 @@ namespace FlaxEditor.GUI
return base.OnMouseUp(location, button);
}
/// <inheritdoc />
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
{
if(button == MouseButton.Left)
{
if (AutoCheck)
Checked = !Checked;
Clicked?.Invoke();
(Parent as ToolStrip)?.OnButtonClicked(this);
return true;
}
return false;
}
/// <inheritdoc />
public override void OnMouseLeave()
{