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

@ -44,7 +44,7 @@ namespace osu.Game.Overlays
protected override Container<Drawable> Content => ContentContainer;
protected Sidebar Sidebar;
private SidebarButton selectedSidebarButton;
private SidebarIconButton selectedSidebarButton;
public SettingsSectionsContainer SectionsContainer { get; private set; }
@ -252,11 +252,11 @@ namespace osu.Game.Overlays
});
}
private IEnumerable<SidebarButton> createSidebarButtons()
private IEnumerable<SidebarIconButton> createSidebarButtons()
{
foreach (var section in SectionsContainer)
{
yield return new SidebarButton
yield return new SidebarIconButton
{
Section = section,
Action = () =>