1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 16:25:32 +08:00

Fix field containers padding being wrong.

This commit is contained in:
DrabWeb 2018-06-06 05:20:03 -03:00
parent fe73dbd58c
commit a81fc9eb5d

View File

@ -9,6 +9,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer;
using osu.Game.Overlays.SearchableList;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -17,6 +18,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
public class RoomSettingsOverlay : OverlayContainer public class RoomSettingsOverlay : OverlayContainer
{ {
private const float transition_duration = 500; private const float transition_duration = 500;
private const float field_padding = 45;
private readonly Container content; private readonly Container content;
private readonly SettingsTextBox name, maxParticipants; private readonly SettingsTextBox name, maxParticipants;
@ -57,11 +59,12 @@ namespace osu.Game.Screens.Multi.Screens.Match
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 35, Bottom = 75, Horizontal = 50 }, Padding = new MarginPadding { Top = 35, Bottom = 75, Horizontal = SearchableListOverlay.WIDTH_PADDING },
Children = new[] Children = new[]
{ {
new SectionContainer new SectionContainer
{ {
Padding = new MarginPadding { Right = field_padding / 2 },
Children = new[] Children = new[]
{ {
new Section("ROOM NAME") new Section("ROOM NAME")
@ -82,6 +85,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
{ {
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
Padding = new MarginPadding { Left = field_padding / 2 },
Children = new[] Children = new[]
{ {
new Section("MAX PARTICIPANTS") new Section("MAX PARTICIPANTS")
@ -192,9 +196,9 @@ namespace osu.Game.Screens.Multi.Screens.Match
public SectionContainer() public SectionContainer()
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
Width = 0.45f; Width = 0.5f;
Direction = FillDirection.Vertical; Direction = FillDirection.Vertical;
Spacing = new Vector2(45); Spacing = new Vector2(field_padding);
} }
} }