mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
Use Click instead of now removed TriggerOnClick
This commit is contained in:
parent
a3e6973b41
commit
b790e16217
@ -228,7 +228,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
var lastAction = pauseOverlay.OnRetry;
|
var lastAction = pauseOverlay.OnRetry;
|
||||||
pauseOverlay.OnRetry = () => triggered = true;
|
pauseOverlay.OnRetry = () => triggered = true;
|
||||||
|
|
||||||
retryButton.TriggerOnClick();
|
retryButton.Click();
|
||||||
pauseOverlay.OnRetry = lastAction;
|
pauseOverlay.OnRetry = lastAction;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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);
|
Playing.ValueChanged += newValue => progress.FadeTo(newValue ? 1 : 0, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Select:
|
case GlobalAction.Select:
|
||||||
Buttons.OfType<PopupDialogOkButton>().FirstOrDefault()?.TriggerOnClick();
|
Buttons.OfType<PopupDialogOkButton>().FirstOrDefault()?.Click();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
if (!actionInvoked)
|
if (!actionInvoked)
|
||||||
// In the case a user did not choose an action before a hide was triggered, press the last button.
|
// 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.
|
// This is presumed to always be a sane default "cancel" action.
|
||||||
buttonsContainer.Last().TriggerOnClick();
|
buttonsContainer.Last().Click();
|
||||||
|
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
content.FadeOut(EXIT_DURATION, Easing.InSine);
|
content.FadeOut(EXIT_DURATION, Easing.InSine);
|
||||||
@ -261,7 +261,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
private void pressButtonAtIndex(int index)
|
private void pressButtonAtIndex(int index)
|
||||||
{
|
{
|
||||||
if (index < Buttons.Count())
|
if (index < Buttons.Count())
|
||||||
Buttons.Skip(index).First().TriggerOnClick();
|
Buttons.Skip(index).First().Click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ namespace osu.Game.Overlays
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
TriggerOnClick();
|
Click();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
return goBack();
|
return goBack();
|
||||||
case GlobalAction.Select:
|
case GlobalAction.Select:
|
||||||
logo?.TriggerOnClick();
|
logo?.Click();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -133,7 +133,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
sampleBack?.Play();
|
sampleBack?.Play();
|
||||||
return true;
|
return true;
|
||||||
case ButtonSystemState.Play:
|
case ButtonSystemState.Play:
|
||||||
backButton.TriggerOnClick();
|
backButton.Click();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -150,10 +150,10 @@ namespace osu.Game.Screens.Menu
|
|||||||
State = ButtonSystemState.TopLevel;
|
State = ButtonSystemState.TopLevel;
|
||||||
return true;
|
return true;
|
||||||
case ButtonSystemState.TopLevel:
|
case ButtonSystemState.TopLevel:
|
||||||
buttonsTopLevel.First().TriggerOnClick();
|
buttonsTopLevel.First().Click();
|
||||||
return false;
|
return false;
|
||||||
case ButtonSystemState.Play:
|
case ButtonSystemState.Play:
|
||||||
buttonsPlay.First().TriggerOnClick();
|
buttonsPlay.First().Click();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Play
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
||||||
/// </summary>
|
/// </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 Header { get; }
|
||||||
public abstract string Description { get; }
|
public abstract string Description { get; }
|
||||||
|
@ -132,7 +132,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public override string Header => "paused";
|
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?";
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
@ -141,7 +141,7 @@ namespace osu.Game.Screens.Play
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.SkipCutscene:
|
case GlobalAction.SkipCutscene:
|
||||||
button.TriggerOnClick();
|
button.Click();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user