Handle double clicking to eliminate perceived lag.
This commit is contained in:
@@ -277,6 +277,27 @@ namespace FlaxEngine.GUI
|
||||
return base.OnMouseDown(location, button);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
||||
{
|
||||
if (button == MouseButton.Left && !_isPressed)
|
||||
{
|
||||
OnPressBegin();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (button == MouseButton.Left && _isPressed)
|
||||
{
|
||||
OnPressEnd();
|
||||
if (_box.Contains(ref location))
|
||||
{
|
||||
OnClick();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return base.OnMouseDoubleClick(location, button);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseUp(Float2 location, MouseButton button)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user