public TestCaseBeatmapOptionsOverlay() { var overlay = new BeatmapOptionsOverlay(); overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, Color4.Purple, null, Key.Number1); overlay.AddButton(@"Clear", @"local scores", FontAwesome.fa_eraser, Color4.Purple, null, Key.Number2); overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.fa_pencil, Color4.Yellow, null, Key.Number3); overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, Color4.Pink, null, Key.Number4, float.MaxValue); Add(overlay); AddStep(@"Toggle", overlay.ToggleVisibility); }
public TestSceneBeatmapOptionsOverlay() { var overlay = new BeatmapOptionsOverlay(); overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, Color4.Purple, null, Key.Number1); overlay.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, Color4.Purple, null, Key.Number2); overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.Solid.PencilAlt, Color4.Yellow, null, Key.Number3); overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.Solid.Trash, Color4.Pink, null, Key.Number4, float.MaxValue); Add(overlay); AddStep(@"Toggle", overlay.ToggleVisibility); }
public TestSceneBeatmapOptionsOverlay() { var overlay = new BeatmapOptionsOverlay(); var colours = new OsuColour(); overlay.AddButton(@"Manage", @"collections", FontAwesome.Solid.Book, colours.Green, null); overlay.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, null); overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null); overlay.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, colours.Purple, null); overlay.AddButton(@"Edit", @"beatmap", FontAwesome.Solid.PencilAlt, colours.Yellow, null); Add(overlay); AddStep(@"Toggle", overlay.ToggleVisibility); }
private void load(BeatmapDatabase beatmaps, AudioManager audio, DialogOverlay dialog, Framework.Game game, OsuGame osu, OsuColour colours) { if (Footer != null) { Footer.AddButton(@"random", colours.Green, SelectRandom, Key.F2); Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3); BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, promptDelete, Key.Number4, float.MaxValue); } if (osu != null) { playMode.BindTo(osu.PlayMode); } playMode.ValueChanged += playMode_ValueChanged; if (database == null) { database = beatmaps; } database.BeatmapSetAdded += onBeatmapSetAdded; database.BeatmapSetRemoved += onBeatmapSetRemoved; trackManager = audio.Track; dialogOverlay = dialog; sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); initialAddSetsTask = new CancellationTokenSource(); Task.Factory.StartNew(() => addBeatmapSets(game, initialAddSetsTask.Token), initialAddSetsTask.Token); }
private void load(BeatmapDatabase beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours, UserInputManager input) { if (Footer != null) { Footer.AddButton(@"random", colours.Green, () => triggerRandom(input), Key.F2); Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3); BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, promptDelete, Key.Number4, float.MaxValue); } if (database == null) { database = beatmaps; } if (osu != null) { ruleset.BindTo(osu.Ruleset); } database.BeatmapSetAdded += onBeatmapSetAdded; database.BeatmapSetRemoved += onBeatmapSetRemoved; trackManager = audio.Track; dialogOverlay = dialog; sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); initialAddSetsTask = new CancellationTokenSource(); carousel.Beatmaps = database.GetAllWithChildren <BeatmapSetInfo>(b => !b.DeletePending); Beatmap.ValueChanged += beatmap_ValueChanged; }
public override void Reset() { base.Reset(); var overlay = new BeatmapOptionsOverlay(); overlay.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, Color4.Purple, null, Key.Number1); overlay.AddButton(@"Clear", @"local scores", FontAwesome.fa_eraser, Color4.Purple, null, Key.Number2); overlay.AddButton(@"Edit", @"Beatmap", FontAwesome.fa_pencil, Color4.Yellow, null, Key.Number3); overlay.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, Color4.Pink, null, Key.Number4, float.MaxValue); //add this view to sereen Add(overlay); //add a step button AddStep(@"Toggle", overlay.ToggleVisibility); }
private void load(BeatmapDatabase beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours) { if (Footer != null) { Footer.AddButton(@"random", colours.Green, SelectRandom, Key.F2); Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3); BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, promptDelete, Key.Number4, float.MaxValue); } if (database == null) { database = beatmaps; } playMode.ValueChanged += val => { if (Beatmap != null) { Beatmap.PreferredPlayMode = val; } }; if (osu != null) { playMode.BindTo(osu.PlayMode); } database.BeatmapSetAdded += onBeatmapSetAdded; database.BeatmapSetRemoved += onBeatmapSetRemoved; trackManager = audio.Track; dialogOverlay = dialog; sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); initialAddSetsTask = new CancellationTokenSource(); carousel.BeatmapsChanged = beatmapsLoaded; carousel.Beatmaps = database.Query <BeatmapSetInfo>().Where(b => !b.DeletePending); }
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours, UserInputManager input) { if (Footer != null) { Footer.AddButton(@"random", colours.Green, () => triggerRandom(input), Key.F2); Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3); BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, promptDelete, Key.Number4, float.MaxValue); } if (manager == null) { manager = beatmaps; } if (osu != null) { ruleset.BindTo(osu.Ruleset); } manager.BeatmapSetAdded += onBeatmapSetAdded; manager.BeatmapSetRemoved += onBeatmapSetRemoved; dialogOverlay = dialog; sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); initialAddSetsTask = new CancellationTokenSource(); carousel.Beatmaps = manager.GetAllUsableBeatmapSets(); Beatmap.ValueChanged += beatmap_ValueChanged; Beatmap.DisabledChanged += disabled => carousel.AllowSelection = !disabled; carousel.AllowSelection = !Beatmap.Disabled; }