mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 08:03:52 +09:00
Fix KeyCounter M1 M2 display.
This commit is contained in:
@ -10,11 +10,25 @@ namespace osu.Game.Screens.Play
|
|||||||
public class KeyCounterMouse : KeyCounter
|
public class KeyCounterMouse : KeyCounter
|
||||||
{
|
{
|
||||||
public MouseButton Button { get; }
|
public MouseButton Button { get; }
|
||||||
public KeyCounterMouse(MouseButton button) : base(button.ToString())
|
|
||||||
|
public KeyCounterMouse(MouseButton button) : base(getStringRepresentation(button))
|
||||||
{
|
{
|
||||||
Button = 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;
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
|
Reference in New Issue
Block a user