mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +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,
|
Width = 180,
|
||||||
Text = "Deselect All",
|
Text = "Deselect All",
|
||||||
Action = DeselectAll,
|
Action = deselectAll,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
},
|
},
|
||||||
@ -318,7 +318,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
sampleOff = audio.Samples.Get(@"UI/check-off");
|
sampleOff = audio.Samples.Get(@"UI/check-off");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeselectAll()
|
private void deselectAll()
|
||||||
{
|
{
|
||||||
foreach (var section in ModSectionsContainer.Children)
|
foreach (var section in ModSectionsContainer.Children)
|
||||||
section.DeselectAll();
|
section.DeselectAll();
|
||||||
@ -331,7 +331,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="modTypes">The types of <see cref="Mod"/>s which should be deselected.</param>
|
/// <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>
|
/// <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;
|
if (modTypes.Length == 0) return;
|
||||||
|
|
||||||
@ -438,7 +438,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
if (State.Value == Visibility.Visible) sampleOn?.Play();
|
if (State.Value == Visibility.Visible) sampleOn?.Play();
|
||||||
|
|
||||||
DeselectTypes(selectedMod.IncompatibleMods, true);
|
deselectTypes(selectedMod.IncompatibleMods, true);
|
||||||
|
|
||||||
if (selectedMod.RequiresConfiguration) ModSettingsContainer.Show();
|
if (selectedMod.RequiresConfiguration) ModSettingsContainer.Show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user