Pretty-ifying test case.

This commit is contained in:
smoogipooo
2017-08-24 17:50:22 +09:00
parent a863eb2a2f
commit c39bb6e647

View File

@ -20,83 +20,76 @@ namespace osu.Desktop.Tests.Visual
{ {
public TestCaseEditorMenuBar() public TestCaseEditorMenuBar()
{ {
Add(new Container Add(new MenuBar
{ {
Anchor = Anchor.Centre, Anchor = Anchor.TopCentre,
Origin = Anchor.Centre, Origin = Anchor.TopCentre,
Width = 500, Y = 50,
Child = new EditorMenuBar Items = new[]
{ {
Items = new[] new EditorMenuBarItem("File")
{ {
new EditorMenuBarItem("File") Items = new[]
{ {
Items = new[] new EditorContextMenuItem("Clear All Notes"),
{ new EditorContextMenuItem("Open Difficulty..."),
new EditorContextMenuItem("Clear All Notes"), new EditorContextMenuItem("Save"),
new EditorContextMenuItem("Open Difficulty..."), new EditorContextMenuItem("Create a new Difficulty..."),
new EditorContextMenuItem("Save"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Create a new Difficulty..."), new EditorContextMenuItem("Revert to Saved"),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Revert to Saved (Full)"),
new EditorContextMenuItem("Revert to Saved"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Revert to Saved (Full)"), new EditorContextMenuItem("Test Beatmap"),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Open AiMod"),
new EditorContextMenuItem("Test Beatmap"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Open AiMod"), new EditorContextMenuItem("Upload Beatmap..."),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Export Package"),
new EditorContextMenuItem("Upload Beatmap..."), new EditorContextMenuItem("Export Map Package"),
new EditorContextMenuItem("Export Package"), new EditorContextMenuItem("Import from..."),
new EditorContextMenuItem("Export Map Package"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Import from..."), new EditorContextMenuItem("Open Song Folder"),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Open .osu in Notepad"),
new EditorContextMenuItem("Open Song Folder"), new EditorContextMenuItem("Open .osb in Notepad"),
new EditorContextMenuItem("Open .osu in Notepad"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Open .osb in Notepad"), new EditorContextMenuItem("Exit"),
new EditorContextMenuSpacer(), }
new EditorContextMenuItem("Exit"), },
} new EditorMenuBarItem("Timing")
}, {
new EditorMenuBarItem("Timing") Items = new[]
{ {
Items = new[] new EditorContextMenuItem("Time Signature"),
{ new EditorContextMenuItem("Metronome Clicks"),
new EditorContextMenuItem("Time Signature"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Metronome Clicks"), new EditorContextMenuItem("Add Timing Section"),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Add Inheriting Section"),
new EditorContextMenuItem("Add Timing Section"), new EditorContextMenuItem("Reset Current Section"),
new EditorContextMenuItem("Add Inheriting Section"), new EditorContextMenuItem("Delete Timing Section"),
new EditorContextMenuItem("Reset Current Section"), new EditorContextMenuItem("Resnap Current Section"),
new EditorContextMenuItem("Delete Timing Section"), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Resnap Current Section"), new EditorContextMenuItem("Timing Setup"),
new EditorContextMenuSpacer(), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Timing Setup"), new EditorContextMenuItem("Resnap All Notes", MenuItemType.Destructive),
new EditorContextMenuSpacer(), new EditorContextMenuItem("Move all notes in time...", MenuItemType.Destructive),
new EditorContextMenuItem("Resnap All Notes", MenuItemType.Destructive), new EditorContextMenuItem("Recalculate Slider Lengths", MenuItemType.Destructive),
new EditorContextMenuItem("Move all notes in time...", MenuItemType.Destructive), new EditorContextMenuItem("Delete All Timing Sections", MenuItemType.Destructive),
new EditorContextMenuItem("Recalculate Slider Lengths", MenuItemType.Destructive), new EditorContextMenuSpacer(),
new EditorContextMenuItem("Delete All Timing Sections", MenuItemType.Destructive), new EditorContextMenuItem("Set Current Position as Preview Point"),
new EditorContextMenuSpacer(), }
new EditorContextMenuItem("Set Current Position as Preview Point"), },
} new EditorMenuBarItem("Testing")
}, {
new EditorMenuBarItem("Testing") Items = new[]
{ {
Items = new[] new EditorContextMenuItem("Item 1"),
{ new EditorContextMenuItem("Item 2"),
new EditorContextMenuItem("Item 1"), new EditorContextMenuItem("Item 3"),
new EditorContextMenuItem("Item 2"), }
new EditorContextMenuItem("Item 3"), },
}
},
}
} }
}); });
} }
private class EditorMenuBar : MenuBar
{
}
private class EditorMenuBarItem : MenuBarItem private class EditorMenuBarItem : MenuBarItem
{ {
private const int fade_duration = 250; private const int fade_duration = 250;