mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 11:03:21 +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)
|
public DrawableOsuMenuItem(MenuItem item)
|
||||||
: base(item)
|
: base(item)
|
||||||
{
|
{
|
||||||
if (!(Item is OsuMenuItem))
|
|
||||||
throw new ArgumentException($"{nameof(item)} must be a {nameof(OsuMenuItem)}.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -70,8 +69,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
private void updateTextColour()
|
private void updateTextColour()
|
||||||
{
|
{
|
||||||
switch (((OsuMenuItem)Item).Type)
|
switch ((Item as OsuMenuItem)?.Type)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
case MenuItemType.Standard:
|
case MenuItemType.Standard:
|
||||||
text.Colour = Color4.White;
|
text.Colour = Color4.White;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user