1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 01:10:05 +08:00

Fix KeyCounter M1 M2 display.

This commit is contained in:
Dean Herbert
2017-03-14 12:31:09 +09:00
Unverified
parent 1eacafc7b4
commit 0da950beac
+15 -1
View File
@@ -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)