mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 03:23:03 +08:00
change GetFontSizeByLevel
to return actual font size
This commit is contained in:
parent
5b9bf54f1f
commit
f89c154e18
@ -28,27 +28,25 @@ namespace osu.Game.Graphics.Containers.Markdown
|
|||||||
// Reference for this font size
|
// Reference for this font size
|
||||||
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/bem/osu-md.less#L9
|
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/bem/osu-md.less#L9
|
||||||
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/variables.less#L161
|
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/variables.less#L161
|
||||||
const float base_font_size = 14;
|
|
||||||
|
|
||||||
switch (level)
|
switch (level)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return 30 / base_font_size;
|
return 30;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return 26 / base_font_size;
|
return 26;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
return 20 / base_font_size;
|
return 20;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
return 18 / base_font_size;
|
return 18;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
return 16 / base_font_size;
|
return 16;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 14;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user