1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Use Click instead of now removed TriggerOnClick

This commit is contained in:
ekrctb 2018-09-18 18:05:25 +09:00
parent a3e6973b41
commit b790e16217
8 changed files with 13 additions and 13 deletions

View File

@ -228,7 +228,7 @@ namespace osu.Game.Tests.Visual
var lastAction = pauseOverlay.OnRetry;
pauseOverlay.OnRetry = () => triggered = true;
retryButton.TriggerOnClick();
retryButton.Click();
pauseOverlay.OnRetry = lastAction;
});

View File

@ -66,7 +66,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
},
};
Action = () => playButton.TriggerOnClick();
Action = () => playButton.Click();
Playing.ValueChanged += newValue => progress.FadeTo(newValue ? 1 : 0, 100);
}

View File

@ -199,7 +199,7 @@ namespace osu.Game.Overlays.Dialog
switch (action)
{
case GlobalAction.Select:
Buttons.OfType<PopupDialogOkButton>().FirstOrDefault()?.TriggerOnClick();
Buttons.OfType<PopupDialogOkButton>().FirstOrDefault()?.Click();
return true;
}
@ -252,7 +252,7 @@ namespace osu.Game.Overlays.Dialog
if (!actionInvoked)
// In the case a user did not choose an action before a hide was triggered, press the last button.
// This is presumed to always be a sane default "cancel" action.
buttonsContainer.Last().TriggerOnClick();
buttonsContainer.Last().Click();
base.PopOut();
content.FadeOut(EXIT_DURATION, Easing.InSine);
@ -261,7 +261,7 @@ namespace osu.Game.Overlays.Dialog
private void pressButtonAtIndex(int index)
{
if (index < Buttons.Count())
Buttons.Skip(index).First().TriggerOnClick();
Buttons.Skip(index).First().Click();
}
}
}

View File

@ -155,7 +155,7 @@ namespace osu.Game.Overlays
switch (action)
{
case GlobalAction.Back:
TriggerOnClick();
Click();
return true;
}

View File

@ -115,7 +115,7 @@ namespace osu.Game.Screens.Menu
case GlobalAction.Back:
return goBack();
case GlobalAction.Select:
logo?.TriggerOnClick();
logo?.Click();
return true;
default:
return false;
@ -133,7 +133,7 @@ namespace osu.Game.Screens.Menu
sampleBack?.Play();
return true;
case ButtonSystemState.Play:
backButton.TriggerOnClick();
backButton.Click();
return true;
default:
return false;
@ -150,10 +150,10 @@ namespace osu.Game.Screens.Menu
State = ButtonSystemState.TopLevel;
return true;
case ButtonSystemState.TopLevel:
buttonsTopLevel.First().TriggerOnClick();
buttonsTopLevel.First().Click();
return false;
case ButtonSystemState.Play:
buttonsPlay.First().TriggerOnClick();
buttonsPlay.First().Click();
return false;
}
}

View File

@ -38,7 +38,7 @@ namespace osu.Game.Screens.Play
/// <summary>
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
/// </summary>
protected virtual Action BackAction => () => InternalButtons.Children.Last().TriggerOnClick();
protected virtual Action BackAction => () => InternalButtons.Children.Last().Click();
public abstract string Header { get; }
public abstract string Description { get; }

View File

@ -132,7 +132,7 @@ namespace osu.Game.Screens.Play
public override string Header => "paused";
public override string Description => "you're not going to do what i think you're going to do, are ya?";
protected override Action BackAction => () => InternalButtons.Children.First().TriggerOnClick();
protected override Action BackAction => () => InternalButtons.Children.First().Click();
[BackgroundDependencyLoader]
private void load(OsuColour colours)

View File

@ -141,7 +141,7 @@ namespace osu.Game.Screens.Play
switch (action)
{
case GlobalAction.SkipCutscene:
button.TriggerOnClick();
button.Click();
return true;
}