Added toggling mods with keys

This commit is contained in:
DrabWeb
2017-02-16 19:00:18 -04:00
parent 9fc3726925
commit e0dab3490f
4 changed files with 34 additions and 0 deletions

View File

@ -27,6 +27,7 @@ namespace osu.Game.Overlays.Mods
{
return icons[icons.Length - 1];
}
}
private SpriteText text;
private Container iconsContainer;
private AudioSample sampleOn, sampleOff;
@ -216,6 +217,17 @@ namespace osu.Game.Overlays.Mods
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
},
});
}
}
protected override bool OnKeyDown(Framework.Input.InputState state, KeyDownEventArgs args)
{
if (args.Key == ToggleKey)
{
SelectNext();
return true;
}