mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
Fix checkmarks not showing on editor stateful menu items
This commit is contained in:
parent
cab4299f0c
commit
e551a53601
@ -110,11 +110,31 @@ namespace osu.Game.Screens.Edit.Components.Menus
|
||||
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
Block a user