Make tool strip buttons more responsive by also reaction to double left clicks
This commit is contained in:
@@ -215,6 +215,22 @@ namespace FlaxEditor.GUI
|
|||||||
return base.OnMouseUp(location, button);
|
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 />
|
/// <inheritdoc />
|
||||||
public override void OnMouseLeave()
|
public override void OnMouseLeave()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user