mirror of
https://github.com/ppy/osu.git
synced 2024-12-21 03:12:54 +08:00
Merge branch 'master' of https://github.com/josh-codes/osu
This commit is contained in:
commit
e41f5ac4b9
@ -4,7 +4,6 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using Markdig.Syntax;
|
using Markdig.Syntax;
|
||||||
using Markdig.Syntax.Inlines;
|
|
||||||
using osu.Framework.Graphics.Containers.Markdown;
|
using osu.Framework.Graphics.Containers.Markdown;
|
||||||
using osu.Game.Graphics.Containers.Markdown;
|
using osu.Game.Graphics.Containers.Markdown;
|
||||||
|
|
||||||
@ -12,16 +11,8 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
public class CommentMarkdownContainer : OsuMarkdownContainer
|
public class CommentMarkdownContainer : OsuMarkdownContainer
|
||||||
{
|
{
|
||||||
public override MarkdownTextFlowContainer CreateTextFlow() => new CommentMarkdownTextFlowContainer();
|
|
||||||
|
|
||||||
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock) => new CommentMarkdownHeading(headingBlock);
|
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock) => new CommentMarkdownHeading(headingBlock);
|
||||||
|
|
||||||
private class CommentMarkdownTextFlowContainer : OsuMarkdownTextFlowContainer
|
|
||||||
{
|
|
||||||
// Don't render image in comment for now
|
|
||||||
protected override void AddImage(LinkInline linkInline) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
private class CommentMarkdownHeading : OsuMarkdownHeading
|
private class CommentMarkdownHeading : OsuMarkdownHeading
|
||||||
{
|
{
|
||||||
public CommentMarkdownHeading(HeadingBlock headingBlock)
|
public CommentMarkdownHeading(HeadingBlock headingBlock)
|
||||||
|
@ -94,6 +94,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
double objectOffsetCurrent = currentTime - FirstHitTime;
|
double objectOffsetCurrent = currentTime - FirstHitTime;
|
||||||
|
|
||||||
double objectDuration = LastHitTime - FirstHitTime;
|
double objectDuration = LastHitTime - FirstHitTime;
|
||||||
|
if (objectDuration == 0)
|
||||||
|
UpdateProgress(0, false);
|
||||||
|
else
|
||||||
UpdateProgress(objectOffsetCurrent / objectDuration, false);
|
UpdateProgress(objectOffsetCurrent / objectDuration, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user