Exemplo n.º 1
0
        private void load(OsuColour colours)
        {
            body.BorderColour = colours.Yellow;

            PositionBindable.BindValueChanged(_ => updatePosition(), true);
            ScaleBindable.BindValueChanged(v => body.PathWidth = v * 64, true);
        }
Exemplo n.º 2
0
        private void load()
        {
            pathVersion.BindTo(slider.Path.Version);

            PositionBindable.BindValueChanged(_ => updatePosition());
            pathVersion.BindValueChanged(_ => updatePosition(), true);
        }
Exemplo n.º 3
0
        private void load()
        {
            Origin           = Anchor.Centre;
            RelativeSizeAxes = Axes.Both;

            AddRangeInternal(new Drawable[]
            {
                spmCalculator = new SpinnerSpmCalculator
                {
                    Result = { BindTarget = SpinsPerMinute },
                },
                ticks = new Container <DrawableSpinnerTick>(),
                new AspectContainer
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Y,
                    Children         = new Drawable[]
                    {
                        Body            = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SpinnerBody), _ => new DefaultSpinner()),
                        RotationTracker = new SpinnerRotationTracker(this)
                    }
                },
                spinningSample = new PausableSkinnableSound
                {
                    Volume    = { Value = 0 },
                    Looping   = true,
                    Frequency = { Value = spinning_sample_initial_frequency }
                }
            });

            PositionBindable.BindValueChanged(pos => Position = pos.NewValue);
        }
Exemplo n.º 4
0
        private void load(OsuColour colours)
        {
            body.BorderColour = colours.Yellow;

            PositionBindable.BindValueChanged(_ => updatePosition(), true);
            ScaleBindable.BindValueChanged(scale => body.PathRadius = scale.NewValue * 64, true);
        }
Exemplo n.º 5
0
        private void load(OsuColour colours)
        {
            Colour = colours.Yellow;

            PositionBindable.BindValueChanged(_ => updatePosition(), true);
            StackHeightBindable.BindValueChanged(_ => updatePosition());
            ScaleBindable.BindValueChanged(scale => ring.Scale = new Vector2(scale.NewValue), true);
        }
Exemplo n.º 6
0
        private void load()
        {
            Origin = Anchor.Centre;

            InternalChildren = new Drawable[]
            {
                scaleContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Origin           = Anchor.Centre,
                    Anchor           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        HitArea = new HitReceptor
                        {
                            Hit = () =>
                            {
                                if (AllJudged)
                                {
                                    return(false);
                                }

                                UpdateResult(true);
                                return(true);
                            },
                        },
                        CirclePiece = new SkinnableDrawable(new OsuSkinComponent(CirclePieceComponent), _ => new MainCirclePiece())
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                        },
                        ApproachCircle = new ProxyableSkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.ApproachCircle), _ => new DefaultApproachCircle())
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            RelativeSizeAxes = Axes.Both,
                            Alpha            = 0,
                            Scale            = new Vector2(4),
                        }
                    }
                },
            };

            Size = HitArea.DrawSize;

            PositionBindable.BindValueChanged(_ => Position              = HitObject.StackedPosition);
            StackHeightBindable.BindValueChanged(_ => Position           = HitObject.StackedPosition);
            ScaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue));
        }
Exemplo n.º 7
0
        private void load()
        {
            InternalChildren = new Drawable[]
            {
                Body          = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderBody), _ => new DefaultSliderBody(), confineMode: ConfineMode.NoScaling),
                tailContainer = new Container <DrawableSliderTail> {
                    RelativeSizeAxes = Axes.Both
                },
                tickContainer = new Container <DrawableSliderTick> {
                    RelativeSizeAxes = Axes.Both
                },
                repeatContainer = new Container <DrawableSliderRepeat> {
                    RelativeSizeAxes = Axes.Both
                },
                headContainer = new Container <DrawableSliderHead> {
                    RelativeSizeAxes = Axes.Both
                },
                OverlayElementContainer = new Container {
                    RelativeSizeAxes = Axes.Both,
                },
                Ball = new SliderBall(this)
                {
                    GetInitialHitAction = () => HeadCircle.HitAction,
                    BypassAutoSizeAxes  = Axes.Both,
                    AlwaysPresent       = true,
                    Alpha = 0
                },
                slidingSample = new PausableSkinnableSound {
                    Looping = true
                }
            };

            PositionBindable.BindValueChanged(_ => Position    = HitObject.StackedPosition);
            StackHeightBindable.BindValueChanged(_ => Position = HitObject.StackedPosition);
            ScaleBindable.BindValueChanged(scale => Ball.Scale = new Vector2(scale.NewValue));

            AccentColour.BindValueChanged(colour =>
            {
                foreach (var drawableHitObject in NestedHitObjects)
                {
                    drawableHitObject.AccentColour.Value = colour.NewValue;
                }
                updateBallTint();
            }, true);

            Tracking.BindValueChanged(updateSlidingSample);
        }
Exemplo n.º 8
0
        private void load(OsuColour colours)
        {
            Origin           = Anchor.Centre;
            RelativeSizeAxes = Axes.Both;

            InternalChildren = new Drawable[]
            {
                ticks = new Container <DrawableSpinnerTick>(),
                new AspectContainer
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Y,
                    Children         = new Drawable[]
                    {
                        new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SpinnerBody), _ => new DefaultSpinnerDisc()),
                        RotationTracker = new SpinnerRotationTracker(this)
                    }
                },
                SpmCounter = new SpinnerSpmCounter
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Y      = 120,
                    Alpha  = 0
                },
                bonusDisplay = new SpinnerBonusDisplay
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Y      = -120,
                },
                spinningSample = new PausableSkinnableSound
                {
                    Volume    = { Value = 0 },
                    Looping   = true,
                    Frequency = { Value = spinning_sample_initial_frequency }
                }
            };

            PositionBindable.BindValueChanged(pos => Position = pos.NewValue);
        }
Exemplo n.º 9
0
 private void load()
 {
     PositionBindable.BindValueChanged(_ => updatePosition());
     pathVersion.BindValueChanged(_ => updatePosition());
 }