private void showResult(HitResult result) { AddStep("Show " + result.GetDescription(), () => { int poolIndex = 0; SetContents(_ => { DrawablePool <TestDrawableTauJudgement> pool; if (poolIndex >= pools.Count) { pools.Add(pool = new DrawablePool <TestDrawableTauJudgement>(1)); } else { pool = pools[poolIndex]; ((Container)pool.Parent).Clear(false); } var container = new Container { RelativeSizeAxes = Axes.Both, RelativePositionAxes = Axes.Y, Y = Extensions.GetCircularPosition(-.6f, 0).Y, Children = new Drawable[] { pool, pool.Get(j => j.Apply(new JudgementResult(new HitObject { StartTime = Time.Current }, new Judgement()) { Type = result }, null)).With(j => { j.Anchor = Anchor.Centre; j.Origin = Anchor.Centre; }) } }; poolIndex++; return(container); }); }); }
private void load() { AutoSizeAxes = Axes.Both; InternalChildren = new Drawable[] { JudgementText = new OsuSpriteText { Text = Result.GetDescription().ToUpperInvariant(), Colour = colours.ForHitResult(Result), Font = OsuFont.Numeric.With(size: 20), Scale = new Vector2(0.85f, 1), } }; }
private void showResult(HitResult result) { AddStep("Show " + result.GetDescription(), () => { int poolIndex = 0; SetContents(() => { DrawablePool <TestDrawableOsuJudgement> pool; if (poolIndex >= pools.Count) { pools.Add(pool = new DrawablePool <TestDrawableOsuJudgement>(1)); } else { pool = pools[poolIndex]; // We need to make sure neither the pool nor the judgement get disposed when new content is set, and they both share the same parent. ((Container)pool.Parent).Clear(false); } var container = new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { pool, pool.Get(j => j.Apply(new JudgementResult(new HitObject { StartTime = Time.Current }, new Judgement()) { Type = result, }, null)).With(j => { j.Anchor = Anchor.Centre; j.Origin = Anchor.Centre; }) } }; poolIndex++; return(container); }); }); }
public static string GetDisplayNameForSentakkiResult(this HitResult result) { switch (result) { case HitResult.Great: return("Perfect"); case HitResult.Good: return("Great"); case HitResult.Ok: return("Good"); default: return(result.GetDescription()); } }
private void load() { InternalChild = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Child = Text = new OsuSpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Text = Type.GetDescription().ToUpperInvariant(), Font = OsuFont.Numeric.With(size: 20), Colour = colours.ForHitResult(Type), Scale = new Vector2(0.5f), Position = new Vector2(0, -45) } }; var result = GetADOFAIResult(); Text.Text = result.GetDescription().ToUpperInvariant(); }
private TextColumn createStatisticsColumn(HitResult hitResult, int count) => new TextColumn(hitResult.GetDescription(), smallFont) { Text = count.ToString() };
/// <summary> /// Get a display friendly name for the specified result type. /// </summary> /// <param name="result">The result type to get the name for.</param> /// <returns>The display name.</returns> public virtual string GetDisplayNameForHitResult(HitResult result) => result.GetDescription();
public HitResultStatistic(HitResult result, int count) : base(result.GetDescription(), count) { this.result = result; }
private TextColumn createStatisticsColumn(HitResult hitResult, int count, int?maxCount) => new TextColumn(hitResult.GetDescription(), smallFont, bottom_columns_min_width) { Text = maxCount == null ? $"{count}" : $"{count}/{maxCount}" };
private Drawable createStatistic(HitResult result, int count, int?maxCount) => createStatistic(result.GetDescription(), maxCount == null ? $"{count}" : $"{count}/{maxCount}");