Share sidebar colouring logic by splitting out SidebarIconButton

This commit is contained in:
Bartłomiej Dach
2021-10-09 20:43:18 +02:00
parent b8616bf910
commit fe26d8e8df
5 changed files with 149 additions and 124 deletions

View File

@ -16,16 +16,16 @@ using osuTK;
namespace osu.Game.Overlays.Settings
{
public class Sidebar : Container<SidebarButton>, IStateful<ExpandedState>
public class Sidebar : Container<SidebarIconButton>, IStateful<ExpandedState>
{
private readonly Box background;
private readonly FillFlowContainer<SidebarButton> content;
private readonly FillFlowContainer<SidebarIconButton> content;
public const float DEFAULT_WIDTH = 70;
public const int EXPANDED_WIDTH = 200;
public event Action<ExpandedState> StateChanged;
protected override Container<SidebarButton> Content => content;
protected override Container<SidebarIconButton> Content => content;
public Sidebar()
{
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Settings
{
Children = new[]
{
content = new FillFlowContainer<SidebarButton>
content = new FillFlowContainer<SidebarIconButton>
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,