1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Use switch and consume/block input

This commit is contained in:
Dean Herbert 2019-06-07 15:31:23 +09:00
parent c04c6693c2
commit 0ce5c7468f

View File

@ -197,10 +197,16 @@ namespace osu.Game.Overlays.Mods
protected override bool OnKeyDown(KeyDownEvent e)
{
if (e.Key == Key.Number1)
DeselectAllButton.Click();
else if (e.Key == Key.Number2)
CloseButton.Click();
switch (e.Key)
{
case Key.Number1:
DeselectAllButton.Click();
return true;
case Key.Number2:
CloseButton.Click();
return true;
}
return base.OnKeyDown(e);
}