Implement new mod select screen

This commit is contained in:
Bartłomiej Dach
2022-03-26 22:43:17 +01:00
parent 969f7e121a
commit 293ef44836
4 changed files with 356 additions and 2 deletions

View File

@ -48,6 +48,8 @@ namespace osu.Game.Overlays.Mods
}
}
public Action<Mod, bool>? ModStateChanged { get; set; }
private readonly ModType modType;
private readonly Key[]? toggleKeys;
@ -251,7 +253,14 @@ namespace osu.Game.Overlays.Mods
panelFlow.ChildrenEnumerable = loaded;
foreach (var panel in panelFlow)
panel.Active.BindValueChanged(_ => updateToggleState());
{
panel.Active.BindValueChanged(_ =>
{
updateToggleState();
ModStateChanged?.Invoke(panel.Mod, panel.Active.Value);
});
}
updateToggleState();
updateFilter();