2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-09-29 19:13:58 +08:00
|
|
|
|
|
2017-03-14 22:18:40 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2017-03-14 19:53:20 +08:00
|
|
|
|
using OpenTK.Graphics;
|
2017-02-17 17:59:30 +08:00
|
|
|
|
using osu.Framework.Screens;
|
2016-11-14 16:23:33 +08:00
|
|
|
|
using osu.Game.Screens.Backgrounds;
|
2017-03-14 22:18:40 +08:00
|
|
|
|
using osu.Game.Screens.Select;
|
2017-07-15 00:18:12 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-08-28 16:55:50 +08:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Screens.Edit.Menus;
|
2016-09-29 19:13:58 +08:00
|
|
|
|
|
2016-11-14 16:23:33 +08:00
|
|
|
|
namespace osu.Game.Screens.Edit
|
2016-09-29 19:13:58 +08:00
|
|
|
|
{
|
2017-03-07 09:59:19 +08:00
|
|
|
|
internal class Editor : ScreenWhiteBox
|
2016-09-29 19:13:58 +08:00
|
|
|
|
{
|
2017-03-14 22:27:24 +08:00
|
|
|
|
protected override IEnumerable<Type> PossibleChildren => new[] { typeof(EditSongSelect) };
|
2017-03-14 19:53:20 +08:00
|
|
|
|
|
2017-02-17 17:59:30 +08:00
|
|
|
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
2016-10-05 19:03:52 +08:00
|
|
|
|
|
2017-08-28 16:55:50 +08:00
|
|
|
|
internal override bool ShowOverlays => false;
|
|
|
|
|
|
|
|
|
|
public Editor()
|
|
|
|
|
{
|
|
|
|
|
Add(new Container
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Height = 40,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = OsuColour.FromHex("111")
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBar
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
|
X = 100,
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuBarItem("File")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Clear all notes"),
|
|
|
|
|
new EditorMenuItem("Open difficulty..."),
|
|
|
|
|
new EditorMenuItem("Save"),
|
|
|
|
|
new EditorMenuItem("Create new difficulty..."),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Revert to saved"),
|
|
|
|
|
new EditorMenuItem("Revert to saved (full"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Test beatmap"),
|
|
|
|
|
new EditorMenuItem("Open AiMod"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Upload Beatmap..."),
|
|
|
|
|
new EditorMenuItem("Export package"),
|
|
|
|
|
new EditorMenuItem("Export map package"),
|
|
|
|
|
new EditorMenuItem("Import from..."),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Open song folder"),
|
|
|
|
|
new EditorMenuItem("Open .osu in Notepad"),
|
|
|
|
|
new EditorMenuItem("Open .osb in Notepad"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Exit", MenuItemType.Standard, Exit)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Edit")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Undo"),
|
|
|
|
|
new EditorMenuItem("Redo"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Cut"),
|
|
|
|
|
new EditorMenuItem("Copy"),
|
|
|
|
|
new EditorMenuItem("Paste"),
|
|
|
|
|
new EditorMenuItem("Delete"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Select all"),
|
|
|
|
|
new EditorMenuItem("Clone"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Reverse selection"),
|
|
|
|
|
new EditorMenuItem("Flip horizontally"),
|
|
|
|
|
new EditorMenuItem("Flip vertically"),
|
|
|
|
|
new EditorMenuItem("Rotate 90deg clockwise"),
|
|
|
|
|
new EditorMenuItem("Rotate 90deg anticlockwise"),
|
|
|
|
|
new EditorMenuItem("Rotate by..."),
|
|
|
|
|
new EditorMenuItem("Scale by..."),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Reset selected objects' samples"),
|
|
|
|
|
new EditorMenuItem("Reset all samples", MenuItemType.Destructive),
|
|
|
|
|
new EditorMenuItem("Reset combo colours", MenuItemType.Destructive),
|
|
|
|
|
new EditorMenuItem("Reset breaks", MenuItemType.Destructive),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Nudge backward"),
|
|
|
|
|
new EditorMenuItem("Nudge forward")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("View")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Compose"),
|
|
|
|
|
new EditorMenuItem("Design"),
|
|
|
|
|
new EditorMenuItem("Timing"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Song setup..."),
|
|
|
|
|
new EditorMenuItem("Timing setup..."),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Volume"),
|
|
|
|
|
new EditorMenuItem("Grid level"),
|
|
|
|
|
new EditorMenuItem("Show video"),
|
|
|
|
|
new EditorMenuItem("Show sample name"),
|
|
|
|
|
new EditorMenuItem("Snaking sliders"),
|
|
|
|
|
new EditorMenuItem("Hit animations"),
|
|
|
|
|
new EditorMenuItem("Follow points"),
|
|
|
|
|
new EditorMenuItem("Stacking")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Compose")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Snap divisor"),
|
|
|
|
|
new EditorMenuItem("Audio rate"),
|
|
|
|
|
new EditorMenuItem("Grid snapping"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Create polygon cricles..."),
|
|
|
|
|
new EditorMenuItem("Convert slider to stream"),
|
|
|
|
|
new EditorMenuItem("Enable live mapping mode"),
|
|
|
|
|
new EditorMenuItem("Sample import")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Design")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Move all elements in time...")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Timing")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Time signature"),
|
|
|
|
|
new EditorMenuItem("Metronome clicks"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Add timing section"),
|
|
|
|
|
new EditorMenuItem("Add inheriting section"),
|
|
|
|
|
new EditorMenuItem("Reset current section"),
|
|
|
|
|
new EditorMenuItem("Delete timing section"),
|
|
|
|
|
new EditorMenuItem("Resnap current section"),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Timing setup..."),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Resnap all notes", MenuItemType.Destructive),
|
|
|
|
|
new EditorMenuItem("Move all notes in time...", MenuItemType.Destructive),
|
|
|
|
|
new EditorMenuItem("Recalculate slider lengths", MenuItemType.Destructive),
|
|
|
|
|
new EditorMenuItem("Delete all timing sections", MenuItemType.Destructive),
|
2017-09-07 22:06:35 +08:00
|
|
|
|
new EditorMenuItemSpacer(),
|
2017-08-28 16:55:50 +08:00
|
|
|
|
new EditorMenuItem("Set current position as preview point")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Web")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("This Beatmap's information page"),
|
|
|
|
|
new EditorMenuItem("This Beatmap's thread"),
|
|
|
|
|
new EditorMenuItem("Quick reply")
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new EditorMenuBarItem("Help")
|
|
|
|
|
{
|
|
|
|
|
Items = new[]
|
|
|
|
|
{
|
|
|
|
|
new EditorMenuItem("Show in-game help"),
|
|
|
|
|
new EditorMenuItem("View FAQ")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-14 22:18:40 +08:00
|
|
|
|
protected override void OnResuming(Screen last)
|
|
|
|
|
{
|
2017-07-19 12:32:16 +08:00
|
|
|
|
Beatmap.Value.Track?.Stop();
|
2017-03-14 22:18:40 +08:00
|
|
|
|
base.OnResuming(last);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-17 17:59:30 +08:00
|
|
|
|
protected override void OnEntering(Screen last)
|
2016-10-05 19:03:52 +08:00
|
|
|
|
{
|
|
|
|
|
base.OnEntering(last);
|
2017-06-08 13:51:22 +08:00
|
|
|
|
Background.FadeColour(Color4.DarkGray, 500);
|
2017-07-19 12:32:16 +08:00
|
|
|
|
Beatmap.Value.Track?.Stop();
|
2016-10-05 19:03:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-02-17 17:59:30 +08:00
|
|
|
|
protected override bool OnExiting(Screen next)
|
2016-10-05 19:03:52 +08:00
|
|
|
|
{
|
2017-06-08 13:51:22 +08:00
|
|
|
|
Background.FadeColour(Color4.White, 500);
|
2017-07-19 12:32:16 +08:00
|
|
|
|
Beatmap.Value.Track?.Start();
|
2016-10-07 17:58:20 +08:00
|
|
|
|
return base.OnExiting(next);
|
2016-10-05 19:03:52 +08:00
|
|
|
|
}
|
2016-09-29 19:13:58 +08:00
|
|
|
|
}
|
|
|
|
|
}
|