示例#1
0
 public CytusDrawableHoldNote(CytusHitObject hitObject, float x, float y) : base(hitObject, x, y)
 {
     AddInternal(new CircularContainer {
         Size             = Vector2.One,
         RelativeSizeAxes = Axes.Both,
         Anchor           = Anchor.Centre,
         Origin           = Anchor.Centre,
         Children         = new Drawable[] {
             new Circle {
                 Colour           = new Color4(0xB8, 0x6B, 0x9A, 255),
                 Size             = Vector2.One,
                 RelativeSizeAxes = Axes.Both,
                 Anchor           = Anchor.Centre,
                 Origin           = Anchor.Centre,
             },
             progress = new CircularProgress {
                 Alpha            = 0f,
                 Size             = Vector2.One * 1.5f,
                 InnerRadius      = 0.1f,
                 RelativeSizeAxes = Axes.Both,
                 Anchor           = Anchor.Centre,
                 Origin           = Anchor.Centre,
             }
         }
     });
 }
示例#2
0
        private void ConfigureStarCircularProgress()
        {
            CGRect frame = new CGRect(0, 0, 128, 128);

            starProgress = new CircularProgress(frame);
            //starProgress.Center = ProgressHazne.Center;
            starProgress.Colors = new[]
            {
                UIColor.FromRGB(225, 0, 105).CGColor
            };

            starProgress.LineWidth = 10.0;

            var path = new UIBezierPath();

            path.MoveTo(new CGPoint(50.0, 2.0));
            path.AddLineTo(new CGPoint(84.0, 86.0));
            path.AddLineTo(new CGPoint(6.0, 33.0));
            path.AddLineTo(new CGPoint(96.0, 33.0));
            path.AddLineTo(new CGPoint(17.0, 86.0));
            path.ClosePath();
            starProgress.Path = path;
            ProgressHazne.AddSubview(starProgress);
            starProgress.Transform = CGAffineTransform.MakeRotation(3.14159f * 270 / 180f);
        }
    protected override void OnCreate()
    {
        base.OnCreate();

        window = NUIApplication.GetDefaultWindow();

        circular = new CircularProgress();
        circular.CurrentValue = 4;

        // These properties have default values, so they're set to the following values
        // even if you don't set them separately.
        circular.MinValue  = 0;
        circular.MaxValue  = 10;
        circular.Thickness = 6;

        window.Add(circular);

        CreateLabelAndIcon();

        // Bezel event
        window.WheelEvent += Pagination_WheelEvent;

        // If you want to change the colors of the track and the progress,
        // use TrackColor and ProgressColor properties.
    }
示例#4
0
        private void method_0(object sender, EventArgs e)
        {
            if (vmethod_2().Value == 100)
            {
                vmethod_2().Value = 1;
            }
            CircularProgress circularProgress = vmethod_2();

            circularProgress.Value = checked (circularProgress.Value + 1);
        }
示例#5
0
        public static Page GetMainPage()
        {
            var contentPage = new ContentPage {
                //Title = "Custom Progress Bar"
            };

            var progressBar = new CircularProgress {
                ProgressColor           = Color.FromHex("3498DB"),
                ProgressBackgroundColor = Color.FromHex("B4BCBC"),
                WidthRequest            = 300,
                HeightRequest           = 300
            };

            var increase = new Button {
                Text = "+5"
            };
            var decrease = new Button {
                Text = "-5"
            };
            var indeterminate = new Button {
                Text = "Indeterminate"
            };

            increase.Clicked += (sender, args) => progressBar.Progress += 5;
            decrease.Clicked += (sender, args) => progressBar.Progress -= 5;

            indeterminate.Clicked += (sender, args) => {
                progressBar.Indeterminate = !progressBar.Indeterminate;
            };

            var actionsStack = new StackLayout {
                Orientation       = StackOrientation.Horizontal,
                Spacing           = 10,
                HorizontalOptions = LayoutOptions.Center,
                Children          = { increase, decrease, indeterminate }
            };


            var slider = new Slider(50, 150, 100);

            slider.ValueChanged += (sender, args) => progressBar.IndeterminateSpeed = (int)slider.Value;


            var mainStack = new StackLayout {
                Spacing  = 10,
                Padding  = 10,
                Children = { actionsStack, slider, progressBar }
            };


            contentPage.Content = mainStack;

            return(contentPage);
            //return new NavigationPage (contentPage);
        }
        void ReleaseDesignerOutlets()
        {
            if (LinearProgress != null)
            {
                LinearProgress.Dispose();
                LinearProgress = null;
            }

            if (CircularProgress != null)
            {
                CircularProgress.Dispose();
                CircularProgress = null;
            }
        }
示例#7
0
            private void load()
            {
                RelativeSizeAxes = Axes.Both;
                Anchor           = Anchor.Centre;
                Origin           = Anchor.Centre;

                Size = new Vector2(0.98f); // Avoid bleed into masking edge.

                InternalChildren = new Drawable[]
                {
                    new CircularProgress
                    {
                        RelativeSizeAxes = Axes.Both,
                        Current          = { Value = 1f / light_count - angular_light_gap },
                        Colour           = colourProvider.Background2,
                    },
                    fillContent = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0,
                        Colour           = colourProvider.Colour1,
                        Children         = new[]
                        {
                            new CircularProgress
                            {
                                RelativeSizeAxes = Axes.Both,
                                Current          = { Value = 1f / light_count - angular_light_gap },
                                Blending         = BlendingParameters.Additive
                            },
                            // Please do not try and make sense of this.
                            // Getting the visual effect I was going for relies on what I can only imagine is broken implementation
                            // of `PadExtent`. If that's ever fixed in the future this will likely need to be adjusted.
                            Glow = new CircularProgress
                            {
                                RelativeSizeAxes = Axes.Both,
                                Current          = { Value = 1f / light_count - 0.01f },
                                Blending         = BlendingParameters.Additive
                            }.WithEffect(new GlowEffect
                            {
                                Colour    = colourProvider.Colour1.Opacity(0.4f),
                                BlurSigma = new Vector2(9f),
                                Strength  = 10,
                                PadExtent = true
                            }),
                        }
                    },
                };
            }
        public ProgressBarCodeBehind()
        {
            var progressBar = new CircularProgress {
                ProgressColor           = Color.FromHex("3498DB"),
                ProgressBackgroundColor = Color.FromHex("B4BCBC"),
                WidthRequest            = 300,
                HeightRequest           = 300
            };

            var increase = new Button {
                Text = "+5 cbehind"
            };
            var decrease = new Button {
                Text = "-5 cbehind"
            };
            var indeterminate = new Button {
                Text = "Indeterminate"
            };

            increase.Clicked += (sender, args) => progressBar.ProgressBlah += 5;
            decrease.Clicked += (sender, args) => progressBar.ProgressBlah -= 5;

            indeterminate.Clicked += (sender, args) => {
                progressBar.Indeterminate = !progressBar.Indeterminate;
            };

            var actionsStack = new StackLayout {
                Orientation       = StackOrientation.Horizontal,
                Spacing           = 10,
                HorizontalOptions = LayoutOptions.Center,
                Children          = { increase, decrease, indeterminate }
            };


            var slider = new Slider(50, 150, 100);

            slider.ValueChanged += (sender, args) => progressBar.IndeterminateSpeed = (int)slider.Value;


            var mainStack = new StackLayout {
                Spacing  = 10,
                Padding  = 10,
                Children = { actionsStack, slider, progressBar }
            };


            Content = mainStack;
        }
示例#9
0
        public MaterialActivityIndicatorRenderer(Context context)
            : base(context)
        {
            _control = new CircularProgress(MaterialContextThemeWrapper.Create(context), null, Resource.Attribute.materialProgressBarCircularStyle)
            {
                // limiting size to compare iOS realization
                // https://github.com/material-components/material-components-ios/blob/develop/components/ActivityIndicator/src/MDCActivityIndicator.m#L425
                MinSize      = (int)Context.ToPixels(10),
                MaxSize      = (int)Context.ToPixels(144),
                DefaultColor = MaterialColors.Light.PrimaryColor
            };
            AddView(Control);

            _visualElementRenderer = new VisualElementRenderer(this);
            _motionEventHelper     = new MotionEventHelper();
        }
示例#10
0
        private void AddExplosion(Vector2 Position)
        {
            CircularProgress explosionCirc;

            Add(explosionCirc = new CircularProgress
            {
                Size     = new Vector2(0),
                Position = Position,
                Anchor   = Anchor.Centre,
                Origin   = Anchor.Centre,
                Current  = new Bindable <double>(1),
                Alpha    = 0.5f,
            });

            explosionCirc.TransformTo(nameof(explosionCirc.InnerRadius), 0f, 1000, Easing.OutExpo);
            explosionCirc.ResizeTo(new Vector2(50f * (float)(collection?.CurrentBeatmap?.Value?.Player?.Size / 10)), 1000, Easing.OutExpo);
        }
示例#11
0
 public HitObjectLine()
 {
     Size    = new Vector2(SentakkiPlayfield.NoteStartDistance * 2);
     Masking = true;
     Anchor  = Anchor.Centre;
     Origin  = Anchor.Centre;
     Alpha   = 0;
     Child   = new CircularProgress
     {
         RelativeSizeAxes = Axes.Both,
         Anchor           = Anchor.Centre,
         Origin           = Anchor.Centre,
         InnerRadius      = 0.025f,
         Rotation         = -45,
         Current          = new Bindable <double>(0.25),
     };
 }
示例#12
0
            private void load(OsuColour colours, Framework.Game game)
            {
                Size = new Vector2(60);

                Child = new CircularContainer
                {
                    Masking          = true,
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = colours.Gray1,
                            Alpha            = 0.5f,
                        },
                        circularProgress = new CircularProgress
                        {
                            RelativeSizeAxes = Axes.Both,
                            InnerRadius      = 1
                        },
                        overlayCircle = new Circle
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            RelativeSizeAxes = Axes.Both,
                            Colour           = colours.Gray1,
                            Size             = new Vector2(0.9f),
                        },
                        icon = new SpriteIcon
                        {
                            Shadow = false,
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Size   = new Vector2(15),
                            Icon   = FontAwesome.Solid.Times
                        },
                    }
                };

                bind();

                gameActive.BindTo(game.IsActive);
            }
示例#13
0
 private void AddSendButton(LayoutGroup group)
 {
     button_Send = new ButtonX()
     {
         Text       = "Send",
         Size       = new Size(90, 23),
         Image      = Resources.icons8_send_16px,
         ColorTable = eButtonColor.OrangeWithBackground,
         Style      = eDotNetBarStyle.StyleManagerControlled
     };
     circularProgress = new CircularProgress()
     {
         ProgressBarType = eCircularProgressType.Donut,
         ProgressColor   = ForeColor,
         Size            = new Size(23, 23)
     };
     button_Send.Click += Button_Send_Clicked;
     AddSplitter(group, 99, button_Send.Height + 8);
     AddControlToGroup(null, group, circularProgress, eLayoutSizeType.Absolute, circularProgress.Width + 8);
     AddControlToGroup(null, group, button_Send, eLayoutSizeType.Absolute, button_Send.Width + 8);
 }
示例#14
0
        public Paddle(float angleRange)
        {
            this.angleRange = angleRange;

            RelativeSizeAxes = Axes.Both;
            Anchor           = Anchor.Centre;
            Origin           = Anchor.Centre;

            Colour = TauPlayfield.ACCENT_COLOR.Value;

            InternalChildren = new Drawable[]
            {
                paddle = new CircularProgress
                {
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Current          = new BindableDouble(),
                    InnerRadius      = 0.05f,
                },
                new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Handle), _ => new HandlePiece(), ConfineMode.ScaleToFit),
            };
        }
示例#15
0
        public void StartLoading()
        {
            if (_loading != null)
            {
                StopLoading();

                _loading.Dispose();
            }

            _loading               = new CircularProgress();
            _loading.Size          = new Size(64, 64);
            _loading.Location      = new Point((this.Width / 2) - (_loading.Width / 2), (this.Height / 2) - (_loading.Height / 2));
            _loading.Visible       = true;
            _loading.ProgressColor = Color.White;
            _loading.BackColor     = Color.Transparent;
            _loading.IsRunning     = true;

            this.Controls.Add(_loading);

            _loading.BringToFront();

            this.Enabled = false;
        }
示例#16
0
            protected override void initializeSprites()
            {
                Transformation fadeInTrack = new TransformationF(TransformationType.Fade, 0, 1, StartTime - DifficultyManager.PreEmpt, StartTime - DifficultyManager.PreEmpt + DifficultyManager.FadeIn);
                Transformation fadeOut     = new TransformationF(TransformationType.Fade, 1, 0, EndTime, EndTime + DifficultyManager.HitWindow50);

                activeOverlay = new pSprite(TextureManager.Load(OsuTexture.holdactive), FieldTypes.GamefieldSprites, OriginTypes.Centre, ClockTypes.Audio, Position, SpriteManager.drawOrderBwd(EndTime - 18), false, Color.White);
                spriteCollectionStart.Add(activeOverlay);

                inactiveOverlay = new pSprite(TextureManager.Load(OsuTexture.holdinactive), FieldTypes.GamefieldSprites, OriginTypes.Centre, ClockTypes.Audio, Position, SpriteManager.drawOrderBwd(EndTime - 19), false, Color.White);
                inactiveOverlay.Transform(new NullTransform(StartTime, EndTime));
                spriteCollectionStart.Add(inactiveOverlay);

                border = new pSprite(TextureManager.Load(OsuTexture.holdoverlay), FieldTypes.GamefieldSprites, OriginTypes.Centre, ClockTypes.Audio, Position, SpriteManager.drawOrderBwd(EndTime - 20), false, Color.White);
                border.Transform(fadeInTrack);
                border.Transform(fadeOut);
                Sprites.Add(border);

                spriteCollectionStart.ForEach(s => s.Transform(fadeInTrack));
                spriteCollectionStart.ForEach(s => s.Transform(fadeOut));

                circularProgress          = new CircularProgress(position, 4, false, 0, Color.White);
                circularProgress.Clocking = ClockTypes.Audio;
                circularProgress.Field    = FieldTypes.GamefieldExact;
                circularProgress.Additive = true;
                circularProgress.Transform(new NullTransform(StartTime, EndTime));

                spriteCollectionStart.Add(circularProgress);

                Sprites.AddRange(spriteCollectionStart);

                activeOverlay.Transform(new TransformationC(hold_colour, Color4.White, StartTime, EndTime));
                circularProgress.Transform(new TransformationC(new Color4(hold_colour.R, hold_colour.G, hold_colour.B, 0.8f), ColourHelper.Lighten(new Color4(hold_colour.R, hold_colour.G, hold_colour.B, 0.8f), 0.5f),
                                                               StartTime, EndTime));

                border.TagNumeric          = HitObject.DIMMABLE_TAG;
                inactiveOverlay.TagNumeric = HitObject.DIMMABLE_TAG;
            }
示例#17
0
文件: VolumeMeter.cs 项目: mc-nya/osu
        private void load(OsuColour colours)
        {
            Add(new Container
            {
                Size         = new Vector2(120, 20),
                CornerRadius = 10,
                Masking      = true,
                Margin       = new MarginPadding {
                    Left = circleSize + 10
                },
                Origin   = Anchor.CentreLeft,
                Anchor   = Anchor.CentreLeft,
                Children = new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour           = colours.Gray1,
                        Alpha            = 0.9f,
                    },
                    new OsuSpriteText
                    {
                        Anchor = Anchor.Centre,
                        Origin = Anchor.Centre,
                        Font   = "Exo2.0-Bold",
                        Text   = name
                    }
                }
            });

            CircularProgress bgProgress;

            Add(new CircularContainer
            {
                Masking  = true,
                Size     = new Vector2(circleSize),
                Children = new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour           = colours.Gray1,
                        Alpha            = 0.9f,
                    },
                    bgProgress = new CircularProgress
                    {
                        RelativeSizeAxes = Axes.Both,
                        InnerRadius      = 0.05f,
                        Rotation         = 180,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        Colour           = colours.Gray2,
                        Size             = new Vector2(0.8f)
                    },
                    (volumeCircle = new CircularProgress
                    {
                        RelativeSizeAxes = Axes.Both,
                        InnerRadius = 0.05f,
                        Rotation = 180,
                        Anchor = Anchor.Centre,
                        Origin = Anchor.Centre,
                        Size = new Vector2(0.8f)
                    }).WithEffect(new GlowEffect
                    {
                        Colour   = meterColour,
                        Strength = 2
                    }),
                    maxGlow = (text = new OsuSpriteText
                    {
                        Anchor = Anchor.Centre,
                        Origin = Anchor.Centre,
                        Font = "Venera",
                        TextSize = 0.16f * circleSize
                    }).WithEffect(new GlowEffect
                    {
                        Colour    = Color4.Transparent,
                        PadExtent = true,
                    })
                }
            });

            Bindable.ValueChanged   += newVolume => { this.TransformTo("DisplayVolume", newVolume, 400, Easing.OutQuint); };
            bgProgress.Current.Value = 0.75f;
        }
示例#18
0
        private void load(OsuColour colours)
        {
            Color4 backgroundColour = colours.Gray1;

            CircularProgress bgProgress;

            const float progress_start_radius = 0.75f;
            const float progress_size         = 0.03f;
            const float progress_end_radius   = progress_start_radius + progress_size;

            const float blur_amount = 5;

            Children = new Drawable[]
            {
                new Container
                {
                    Size     = new Vector2(circleSize),
                    Children = new Drawable[]
                    {
                        new BufferedContainer
                        {
                            Alpha            = 0.9f,
                            RelativeSizeAxes = Axes.Both,
                            Children         = new Drawable[]
                            {
                                new Circle
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = backgroundColour,
                                },
                                new CircularContainer
                                {
                                    Masking          = true,
                                    Anchor           = Anchor.Centre,
                                    Origin           = Anchor.Centre,
                                    RelativeSizeAxes = Axes.Both,
                                    Size             = new Vector2(progress_end_radius),
                                    Children         = new Drawable[]
                                    {
                                        bgProgress = new CircularProgress
                                        {
                                            Anchor           = Anchor.Centre,
                                            Origin           = Anchor.Centre,
                                            RelativeSizeAxes = Axes.Both,
                                            Rotation         = 180,
                                            Colour           = backgroundColour,
                                        },
                                        new Container
                                        {
                                            Anchor           = Anchor.Centre,
                                            Origin           = Anchor.Centre,
                                            Name             = "Progress under covers for smoothing",
                                            RelativeSizeAxes = Axes.Both,
                                            Rotation         = 180,
                                            Child            = volumeCircle = new CircularProgress
                                            {
                                                RelativeSizeAxes = Axes.Both,
                                            }
                                        },
                                    }
                                },
                                new Circle
                                {
                                    Name             = "Inner Cover",
                                    Anchor           = Anchor.Centre,
                                    Origin           = Anchor.Centre,
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = backgroundColour,
                                    Size             = new Vector2(progress_start_radius),
                                },
                                new Container
                                {
                                    Name             = "Progress overlay for glow",
                                    Anchor           = Anchor.Centre,
                                    Origin           = Anchor.Centre,
                                    RelativeSizeAxes = Axes.Both,
                                    Size             = new Vector2(progress_start_radius + progress_size / 1.5f),
                                    Rotation         = 180,
                                    Padding          = new MarginPadding(-Blur.KernelSize(blur_amount)),
                                    Child            = (volumeCircleGlow = new CircularProgress
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        InnerRadius = progress_size * 0.8f,
                                    }).WithEffect(new GlowEffect
                                    {
                                        Colour    = meterColour,
                                        BlurSigma = new Vector2(blur_amount),
                                        Strength  = 5,
                                        PadExtent = true
                                    }),
                                },
                            },
                        },
                        maxGlow = (text = new OsuSpriteText
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Font = "Venera",
                            TextSize = 0.16f * circleSize
                        }).WithEffect(new GlowEffect
                        {
                            Colour    = Color4.Transparent,
                            PadExtent = true,
                        })
                    }
                },
                new Container
                {
                    Size         = new Vector2(120, 20),
                    CornerRadius = 10,
                    Masking      = true,
                    Margin       = new MarginPadding {
                        Left = circleSize + 10
                    },
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft,
                    Children = new Drawable[]
                    {
                        new Box
                        {
                            Alpha            = 0.9f,
                            RelativeSizeAxes = Axes.Both,
                            Colour           = backgroundColour,
                        },
                        new OsuSpriteText
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Font   = "Exo2.0-Bold",
                            Text   = name
                        }
                    }
                }
            };
            Bindable.ValueChanged += newVolume =>
            {
                this.TransformTo("DisplayVolume",
                                 newVolume,
                                 400,
                                 Easing.OutQuint);
            };
            bgProgress.Current.Value = 0.75f;
        }
示例#19
0
        public TouchHoldCircle()
        {
            RelativeSizeAxes = Axes.Both;
            Size             = Vector2.One;
            Scale            = new Vector2(.8f);
            Alpha            = .5f;
            Anchor           = Anchor.Centre;
            Origin           = Anchor.Centre;

            InternalChildren = new Drawable[]
            {
                Glow = new GlowPiece()
                {
                    Alpha = 0f,
                },
                ring = new CircularContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Padding          = new MarginPadding(1),
                    Masking          = true,
                    Children         = new Drawable[]
                    {
                        new Circle
                        {
                            RelativeSizeAxes = Axes.Both,
                            Masking          = true,
                        },
                        new CircularContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Size             = Vector2.One,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            Masking          = true,
                            Child            = Progress = new CircularProgress
                            {
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                InnerRadius      = 0.250f,
                                Size             = Vector2.One,
                                RelativeSizeAxes = Axes.Both,
                                Current          = { Value = 0 },
                            }
                        },
                    }
                },
                outline = new CircularContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Masking          = true,
                    BorderColour     = Color4.Black,
                    BorderThickness  = 2,
                    Alpha            = .5f,
                    Child            = new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0,
                        AlwaysPresent    = true,
                    }
                },
                fillCircle = new CircularContainer {
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(.77f),
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Masking          = true,
                    Children         = new Drawable[] {
                        disc = new Sprite
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                        },
                        new TrianglesPiece
                        {
                            RelativeSizeAxes = Axes.Both,
                            Blending         = BlendingParameters.Additive,
                            Alpha            = 0.5f,
                        }
                    }
                },
                text = new OsuSpriteText
                {
                    Text   = "HOLD!",
                    Font   = OsuFont.Torus.With(weight: FontWeight.Bold, size: 32),
                    Colour = Color4.White,
                    Shadow = true,
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                },
                flash   = new FlashPiece(),
                explode = new ExplodePiece(),
            };
        }
示例#20
0
 internal virtual void vmethod_3(CircularProgress circularProgress_1)
 {
     circularProgress_0 = circularProgress_1;
 }
示例#21
0
 public static TransformSequence <CircularProgress> FillTo(this CircularProgress t, double newValue, double duration = 0, Easing easing = Easing.None)
 => t.TransformBindableTo(t.Current, newValue, duration, easing);
示例#22
0
        private void load(THSharpSkinElement textures)
        {
            if (character is DrawableTHSharpPlayer v)
            {
                Color4 lightColor = v.PrimaryColor.Lighten(0.5f);
                Color4 darkColor  = v.PrimaryColor.Darken(0.5f);

                Size = new Vector2(90);

                Anchor = Anchor.Centre;
                Origin = Anchor.Centre;

                AlwaysPresent = true;

                Children = new Drawable[]
                {
                    Sign = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,

                        Size = new Vector2(0.6f),

                        Alpha         = 0,
                        AlwaysPresent = true,

                        Children = new Drawable[]
                        {
                            characterSigil = new CircularContainer
                            {
                                RelativeSizeAxes = Axes.Both,
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                Masking          = true,
                            },
                            new Sprite
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(2f),

                                Colour  = v.PrimaryColor,
                                Anchor  = Anchor.Centre,
                                Origin  = Anchor.Centre,
                                Texture = textures.GetSkinTextureElement("seal"),
                            }
                        }
                    },
                    new Container
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0.2f,
                        Size             = new Vector2(1.5f),
                        Padding          = new MarginPadding(-Blur.KernelSize(5)),
                        Child            = (health = new CircularProgress
                        {
                            RelativeSizeAxes = Axes.Both,
                            InnerRadius = 0.05f,
                            Colour = v.ComplementaryColor
                        }).WithEffect(new GlowEffect
                        {
                            Colour    = v.ComplementaryColor,
                            Strength  = 2,
                            PadExtent = true
                        }),
                    },
                    new Container
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0.2f,
                        Size             = new Vector2(1.75f),
                        Padding          = new MarginPadding(-Blur.KernelSize(5)),

                        Child = (energy = new CircularProgress
                        {
                            RelativeSizeAxes = Axes.Both,
                            InnerRadius = 0.05f,
                            Colour = v.SecondaryColor
                        }).WithEffect(new GlowEffect
                        {
                            Colour    = v.SecondaryColor,
                            Strength  = 2,
                            PadExtent = true
                        }),
                    },
                    new Container
                    {
                        Position = new Vector2(-30, 0),
                        Anchor   = Anchor.CentreLeft,
                        Origin   = Anchor.CentreRight,

                        Child = (leftValue = new SpriteText
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreRight,
                            Colour = v.ComplementaryColor,
                            Font = "Venera",
                            TextSize = 16,
                            Alpha = 0.75f,
                        }).WithEffect(new GlowEffect
                        {
                            Colour    = Color4.Transparent,
                            PadExtent = true,
                        }),
                    },
                    new Container
                    {
                        Position = new Vector2(30, 0),
                        Anchor   = Anchor.CentreRight,
                        Origin   = Anchor.CentreLeft,

                        Child = (rightValue = new SpriteText
                        {
                            Anchor = Anchor.CentreRight,
                            Origin = Anchor.CentreLeft,
                            Colour = v.SecondaryColor,
                            Font = "Venera",
                            TextSize = 16,
                            Alpha = 0.75f,
                        }).WithEffect(new GlowEffect
                        {
                            Colour    = Color4.Transparent,
                            PadExtent = true,
                        }),
                    },
                };

                switch (v.Player.FileName)
                {
                case "SakuyaIzayoi":
                    characterSigil.Children = new Drawable[]
                    {
                        gear1 = new Sprite
                        {
                            Colour   = lightColor,
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Texture  = textures.GetSkinTextureElement("gearSmall"),
                            Position = new Vector2(-41, 10),
                        },
                        gear2 = new Sprite
                        {
                            Colour   = v.PrimaryColor,
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Texture  = textures.GetSkinTextureElement("gearMedium"),
                            Position = new Vector2(-4, 16),
                        },
                        gear3 = new Sprite
                        {
                            Colour   = darkColor,
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Texture  = textures.GetSkinTextureElement("gearLarge"),
                            Position = new Vector2(-16, -34),
                        },
                        gear4 = new Sprite
                        {
                            Colour   = v.PrimaryColor,
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Texture  = textures.GetSkinTextureElement("gearMedium"),
                            Position = new Vector2(35, -40),
                        },
                        gear5 = new Sprite
                        {
                            Colour   = lightColor,
                            Anchor   = Anchor.Centre,
                            Origin   = Anchor.Centre,
                            Texture  = textures.GetSkinTextureElement("gearSmall"),
                            Position = new Vector2(33, 8),
                        },
                    };
                    break;
                }
            }
            else
            {
                Scale = new Vector2(0.6f);

                AutoSizeAxes = Axes.Both;
                Anchor       = Anchor.Centre;
                Origin       = Anchor.Centre;

                AlwaysPresent = true;

                Children = new Drawable[]
                {
                    Sign = new Container
                    {
                        AutoSizeAxes = Axes.Both,
                        Anchor       = Anchor.Centre,
                        Origin       = Anchor.Centre,

                        Alpha = 0,

                        Child = new Sprite
                        {
                            Anchor  = Anchor.Centre,
                            Origin  = Anchor.Centre,
                            Colour  = character.PrimaryColor,
                            Texture = textures.GetSkinTextureElement("sign")
                        }
                    }
                };
            }
        }