mirror of
https://github.com/ppy/osu
synced 2025-02-03 03:42:15 +00:00
Fix KeyCounter M1 M2 display.
This commit is contained in:
parent
1eacafc7b4
commit
0da950beac
@ -10,11 +10,25 @@ namespace osu.Game.Screens.Play
|
||||
public class KeyCounterMouse : KeyCounter
|
||||
{
|
||||
public MouseButton Button { get; }
|
||||
public KeyCounterMouse(MouseButton button) : base(button.ToString())
|
||||
|
||||
public KeyCounterMouse(MouseButton button) : base(getStringRepresentation(button))
|
||||
{
|
||||
Button = button;
|
||||
}
|
||||
|
||||
private static string getStringRepresentation(MouseButton button)
|
||||
{
|
||||
switch (button)
|
||||
{
|
||||
default:
|
||||
return button.ToString();
|
||||
case MouseButton.Left:
|
||||
return @"M1";
|
||||
case MouseButton.Right:
|
||||
return @"M2";
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
|
Loading…
Reference in New Issue
Block a user