Move MenuItemType to correct namespace

This commit is contained in:
Dean Herbert
2017-06-13 15:20:21 +09:00
parent 9f8c66b8c6
commit 679786c76f
4 changed files with 14 additions and 15 deletions

View File

@ -0,0 +1,12 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Graphics.UserInterface
{
public enum MenuItemType
{
Standard,
Highlighted,
Destructive,
}
}

View File

@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
private SampleChannel sampleClick;
private SampleChannel sampleHover;
private readonly ContextMenuType type;
private readonly MenuItemType type;
protected override Container CreateTextContainer(string title) => new Container
{
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
}
};
public OsuContextMenuItem(string title, ContextMenuType type = ContextMenuType.Standard) : base(title)
public OsuContextMenuItem(string title, MenuItemType type = MenuItemType.Standard) : base(title)
{
this.type = type;
}
@ -78,13 +78,13 @@ namespace osu.Game.Graphics.UserInterface
{
switch (type)
{
case ContextMenuType.Standard:
case MenuItemType.Standard:
textBold.Colour = text.Colour = Color4.White;
break;
case ContextMenuType.Destructive:
case MenuItemType.Destructive:
textBold.Colour = text.Colour = Color4.Red;
break;
case ContextMenuType.Highlighted:
case MenuItemType.Highlighted:
textBold.Colour = text.Colour = OsuColour.FromHex(@"ffcc22");
break;
}