update minor

This commit is contained in:
Gagah Pangeran
2020-07-20 18:37:02 +07:00
parent acbf13ddc4
commit 055e31ddd5
2 changed files with 9 additions and 3 deletions

View File

@ -91,6 +91,7 @@ namespace osu.Game.Beatmaps
public bool LetterboxInBreaks { get; set; }
public bool WidescreenStoryboard { get; set; }
[NotMapped]
public bool EpilepsyWarning { get; set; }
// Editor

View File

@ -51,8 +51,13 @@ namespace osu.Game.Screens.Play
private class EpilepsyWarning : FillFlowContainer
{
public EpilepsyWarning()
public EpilepsyWarning(bool warning)
{
if (warning)
this.Show();
else
this.Hide();
AutoSizeAxes = Axes.Both;
Direction = FillDirection.Vertical;
Children = new Drawable[]
@ -62,7 +67,7 @@ namespace osu.Game.Screens.Play
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Icon = FontAwesome.Solid.ExclamationTriangle,
Size = new Vector2(40)
Size = new Vector2(40),
},
new OsuSpriteText
{
@ -194,7 +199,7 @@ namespace osu.Game.Screens.Play
Margin = new MarginPadding { Top = 20 },
Current = mods
},
new EpilepsyWarning
new EpilepsyWarning(beatmap.BeatmapInfo.EpilepsyWarning)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,