mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 15:32:55 +08:00
Small format & comment
This commit is contained in:
parent
ebda35c3c9
commit
37a796306d
@ -402,13 +402,15 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
for (int tickIndex = 0; tickIndex <= largestDivisor; tickIndex++)
|
for (int tickIndex = 0; tickIndex <= largestDivisor; tickIndex++)
|
||||||
{
|
{
|
||||||
int divisor = largestDivisor;
|
int divisor = largestDivisor;
|
||||||
|
// Find lowest divisor that the tick fits into
|
||||||
foreach (int validDivisor in beatDivisor.ValidDivisors.Value.Presets)
|
foreach (int validDivisor in beatDivisor.ValidDivisors.Value.Presets)
|
||||||
{
|
{
|
||||||
if (divisor > validDivisor && (tickIndex * validDivisor) % largestDivisor == 0)
|
if (divisor > validDivisor && (tickIndex * validDivisor) % largestDivisor == 0)
|
||||||
divisor = validDivisor;
|
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,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -417,6 +419,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
X = tickIndex / (float)largestDivisor,
|
X = tickIndex / (float)largestDivisor,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
AddInternal(marker = new Marker());
|
AddInternal(marker = new Marker());
|
||||||
CurrentNumber.ValueChanged += moveMarker;
|
CurrentNumber.ValueChanged += moveMarker;
|
||||||
CurrentNumber.TriggerChange();
|
CurrentNumber.TriggerChange();
|
||||||
|
Loading…
Reference in New Issue
Block a user