Fix KeyCounter M1 M2 display.

This commit is contained in:
Dean Herbert 2017-03-14 12:31:09 +09:00
parent 1eacafc7b4
commit 0da950beac
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

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)