mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
Privatise ModSelectOverlay methods that may be unsafe to be called externally
This commit is contained in:
parent
9bac791a57
commit
4d6c13f169
@ -249,7 +249,7 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
Width = 180,
|
||||
Text = "Deselect All",
|
||||
Action = DeselectAll,
|
||||
Action = deselectAll,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
},
|
||||
@ -318,7 +318,7 @@ namespace osu.Game.Overlays.Mods
|
||||
sampleOff = audio.Samples.Get(@"UI/check-off");
|
||||
}
|
||||
|
||||
public void DeselectAll()
|
||||
private void deselectAll()
|
||||
{
|
||||
foreach (var section in ModSectionsContainer.Children)
|
||||
section.DeselectAll();
|
||||
@ -331,7 +331,7 @@ namespace osu.Game.Overlays.Mods
|
||||
/// </summary>
|
||||
/// <param name="modTypes">The types of <see cref="Mod"/>s which should be deselected.</param>
|
||||
/// <param name="immediate">Set to true to bypass animations and update selections immediately.</param>
|
||||
public void DeselectTypes(Type[] modTypes, bool immediate = false)
|
||||
private void deselectTypes(Type[] modTypes, bool immediate = false)
|
||||
{
|
||||
if (modTypes.Length == 0) return;
|
||||
|
||||
@ -438,7 +438,7 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
if (State.Value == Visibility.Visible) sampleOn?.Play();
|
||||
|
||||
DeselectTypes(selectedMod.IncompatibleMods, true);
|
||||
deselectTypes(selectedMod.IncompatibleMods, true);
|
||||
|
||||
if (selectedMod.RequiresConfiguration) ModSettingsContainer.Show();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user