mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09:00
Added a comment and fixed some wonky formatting
This commit is contained in:
parent
e3d14db285
commit
b694e0d441
@ -22,7 +22,7 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.UI
|
namespace osu.Game.Rulesets.Taiko.UI
|
||||||
{
|
{
|
||||||
using TaikoInput = TaikoAction;
|
using TaikoInput = TaikoAction; // Functionally identical to TaikoAction, it's just a readability thing
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An overlay that captures and displays osu!taiko mouse and touch input.
|
/// An overlay that captures and displays osu!taiko mouse and touch input.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -158,7 +158,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
private bool validMouse(MouseButtonEvent e) =>
|
private bool validMouse(MouseButtonEvent e) =>
|
||||||
leftRim.Contains(e.ScreenSpaceMouseDownPosition) || rightRim.Contains(e.ScreenSpaceMouseDownPosition);
|
leftRim.Contains(e.ScreenSpaceMouseDownPosition) || rightRim.Contains(e.ScreenSpaceMouseDownPosition);
|
||||||
|
|
||||||
#pragma warning disable format
|
#pragma warning disable format
|
||||||
private TaikoAction getTaikoActionFromInput(TaikoInput input)
|
private TaikoAction getTaikoActionFromInput(TaikoInput input)
|
||||||
{
|
{
|
||||||
switch (configTouchControlScheme.Value)
|
switch (configTouchControlScheme.Value)
|
||||||
@ -177,28 +177,28 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
case TaikoTouchControlScheme.DDKK:
|
case TaikoTouchControlScheme.DDKK:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case TaikoInput.LeftRim: return TaikoAction.LeftCentre;
|
case TaikoInput.LeftRim: return TaikoAction.LeftCentre;
|
||||||
case TaikoInput.LeftCentre: return TaikoAction.RightCentre;
|
case TaikoInput.LeftCentre: return TaikoAction.RightCentre;
|
||||||
case TaikoInput.RightCentre: return TaikoAction.LeftRim;
|
case TaikoInput.RightCentre: return TaikoAction.LeftRim;
|
||||||
case TaikoInput.RightRim: return TaikoAction.RightRim;
|
case TaikoInput.RightRim: return TaikoAction.RightRim;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TaikoTouchControlScheme.KKDD:
|
case TaikoTouchControlScheme.KKDD:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case TaikoInput.LeftRim: return TaikoAction.LeftRim;
|
case TaikoInput.LeftRim: return TaikoAction.LeftRim;
|
||||||
case TaikoInput.LeftCentre: return TaikoAction.RightRim;
|
case TaikoInput.LeftCentre: return TaikoAction.RightRim;
|
||||||
case TaikoInput.RightCentre: return TaikoAction.LeftCentre;
|
case TaikoInput.RightCentre: return TaikoAction.LeftCentre;
|
||||||
case TaikoInput.RightRim: return TaikoAction.RightCentre;
|
case TaikoInput.RightRim: return TaikoAction.RightCentre;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TaikoAction.LeftCentre;
|
return TaikoAction.LeftCentre;
|
||||||
}
|
}
|
||||||
|
#pragma warning restore format
|
||||||
|
|
||||||
#pragma warning restore format
|
private TaikoAction getTaikoActionFromPosition(Vector2 inputPosition)
|
||||||
private TaikoAction getTaikoActionFromPosition(Vector2 inputPosition)
|
|
||||||
{
|
{
|
||||||
bool centreHit = leftCentre.Contains(inputPosition) || rightCentre.Contains(inputPosition);
|
bool centreHit = leftCentre.Contains(inputPosition) || rightCentre.Contains(inputPosition);
|
||||||
bool leftSide = ToLocalSpace(inputPosition).X < DrawWidth / 2;
|
bool leftSide = ToLocalSpace(inputPosition).X < DrawWidth / 2;
|
||||||
@ -236,15 +236,15 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
Color4 colour = ((Func<Color4>)(() =>
|
Color4 colour = ((Func<Color4>)(() =>
|
||||||
{
|
{
|
||||||
#pragma warning disable format
|
#pragma warning disable format
|
||||||
switch (handledAction)
|
switch (handledAction)
|
||||||
{
|
{
|
||||||
case TaikoAction.LeftRim: return colours.Blue;
|
case TaikoAction.LeftRim: return colours.Blue;
|
||||||
case TaikoAction.LeftCentre: return colours.Red;
|
case TaikoAction.LeftCentre: return colours.Red;
|
||||||
case TaikoAction.RightCentre: return colours.Red;
|
case TaikoAction.RightCentre: return colours.Red;
|
||||||
case TaikoAction.RightRim: return colours.Blue;
|
case TaikoAction.RightRim: return colours.Blue;
|
||||||
}
|
}
|
||||||
#pragma warning restore format
|
#pragma warning restore format
|
||||||
return colours.Red;
|
return colours.Red;
|
||||||
}))();
|
}))();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user