1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 01:22:59 +08:00

Fix bar lines ("down beat" as people call it) showing up too often in timeline

This commit is contained in:
Dean Herbert 2020-10-09 18:35:44 +09:00
parent a6d19cd2d6
commit 21c6242f90

View File

@ -112,13 +112,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
if (beat == 0 && i == 0)
nextMinTick = float.MinValue;
var indexInBeat = beat % beatDivisor.Value;
var indexInBar = beat % ((int)point.TimeSignature * beatDivisor.Value);
var divisor = BindableBeatDivisor.GetDivisorForBeatIndex(beat, beatDivisor.Value);
var colour = BindableBeatDivisor.GetColourFor(divisor, colours);
// even though "bar lines" take up the full vertical space, we render them in two pieces because it allows for less anchor/origin churn.
var height = indexInBeat == 0 ? 0.5f : 0.1f - (float)divisor / highestDivisor * 0.08f;
var height = indexInBar == 0 ? 0.5f : 0.1f - (float)divisor / highestDivisor * 0.08f;
var topPoint = getNextUsablePoint();
topPoint.X = xPos;