mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 14:47:22 +09:00
Merge pull request #10227 from peppy/editor-negative-current-time
Fix editor not showing sign when time goes negative
This commit is contained in:
commit
ad30c20b8c
@ -22,10 +22,12 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
{
|
{
|
||||||
trackTimer = new OsuSpriteText
|
trackTimer = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Origin = Anchor.BottomLeft,
|
Anchor = Anchor.CentreRight,
|
||||||
RelativePositionAxes = Axes.Y,
|
Origin = Anchor.CentreRight,
|
||||||
Font = OsuFont.GetFont(size: 22, fixedWidth: true),
|
// intentionally fudged centre to avoid movement of the number portion when
|
||||||
Y = 0.5f,
|
// going negative.
|
||||||
|
X = -35,
|
||||||
|
Font = OsuFont.GetFont(size: 25, fixedWidth: true),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -34,7 +36,8 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
trackTimer.Text = TimeSpan.FromMilliseconds(editorClock.CurrentTime).ToString(@"mm\:ss\:fff");
|
var timespan = TimeSpan.FromMilliseconds(editorClock.CurrentTime);
|
||||||
|
trackTimer.Text = $"{(timespan < TimeSpan.Zero ? "-" : string.Empty)}{timespan:mm\\:ss\\:fff}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user