1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Small format & comment

This commit is contained in:
Gyoshi 2023-05-23 14:30:35 +02:00
parent ebda35c3c9
commit 37a796306d

View File

@ -402,13 +402,15 @@ namespace osu.Game.Screens.Edit.Compose.Components
for (int tickIndex = 0; tickIndex <= largestDivisor; tickIndex++)
{
int divisor = largestDivisor;
// Find lowest divisor that the tick fits into
foreach (int validDivisor in beatDivisor.ValidDivisors.Value.Presets)
{
if (divisor > validDivisor && (tickIndex * validDivisor) % largestDivisor == 0)
divisor = validDivisor;
}
bool solidTick = divisor * (largestDivisor - tickIndex) == largestDivisor;
AddInternal(new Tick(solidTick, divisor)
bool isSolidTick = divisor * (largestDivisor - tickIndex) == largestDivisor;
AddInternal(new Tick(isSolidTick, divisor)
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre,
@ -417,6 +419,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
X = tickIndex / (float)largestDivisor,
});
}
AddInternal(marker = new Marker());
CurrentNumber.ValueChanged += moveMarker;
CurrentNumber.TriggerChange();