public CreateCriteria ( ) : osu.Game.Screens.Select.FilterCriteria | ||
Результат | osu.Game.Screens.Select.FilterCriteria |
private void workingBeatmapChanged(ValueChangedEvent <WorkingBeatmap> e) { if (e.NewValue is DummyWorkingBeatmap || !this.IsCurrentScreen()) { return; } Logger.Log($"working beatmap updated to {e.NewValue}"); if (!Carousel.SelectBeatmap(e.NewValue.BeatmapInfo, false)) { // A selection may not have been possible with filters applied. // There was possibly a ruleset mismatch. This is a case we can help things along by updating the game-wide ruleset to match. if (e.NewValue.BeatmapInfo.Ruleset != null && !e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value)) { Ruleset.Value = e.NewValue.BeatmapInfo.Ruleset; transferRulesetValue(); } // Even if a ruleset mismatch was not the cause (ie. a text filter is applied), // we still want to temporarily show the new beatmap, bypassing filters. // This will be undone the next time the user changes the filter. var criteria = FilterControl.CreateCriteria(); criteria.SelectedBeatmapSet = e.NewValue.BeatmapInfo.BeatmapSet; Carousel.Filter(criteria); Carousel.SelectBeatmap(e.NewValue.BeatmapInfo); } }
public override void OnEntering(IScreen last) { base.OnEntering(last); Carousel.Filter(FilterControl.CreateCriteria(), false); this.FadeInFromZero(250); FilterControl.Activate(); }