mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Merge branch 'master' into master
This commit is contained in:
@ -342,13 +342,17 @@ namespace osu.Game.Screens.Select
|
||||
/// Call to make a selection and perform the default action for this SongSelect.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">An optional beatmap to override the current carousel selection.</param>
|
||||
/// <param name="performStartAction">Whether to trigger <see cref="OnStart"/>.</param>
|
||||
public void FinaliseSelection(BeatmapInfo beatmap = null, bool performStartAction = true)
|
||||
/// <param name="ruleset">An optional ruleset to override the current carousel selection.</param>
|
||||
/// <param name="customStartAction">An optional custom action to perform instead of <see cref="OnStart"/>.</param>
|
||||
public void FinaliseSelection(BeatmapInfo beatmap = null, RulesetInfo ruleset = null, Action customStartAction = null)
|
||||
{
|
||||
// This is very important as we have not yet bound to screen-level bindables before the carousel load is completed.
|
||||
if (!Carousel.BeatmapSetsLoaded)
|
||||
return;
|
||||
|
||||
if (ruleset != null)
|
||||
Ruleset.Value = ruleset;
|
||||
|
||||
transferRulesetValue();
|
||||
|
||||
// while transferRulesetValue will flush, it only does so if the ruleset changes.
|
||||
@ -369,7 +373,12 @@ namespace osu.Game.Screens.Select
|
||||
selectionChangedDebounce = null;
|
||||
}
|
||||
|
||||
if (performStartAction && OnStart())
|
||||
if (customStartAction != null)
|
||||
{
|
||||
customStartAction();
|
||||
Carousel.AllowSelection = false;
|
||||
}
|
||||
else if (OnStart())
|
||||
Carousel.AllowSelection = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user