Merge branch 'MineBill-control-double-click'
This commit is contained in:
@@ -314,6 +314,28 @@ namespace FlaxEngine.GUI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
||||||
|
{
|
||||||
|
if (base.OnMouseDoubleClick(location, button))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (button == MouseButton.Left && _isPressed)
|
||||||
|
{
|
||||||
|
OnPressEnd();
|
||||||
|
OnClick();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (button == MouseButton.Left && !_isPressed)
|
||||||
|
{
|
||||||
|
OnPressBegin();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool OnTouchDown(Float2 location, int pointerId)
|
public override bool OnTouchDown(Float2 location, int pointerId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -277,6 +277,27 @@ namespace FlaxEngine.GUI
|
|||||||
return base.OnMouseDown(location, button);
|
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 />
|
/// <inheritdoc />
|
||||||
public override bool OnMouseUp(Float2 location, MouseButton button)
|
public override bool OnMouseUp(Float2 location, MouseButton button)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -666,6 +666,30 @@ namespace FlaxEngine.GUI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
||||||
|
{
|
||||||
|
if (base.OnMouseDoubleClick(location, button))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (_touchDown && button == MouseButton.Left)
|
||||||
|
{
|
||||||
|
_touchDown = false;
|
||||||
|
ShowPopup();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (button == MouseButton.Left)
|
||||||
|
{
|
||||||
|
_touchDown = true;
|
||||||
|
if (!IsPopupOpened)
|
||||||
|
Focus();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool OnTouchDown(Float2 location, int pointerId)
|
public override bool OnTouchDown(Float2 location, int pointerId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -501,6 +501,29 @@ namespace FlaxEngine.GUI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
|
||||||
|
{
|
||||||
|
if (base.OnMouseDoubleClick(location, button))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
_mouseOverHeader = HeaderRectangle.Contains(location);
|
||||||
|
if (button == MouseButton.Left && _mouseOverHeader)
|
||||||
|
{
|
||||||
|
_mouseButtonLeftDown = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (button == MouseButton.Left && _mouseButtonLeftDown)
|
||||||
|
{
|
||||||
|
_mouseButtonLeftDown = false;
|
||||||
|
if (_mouseOverHeader)
|
||||||
|
Toggle();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void OnMouseLeave()
|
public override void OnMouseLeave()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user