mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Update beat divisor control to show ticks in more visually correct locations
As proposed in https://github.com/ppy/osu/discussions/23527.
This commit is contained in:
parent
ec2b9165d5
commit
87ff28b022
@ -410,6 +410,16 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
});
|
||||
}
|
||||
|
||||
// Add a fake 1/1 at the end to give context.
|
||||
AddInternal(new Tick(1)
|
||||
{
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.Centre,
|
||||
Depth = float.MaxValue,
|
||||
Alpha = 0.05f,
|
||||
Colour = BindableBeatDivisor.GetColourFor(1, colours),
|
||||
});
|
||||
|
||||
AddInternal(marker = new Marker());
|
||||
CurrentNumber.ValueChanged += moveMarker;
|
||||
CurrentNumber.TriggerChange();
|
||||
@ -483,7 +493,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
OnUserChange(Current.Value);
|
||||
}
|
||||
|
||||
private float getMappedPosition(float divisor) => MathF.Pow((divisor - 1) / (beatDivisor.ValidDivisors.Value.Presets.Last() - 1), 0.90f);
|
||||
private float getMappedPosition(float divisor) => 1 - 1 / divisor;
|
||||
|
||||
private partial class Tick : Circle
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user