1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 11:00:18 +08:00
Files
osu-lazer/osu.Game/Screens/SelectV2/ISongSelect.cs
T
Krzysztof Gutkowski 8e26cf4e1b Restore previous beatmap when leaving scoped mode (#36582)
Resolves #36288.

If the current selection is still available after leaving scoped mode,
it's left as is. If it's not, the selection from before entering scoped
mode is restored.


https://github.com/user-attachments/assets/b1ac3de1-7c7f-4949-82a9-1dd0459f3f61

---------

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2026-02-17 00:40:29 +09:00

69 lines
2.4 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Scoring;
namespace osu.Game.Screens.SelectV2
{
/// <summary>
/// Actions exposed by song select which are used by subcomponents to perform top-level operations.
/// </summary>
[Cached]
public interface ISongSelect
{
/// <summary>
/// Requests the user for confirmation to delete the given beatmap set.
/// </summary>
void Delete(BeatmapSetInfo beatmapBeatmapSetInfo);
/// <summary>
/// Immediately restores any hidden beatmaps in the provided beatmap set.
/// </summary>
void RestoreAllHidden(BeatmapSetInfo beatmapSet);
/// <summary>
/// Opens the manage collections dialog.
/// </summary>
void ManageCollections();
/// <summary>
/// Opens results screen with the given score.
/// This assumes active beatmap and ruleset selection matches the score.
/// </summary>
void PresentScore(ScoreInfo score);
/// <summary>
/// Set the current filter text query to the provided string.
/// </summary>
void Search(string query);
/// <summary>
/// Gets relevant actionable items for beatmap context menus, based on the type of song select.
/// </summary>
IEnumerable<OsuMenuItem> GetForwardActions(BeatmapInfo beatmap);
/// <summary>
/// Temporarily bypasses filters and shows all difficulties of the given beatmapset.
/// </summary>
/// <param name="beatmapSet">The beatmapset.</param>
void ScopeToBeatmapSet(BeatmapSetInfo beatmapSet);
/// <summary>
/// Removes the beatmapset scope and reverts the previously selected filters.
/// </summary>
void UnscopeBeatmapSet();
/// <summary>
/// Contains the currently scoped beatmapset. Used by external consumers for displaying its state.
/// Cannot be used to change the value, any changes must be done through <see cref="ScopeToBeatmapSet"/>
/// or <see cref="UnscopeBeatmapSet"/>.
/// </summary>
IBindable<BeatmapSetInfo?> ScopedBeatmapSet { get; }
}
}