1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-24 09:37:19 +08:00

create list marker based on its level

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-04-30 10:40:06 +07:00
parent f676526cf4
commit 781064ba96
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -43,7 +43,7 @@ namespace osu.Game.Graphics.Containers.Markdown
private void load()
{
var marker = parentTextComponent.CreateSpriteText();
marker.Text = "●";
marker.Text = createTextMarker();
marker.Font = OsuFont.GetFont(size: marker.Font.Size / 2);
marker.Origin = Anchor.Centre;
marker.X = -default_left_padding / 2;
@ -51,5 +51,20 @@ namespace osu.Game.Graphics.Containers.Markdown
AddInternal(marker);
}
private string createTextMarker()
{
switch (level)
{
case 1:
return "●";
case 2:
return "○";
default:
return "■";
}
}
}
}