1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +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 OsuSpriteText new FillFlowContainer
{ {
Text = @"Score Multiplier:", AutoSizeAxes = Axes.Both,
Font = OsuFont.GetFont(size: 30), Spacing = new Vector2(footer_button_spacing / 2, 0),
Margin = new MarginPadding Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Children = new Drawable[]
{ {
Top = 5, new OsuSpriteText
Right = 10 {
} Text = @"Score Multiplier:",
Font = OsuFont.GetFont(size: 30),
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
},
MultiplierLabel = new OsuSpriteText
{
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold, fixedWidth: true),
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
},
UnrankedLabel = new OsuSpriteText
{
Text = @"(Unranked)",
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
},
},
}, },
MultiplierLabel = new OsuSpriteText
{
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
Margin = new MarginPadding
{
Top = 5
}
},
UnrankedLabel = new OsuSpriteText
{
Text = @"(Unranked)",
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
Margin = new MarginPadding
{
Top = 5,
Left = 10
}
}
} }
} }
}, },