1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 05:39:53 +08:00

Privatise ModSelectOverlay methods that may be unsafe to be called externally

This commit is contained in:
Dean Herbert
2021-01-05 16:18:13 +09:00
Unverified
parent 9bac791a57
commit 4d6c13f169
+4 -4
View File
@@ -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();
}