mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Change random button text when holding shift key
This commit is contained in:
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
SelectedColour = colours.Green;
|
||||
DeselectedColour = SelectedColour.Opacity(0.5f);
|
||||
Text = @"random";
|
||||
updateText();
|
||||
|
||||
Action = () =>
|
||||
{
|
||||
@ -59,6 +59,18 @@ namespace osu.Game.Screens.Select
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
updateText(e.ShiftPressed);
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
protected override void OnKeyUp(KeyUpEvent e)
|
||||
{
|
||||
updateText(e.ShiftPressed);
|
||||
base.OnKeyUp(e);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
rewindSearch = e.ShiftPressed;
|
||||
@ -91,5 +103,7 @@ namespace osu.Game.Screens.Select
|
||||
rewindSearch = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateText(bool rewind = false) => Text = rewind ? "rewind" : "random";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user