private void recreateDisplay(HitWindows hitWindows, float overallDifficulty)
        {
            this.hitWindows = hitWindows;

            hitWindows?.SetDifficulty(overallDifficulty);

            Clear();

            Add(new FillFlowContainer
            {
                Anchor       = Anchor.Centre,
                Origin       = Anchor.Centre,
                Direction    = FillDirection.Vertical,
                AutoSizeAxes = Axes.Both,
                Children     = new[]
                {
                    new OsuSpriteText {
                        Text = $@"Great: {hitWindows?.WindowFor(HitResult.Great)}"
                    },
                    new OsuSpriteText {
                        Text = $@"Good: {hitWindows?.WindowFor(HitResult.Good)}"
                    },
                    new OsuSpriteText {
                        Text = $@"Meh: {hitWindows?.WindowFor(HitResult.Meh)}"
                    },
                }
            });

            Add(barMeter = new BarHitErrorMeter(hitWindows, true)
            {
                Anchor = Anchor.CentreRight,
                Origin = Anchor.CentreRight,
            });

            Add(barMeter2 = new BarHitErrorMeter(hitWindows, false)
            {
                Anchor = Anchor.CentreLeft,
                Origin = Anchor.CentreLeft,
            });

            Add(colourMeter = new ColourHitErrorMeter(hitWindows)
            {
                Anchor = Anchor.CentreRight,
                Origin = Anchor.CentreRight,
                Margin = new MarginPadding {
                    Right = 50
                }
            });

            Add(colourMeter2 = new ColourHitErrorMeter(hitWindows)
            {
                Anchor = Anchor.CentreLeft,
                Origin = Anchor.CentreLeft,
                Margin = new MarginPadding {
                    Left = 50
                }
            });
        }
示例#2
0
        private void createColour(bool rightAligned)
        {
            var display = new ColourHitErrorMeter(hitWindows)
            {
                Margin = new MarginPadding(margin),
                Anchor = rightAligned ? Anchor.CentreRight : Anchor.CentreLeft,
                Origin = rightAligned ? Anchor.CentreRight : Anchor.CentreLeft,
                Alpha  = 0,
            };

            completeDisplayLoading(display);
        }
示例#3
0
        private void createColour(Anchor anchor)
        {
            bool bottomAligned = (anchor & Anchor.y2) > 0;

            var display = new ColourHitErrorMeter(hitWindows)
            {
                Margin   = new MarginPadding(margin),
                Anchor   = anchor,
                Origin   = bottomAligned ? Anchor.CentreLeft : anchor,
                Alpha    = 0,
                Rotation = bottomAligned ? 270 : 0
            };

            completeDisplayLoading(display);
        }