private void play(BeatmapInfo info, bool isNext) { current = beatmaps.GetWorkingBeatmap(info, current); Task.Run(() => { trackManager.SetExclusive(current.Track); current.Track.Start(); beatmapSource.Value = current; }); updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); }
/// <summary> /// selection has been changed as the result of interaction with the carousel. /// </summary> private void selectionChanged(BeatmapGroup group, BeatmapInfo beatmap) { bool beatmapSetChange = false; if (!beatmap.Equals(Beatmap?.BeatmapInfo)) { if (beatmap.BeatmapSetInfoID == Beatmap?.BeatmapInfo.BeatmapSetInfoID) sampleChangeDifficulty.Play(); else { sampleChangeBeatmap.Play(); beatmapSetChange = true; } Beatmap = database.GetWorkingBeatmap(beatmap, Beatmap); } ensurePlayingSelected(beatmapSetChange); }
private void appendToHistory(BeatmapInfo beatmap) { if (playHistoryIndex >= 0) { if (beatmap.AudioEquals(playHistory[playHistoryIndex])) return; if (playHistoryIndex < playHistory.Count - 1) playHistory.RemoveRange(playHistoryIndex + 1, playHistory.Count - playHistoryIndex - 1); } playHistory.Insert(++playHistoryIndex, beatmap); }
public BeatmapPanel(BeatmapInfo beatmap) { Beatmap = beatmap; Height *= 0.60f; Children = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, }, new Triangles { // The border is drawn in the shader of the children. Being additive, triangles would over-emphasize // the border wherever they cross it, and thus they get their own masking container without a border. Masking = true, CornerRadius = Content.CornerRadius, RelativeSizeAxes = Axes.Both, BlendingMode = BlendingMode.Additive, Colour = new Color4(20, 43, 51, 255), }, new FlowContainer { Padding = new MarginPadding(5), Direction = FlowDirection.HorizontalOnly, AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Children = new Drawable[] { new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)) { Scale = new Vector2(1.8f), Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, }, new FlowContainer { Padding = new MarginPadding { Left = 5 }, Spacing = new Vector2(0, 5), Direction = FlowDirection.VerticalOnly, AutoSizeAxes = Axes.Both, Children = new Drawable[] { new FlowContainer { Direction = FlowDirection.HorizontalOnly, AutoSizeAxes = Axes.Both, Spacing = new Vector2(4, 0), Children = new[] { new SpriteText { Font = @"Exo2.0-Medium", Text = beatmap.Version, TextSize = 20, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft }, new SpriteText { Font = @"Exo2.0-Medium", Text = "mapped by", TextSize = 16, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft }, new SpriteText { Font = @"Exo2.0-MediumItalic", Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author}", TextSize = 16, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft }, } }, new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 } } } } } }; }
private void selectBeatmap(BeatmapInfo beatmap) { carousel.SelectBeatmap(beatmap); }
private void onBeatmapHidden(BeatmapInfo b) => Carousel.UpdateBeatmapSet(beatmaps.QueryBeatmapSet(s => s.ID == b.BeatmapSetInfoID));
public WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, BeatmapDatabase database) { this.BeatmapInfo = beatmapInfo; this.BeatmapSetInfo = beatmapSetInfo; this.database = database; }
public void Edit(BeatmapInfo beatmap) { Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap, Beatmap.Value); Push(new Editor()); }
public DifficultyRetriever(BeatmapInfo beatmapInfo, RulesetInfo ruleset, IReadOnlyList <Mod> mods) { this.beatmapInfo = beatmapInfo; this.ruleset = ruleset; this.mods = mods; }
public DrawableMostPlayedRow(BeatmapInfo beatmap, int playCount) { this.beatmap = beatmap; this.playCount = playCount; }
public GetBeatmapRequest(BeatmapInfo beatmap) { this.beatmap = beatmap; }
public void Edit(BeatmapInfo beatmap = null) { Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce); Push(new Editor()); }