1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:53:01 +08:00

Make font bolder

This commit is contained in:
Dean Herbert 2021-02-02 17:09:59 +09:00
parent 6d9ac4d0f0
commit 40233fb47c

View File

@ -124,102 +124,107 @@ namespace osu.Game.Screens.OnlinePlay
modDisplay.Current.Value = requiredMods.ToArray(); modDisplay.Current.Value = requiredMods.ToArray();
} }
protected override Drawable CreateContent() => maskingContainer = new Container protected override Drawable CreateContent()
{ {
RelativeSizeAxes = Axes.X, Action<SpriteText> fontParameters = s => s.Font = OsuFont.Default.With(weight: FontWeight.SemiBold);
Height = 50,
Masking = true, return maskingContainer = new Container
CornerRadius = 10,
Children = new Drawable[]
{ {
new Box // A transparent box that forces the border to be drawn if the panel background is opaque RelativeSizeAxes = Axes.X,
Height = 50,
Masking = true,
CornerRadius = 10,
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.Both, new Box // A transparent box that forces the border to be drawn if the panel background is opaque
Alpha = 0,
AlwaysPresent = true
},
new PanelBackground
{
RelativeSizeAxes = Axes.Both,
Beatmap = { BindTarget = beatmap }
},
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 8 },
Spacing = new Vector2(8, 0),
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{ {
difficultyIconContainer = new Container RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true
},
new PanelBackground
{
RelativeSizeAxes = Axes.Both,
Beatmap = { BindTarget = beatmap }
},
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 8 },
Spacing = new Vector2(8, 0),
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{ {
Anchor = Anchor.CentreLeft, difficultyIconContainer = new Container
Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both,
},
new FillFlowContainer
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{ {
beatmapText = new LinkFlowContainer { AutoSizeAxes = Axes.Both }, Anchor = Anchor.CentreLeft,
new FillFlowContainer Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both,
},
new FillFlowContainer
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{ {
AutoSizeAxes = Axes.Both, beatmapText = new LinkFlowContainer(fontParameters) { AutoSizeAxes = Axes.Both },
Direction = FillDirection.Horizontal, new FillFlowContainer
Spacing = new Vector2(10f, 0),
Children = new Drawable[]
{ {
new FillFlowContainer AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10f, 0),
Children = new Drawable[]
{ {
AutoSizeAxes = Axes.Both, new FillFlowContainer
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10f, 0),
Children = new Drawable[]
{ {
authorText = new LinkFlowContainer { AutoSizeAxes = Axes.Both }, AutoSizeAxes = Axes.Both,
explicitContentPill = new ExplicitContentBeatmapPill Direction = FillDirection.Horizontal,
Spacing = new Vector2(10f, 0),
Children = new Drawable[]
{ {
Alpha = 0f, authorText = new LinkFlowContainer(fontParameters) { AutoSizeAxes = Axes.Both },
Anchor = Anchor.CentreLeft, explicitContentPill = new ExplicitContentBeatmapPill
Origin = Anchor.CentreLeft, {
Margin = new MarginPadding { Top = 3f }, Alpha = 0f,
} Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Margin = new MarginPadding { Top = 3f },
}
},
}, },
}, new Container
new Container
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both,
Child = modDisplay = new ModDisplay
{ {
Scale = new Vector2(0.4f), Anchor = Anchor.CentreLeft,
DisplayUnrankedText = false, Origin = Anchor.CentreLeft,
ExpansionMode = ExpansionMode.AlwaysExpanded AutoSizeAxes = Axes.Both,
Child = modDisplay = new ModDisplay
{
Scale = new Vector2(0.4f),
DisplayUnrankedText = false,
ExpansionMode = ExpansionMode.AlwaysExpanded
}
} }
} }
} }
} }
} }
} }
},
new FillFlowContainer
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(5),
X = -10,
ChildrenEnumerable = CreateButtons()
} }
},
new FillFlowContainer
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(5),
X = -10,
ChildrenEnumerable = CreateButtons()
} }
} };
}; }
protected virtual IEnumerable<Drawable> CreateButtons() => protected virtual IEnumerable<Drawable> CreateButtons() =>
new Drawable[] new Drawable[]