mirror of https://github.com/ppy/osu
Merge pull request #18432 from Joehuu/fix-editor-menu-item-checks
Fix checkmarks not showing on editor stateful menu items
This commit is contained in:
commit
27cb9d1ead
|
@ -110,11 +110,31 @@ protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item)
|
|||
case EditorMenuItemSpacer spacer:
|
||||
return new DrawableSpacer(spacer);
|
||||
|
||||
case StatefulMenuItem stateful:
|
||||
return new EditorStatefulMenuItem(stateful);
|
||||
|
||||
default:
|
||||
return new EditorMenuItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
private class EditorStatefulMenuItem : DrawableStatefulMenuItem
|
||||
{
|
||||
public EditorStatefulMenuItem(StatefulMenuItem item)
|
||||
: base(item)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
BackgroundColour = colourProvider.Background2;
|
||||
BackgroundColourHover = colourProvider.Background1;
|
||||
|
||||
Foreground.Padding = new MarginPadding { Vertical = 2 };
|
||||
}
|
||||
}
|
||||
|
||||
private class EditorMenuItem : DrawableOsuMenuItem
|
||||
{
|
||||
public EditorMenuItem(MenuItem item)
|
||||
|
|
Loading…
Reference in New Issue