1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 07:32:55 +08:00

Fix vertical spacing and score multiplier splitting apart

Also cleans up margin and its hacks (alignment done with anchor/origin now).
This commit is contained in:
Joehu 2020-04-23 22:41:38 -07:00
parent abb687286b
commit 118db03b56

View File

@ -57,6 +57,8 @@ namespace osu.Game.Overlays.Mods
protected Color4 HighMultiplierColour; protected Color4 HighMultiplierColour;
private const float content_width = 0.8f; private const float content_width = 0.8f;
private const float footer_button_spacing = 20;
private readonly FillFlowContainer footerContainer; private readonly FillFlowContainer footerContainer;
private SampleChannel sampleOn, sampleOff; private SampleChannel sampleOn, sampleOff;
@ -216,6 +218,7 @@ namespace osu.Game.Overlays.Mods
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Width = content_width, Width = content_width,
Spacing = new Vector2(footer_button_spacing, footer_button_spacing / 2),
Padding = new MarginPadding Padding = new MarginPadding
{ {
Vertical = 15, Vertical = 15,
@ -228,10 +231,8 @@ namespace osu.Game.Overlays.Mods
Width = 180, Width = 180,
Text = "Deselect All", Text = "Deselect All",
Action = DeselectAll, Action = DeselectAll,
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Right = 20
}
}, },
CustomiseButton = new TriangleButton CustomiseButton = new TriangleButton
{ {
@ -239,49 +240,47 @@ namespace osu.Game.Overlays.Mods
Text = "Customisation", Text = "Customisation",
Action = () => ModSettingsContainer.Alpha = ModSettingsContainer.Alpha == 1 ? 0 : 1, Action = () => ModSettingsContainer.Alpha = ModSettingsContainer.Alpha == 1 ? 0 : 1,
Enabled = { Value = false }, Enabled = { Value = false },
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Right = 20
}
}, },
CloseButton = new TriangleButton CloseButton = new TriangleButton
{ {
Width = 180, Width = 180,
Text = "Close", Text = "Close",
Action = Hide, Action = Hide,
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Right = 20
}
}, },
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(footer_button_spacing / 2, 0),
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Children = new Drawable[]
{
new OsuSpriteText new OsuSpriteText
{ {
Text = @"Score Multiplier:", Text = @"Score Multiplier:",
Font = OsuFont.GetFont(size: 30), Font = OsuFont.GetFont(size: 30),
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Top = 5,
Right = 10
}
}, },
MultiplierLabel = new OsuSpriteText MultiplierLabel = new OsuSpriteText
{ {
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold), Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold, fixedWidth: true),
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Top = 5
}
}, },
UnrankedLabel = new OsuSpriteText UnrankedLabel = new OsuSpriteText
{ {
Text = @"(Unranked)", Text = @"(Unranked)",
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold), Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
Margin = new MarginPadding Origin = Anchor.CentreLeft,
{ Anchor = Anchor.CentreLeft,
Top = 5, },
Left = 10 },
} },
}
} }
} }
}, },