mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 04:22:54 +08:00
Merge branch 'menu-mvvm' into menu-bar
This commit is contained in:
commit
9142e75610
@ -52,8 +52,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public DrawableOsuMenuItem(MenuItem item)
|
||||
: base(item)
|
||||
{
|
||||
if (!(Item is OsuMenuItem))
|
||||
throw new ArgumentException($"{nameof(item)} must be a {nameof(OsuMenuItem)}.");
|
||||
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -70,8 +69,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private void updateTextColour()
|
||||
{
|
||||
switch (((OsuMenuItem)Item).Type)
|
||||
switch ((Item as OsuMenuItem)?.Type)
|
||||
{
|
||||
default:
|
||||
case MenuItemType.Standard:
|
||||
text.Colour = Color4.White;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user