mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
Merge pull request #30834 from peppy/fix-song-ticker-contrast
Fix song ticker having very bad contrast against bright backgrounds
This commit is contained in:
commit
7a973b0243
@ -8,6 +8,9 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics.Effects;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
@ -27,26 +30,60 @@ namespace osu.Game.Screens.Menu
|
|||||||
public SongTicker()
|
public SongTicker()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Child = new FillFlowContainer
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
new Container
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Spacing = new Vector2(0, 3),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
title = new OsuSpriteText
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
Position = new Vector2(5, -5),
|
||||||
|
Padding = new MarginPadding(-5),
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
new CircularContainer
|
||||||
Origin = Anchor.TopRight,
|
{
|
||||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light, italics: true)
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
Masking = true,
|
||||||
artist = new OsuSpriteText
|
EdgeEffect = new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Radius = 75,
|
||||||
Origin = Anchor.TopRight,
|
Type = EdgeEffectType.Shadow,
|
||||||
Font = OsuFont.GetFont(size: 16)
|
Colour = OsuColour.Gray(0.04f).Opacity(0.3f),
|
||||||
|
},
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
AlwaysPresent = true,
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 3),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
title = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light, italics: true)
|
||||||
|
},
|
||||||
|
artist = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
Font = OsuFont.GetFont(size: 16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user