mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add local-user freemod configuration
This commit is contained in:
@ -51,6 +51,11 @@ namespace osu.Game.Overlays.Mods
|
||||
/// </summary>
|
||||
protected virtual bool Stacked => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether configurable <see cref="Mod"/>s can be configured by the local user.
|
||||
/// </summary>
|
||||
protected virtual bool AllowConfiguration => true;
|
||||
|
||||
[NotNull]
|
||||
private Func<Mod, bool> isValidMod = m => true;
|
||||
|
||||
@ -300,6 +305,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Text = "Customisation",
|
||||
Action = () => ModSettingsContainer.ToggleVisibility(),
|
||||
Enabled = { Value = false },
|
||||
Alpha = AllowConfiguration ? 1 : 0,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
},
|
||||
@ -509,7 +515,8 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
OnModSelected(selectedMod);
|
||||
|
||||
if (selectedMod.RequiresConfiguration) ModSettingsContainer.Show();
|
||||
if (selectedMod.RequiresConfiguration && AllowConfiguration)
|
||||
ModSettingsContainer.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user