Merge branch 'master' into fix-direct-queries

This commit is contained in:
Dan Balasescu 2019-03-12 12:02:17 +09:00 committed by GitHub
commit 61ba39d89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 25 deletions

View File

@ -92,30 +92,6 @@ private class Button : HoldToConfirmContainer, IKeyBindingHandler<GlobalAction>
public Action HoverGained;
public Action HoverLost;
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.Back:
BeginConfirm();
return true;
}
return false;
}
public bool OnReleased(GlobalAction action)
{
switch (action)
{
case GlobalAction.Back:
AbortConfirm();
return true;
}
return false;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
@ -178,7 +154,7 @@ protected override void Confirm()
// avoid starting a new confirm call until we finish animating.
pendingAnimation = true;
Progress.Value = 0;
AbortConfirm();
overlayCircle.ScaleTo(0, 100)
.Then().FadeOut().ScaleTo(1).FadeIn(500)
@ -207,6 +183,31 @@ protected override void OnHoverLost(HoverLostEvent e)
base.OnHoverLost(e);
}
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.Back:
if (!pendingAnimation)
BeginConfirm();
return true;
}
return false;
}
public bool OnReleased(GlobalAction action)
{
switch (action)
{
case GlobalAction.Back:
AbortConfirm();
return true;
}
return false;
}
protected override bool OnMouseDown(MouseDownEvent e)
{
if (!pendingAnimation && e.CurrentState.Mouse.Buttons.Count() == 1)