1
0
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:
smoogipooo 2017-08-28 15:44:28 +09:00
commit 9142e75610

View File

@ -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;