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

Move customisation panel to be in same area as main content

This commit is contained in:
Dean Herbert 2020-12-07 16:42:55 +09:00
parent 15e0ea332b
commit 7253866e17

View File

@ -157,6 +157,11 @@ namespace osu.Game.Overlays.Mods
}, },
}, },
new Drawable[] new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{ {
// Body // Body
new OsuScrollContainer new OsuScrollContainer
@ -170,7 +175,9 @@ namespace osu.Game.Overlays.Mods
Vertical = 10, Vertical = 10,
Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING
}, },
Child = ModSectionsContainer = new FillFlowContainer<ModSection> Children = new Drawable[]
{
ModSectionsContainer = new FillFlowContainer<ModSection>
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
@ -189,6 +196,19 @@ namespace osu.Game.Overlays.Mods
new FunSection { Action = modButtonPressed }, new FunSection { Action = modButtonPressed },
} }
}, },
}
},
ModSettingsContainer = new ModSettingsContainer
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Width = 0.3f,
Alpha = 0,
Padding = new MarginPadding(30),
SelectedMods = { BindTarget = SelectedMods },
},
}
}, },
}, },
new Drawable[] new Drawable[]
@ -281,16 +301,6 @@ namespace osu.Game.Overlays.Mods
}, },
}, },
}, },
ModSettingsContainer = new ModSettingsContainer
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Width = 0.25f,
Alpha = 0,
X = -100,
SelectedMods = { BindTarget = SelectedMods },
}
}; };
((IBindable<bool>)CustomiseButton.Enabled).BindTo(ModSettingsContainer.HasSettingsForSelection); ((IBindable<bool>)CustomiseButton.Enabled).BindTo(ModSettingsContainer.HasSettingsForSelection);