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:
parent
c04c6693c2
commit
0ce5c7468f
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user