mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 16:02:58 +08:00
Move MenuItemType to correct namespace
This commit is contained in:
parent
9f8c66b8c6
commit
679786c76f
@ -10,7 +10,6 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
@ -101,12 +100,12 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
public ContextMenuItem[] ContextMenuItems => new ContextMenuItem[]
|
||||
{
|
||||
new OsuContextMenuItem(@"Some option"),
|
||||
new OsuContextMenuItem(@"Highlighted option", ContextMenuType.Highlighted),
|
||||
new OsuContextMenuItem(@"Highlighted option", MenuItemType.Highlighted),
|
||||
new OsuContextMenuItem(@"Another option"),
|
||||
new OsuContextMenuItem(@"Choose me please"),
|
||||
new OsuContextMenuItem(@"And me too"),
|
||||
new OsuContextMenuItem(@"Trying to fill"),
|
||||
new OsuContextMenuItem(@"Destructive option", ContextMenuType.Destructive),
|
||||
new OsuContextMenuItem(@"Destructive option", MenuItemType.Destructive),
|
||||
};
|
||||
}
|
||||
|
||||
@ -116,10 +115,10 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
new OsuContextMenuItem(@"Simple option"),
|
||||
new OsuContextMenuItem(@"Simple very very long option"),
|
||||
new OsuContextMenuItem(@"Change width", ContextMenuType.Highlighted) { Action = () => ResizeWidthTo(Width * 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change height", ContextMenuType.Highlighted) { Action = () => ResizeHeightTo(Height * 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change width back", ContextMenuType.Destructive) { Action = () => ResizeWidthTo(Width / 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change height back", ContextMenuType.Destructive) { Action = () => ResizeHeightTo(Height / 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change width", MenuItemType.Highlighted) { Action = () => ResizeWidthTo(Width * 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change height", MenuItemType.Highlighted) { Action = () => ResizeHeightTo(Height * 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change width back", MenuItemType.Destructive) { Action = () => ResizeWidthTo(Width / 2, 100, EasingTypes.OutQuint) },
|
||||
new OsuContextMenuItem(@"Change height back", MenuItemType.Destructive) { Action = () => ResizeHeightTo(Height / 2, 100, EasingTypes.OutQuint) },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// 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
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public enum ContextMenuType
|
||||
public enum MenuItemType
|
||||
{
|
||||
Standard,
|
||||
Highlighted,
|
@ -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;
|
||||
}
|
||||
|
@ -76,9 +76,9 @@
|
||||
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
|
||||
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuContextMenuContainer.cs" />
|
||||
<Compile Include="Graphics\ContextMenuType.cs" />
|
||||
<Compile Include="Graphics\UserInterface\IconButton.cs" />
|
||||
<Compile Include="Configuration\SelectionRandomType.cs" />
|
||||
<Compile Include="Graphics\UserInterface\MenuItemType.cs" />
|
||||
<Compile Include="Graphics\UserInterface\OsuContextMenu.cs" />
|
||||
<Compile Include="Graphics\UserInterface\OsuContextMenuItem.cs" />
|
||||
<Compile Include="Online\API\Requests\GetUsersRequest.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user