mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into hoverable-timestamps
This commit is contained in:
@ -59,9 +59,9 @@ namespace osu.Game.Graphics.Containers
|
||||
Track track = null;
|
||||
IBeatmap beatmap = null;
|
||||
|
||||
double currentTrackTime;
|
||||
TimingControlPoint timingPoint;
|
||||
EffectControlPoint effectPoint;
|
||||
double currentTrackTime = 0;
|
||||
TimingControlPoint timingPoint = null;
|
||||
EffectControlPoint effectPoint = null;
|
||||
|
||||
if (Beatmap.Value.TrackLoaded && Beatmap.Value.BeatmapLoaded)
|
||||
{
|
||||
@ -69,24 +69,18 @@ namespace osu.Game.Graphics.Containers
|
||||
beatmap = Beatmap.Value.Beatmap;
|
||||
}
|
||||
|
||||
if (track != null && beatmap != null && track.IsRunning)
|
||||
if (track != null && beatmap != null && track.IsRunning && track.Length > 0)
|
||||
{
|
||||
currentTrackTime = track.Length > 0 ? track.CurrentTime + EarlyActivationMilliseconds : Clock.CurrentTime;
|
||||
currentTrackTime = track.CurrentTime + EarlyActivationMilliseconds;
|
||||
|
||||
timingPoint = beatmap.ControlPointInfo.TimingPointAt(currentTrackTime);
|
||||
effectPoint = beatmap.ControlPointInfo.EffectPointAt(currentTrackTime);
|
||||
|
||||
if (timingPoint.BeatLength == 0)
|
||||
{
|
||||
IsBeatSyncedWithTrack = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IsBeatSyncedWithTrack = true;
|
||||
}
|
||||
else
|
||||
|
||||
IsBeatSyncedWithTrack = timingPoint?.BeatLength > 0;
|
||||
|
||||
if (timingPoint == null || !IsBeatSyncedWithTrack)
|
||||
{
|
||||
IsBeatSyncedWithTrack = false;
|
||||
currentTrackTime = Clock.CurrentTime;
|
||||
timingPoint = defaultTiming;
|
||||
effectPoint = defaultEffect;
|
||||
|
@ -49,14 +49,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public GradientLine()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Size = new Vector2(0.8f, 1.5f);
|
||||
|
||||
ColumnDimensions = new[]
|
||||
{
|
||||
new Dimension(),
|
||||
new Dimension(mode: GridSizeMode.Relative, size: 0.4f),
|
||||
new Dimension(),
|
||||
};
|
||||
Size = new Vector2(0.8f, 1f);
|
||||
|
||||
Content = new[]
|
||||
{
|
||||
@ -65,16 +58,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Color4.White)
|
||||
Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Colour)
|
||||
},
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.Transparent)
|
||||
Colour = ColourInfo.GradientHorizontal(Colour, Color4.Transparent)
|
||||
},
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user