Make the settings sidebar optional

Also removes an unnecessary secondary list of SidebarButtons by using generic containers.
This commit is contained in:
Dean Herbert
2017-08-14 14:40:48 +09:00
parent 66fa84a451
commit dccefe1c0e
4 changed files with 81 additions and 62 deletions

View File

@ -14,12 +14,12 @@ using osu.Game.Overlays.Toolbar;
namespace osu.Game.Overlays.Settings
{
public class Sidebar : Container, IStateful<ExpandedState>
public class Sidebar : Container<SidebarButton>, IStateful<ExpandedState>
{
private readonly FillFlowContainer content;
private readonly FillFlowContainer<SidebarButton> content;
internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
internal const int EXPANDED_WIDTH = 200;
protected override Container<Drawable> Content => content;
protected override Container<SidebarButton> Content => content;
public Sidebar()
{
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Settings
{
Children = new[]
{
content = new FillFlowContainer
content = new FillFlowContainer<SidebarButton>
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,