mirror of
https://github.com/ppy/osu.git
synced 2025-02-26 05:22:54 +08:00
Improve centre input size fitting for legacy skins
This commit is contained in:
parent
ac17c047f6
commit
6f99455d94
@ -18,6 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
/// </summary>
|
||||
internal class LegacyInputDrum : Container
|
||||
{
|
||||
public float centre_size = 0.5f;
|
||||
private LegacyHalfDrum left;
|
||||
private LegacyHalfDrum right;
|
||||
private Container content;
|
||||
|
@ -150,7 +150,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
Vector2 inputPositionToDrumCentreDelta = touchInputDrum.ToLocalSpace(inputPosition) - touchInputDrum.OriginPosition;
|
||||
|
||||
float inputDrumRadius = Math.Max(touchInputDrum.Width, touchInputDrum.DrawHeight) / 2f;
|
||||
float centreRadius = (inputDrumRadius * InputDrum.centre_size);
|
||||
float centreRadius = (inputDrumRadius * touchInputDrum.centre_size);
|
||||
return inputPositionToDrumCentreDelta.Length <= centreRadius;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
/// </summary>
|
||||
internal class InputDrum : Container
|
||||
{
|
||||
public const float centre_size = 0.7f;
|
||||
public float centre_size = 0.7f;
|
||||
private const float middle_split = 0.025f;
|
||||
|
||||
public InputDrum()
|
||||
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
Scale = new Vector2(0.9f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TaikoHalfDrum(false)
|
||||
new TaikoHalfDrum(false, centre_size)
|
||||
{
|
||||
Name = "Left Half",
|
||||
Anchor = Anchor.Centre,
|
||||
@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
RimAction = TaikoAction.LeftRim,
|
||||
CentreAction = TaikoAction.LeftCentre
|
||||
},
|
||||
new TaikoHalfDrum(true)
|
||||
new TaikoHalfDrum(true, centre_size)
|
||||
{
|
||||
Name = "Right Half",
|
||||
Anchor = Anchor.Centre,
|
||||
@ -87,7 +87,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
private readonly Sprite centre;
|
||||
private readonly Sprite centreHit;
|
||||
|
||||
public TaikoHalfDrum(bool flipped)
|
||||
public TaikoHalfDrum(bool flipped, float centre_size)
|
||||
{
|
||||
Masking = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user