mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Refactor mod panel selection logic to avoid overwriting
This commit is contained in:
@ -143,9 +143,25 @@ namespace osu.Game.Overlays.Mods
|
||||
}
|
||||
};
|
||||
|
||||
Action = () => Active.Toggle();
|
||||
Action = () =>
|
||||
{
|
||||
if (!Active.Value)
|
||||
Select();
|
||||
else
|
||||
Deselect();
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs all actions necessary to select this <see cref="ModSelectPanel"/>.
|
||||
/// </summary>
|
||||
protected abstract void Select();
|
||||
|
||||
/// <summary>
|
||||
/// Performs all actions necessary to deselect this <see cref="ModSelectPanel"/>.
|
||||
/// </summary>
|
||||
protected abstract void Deselect();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, ISamplePlaybackDisabler? samplePlaybackDisabler)
|
||||
{
|
||||
|
Reference in New Issue
Block a user