Beispiel #1
0
 private void load(ConfigColourProvider colourProvider, Bindable <SettingsSection> selectedSection)
 {
     selectedSection.BindValueChanged(x =>
     {
         var colour = colourProvider.GetBackground3Colour(x.NewValue);
         Background.Delay(200).Then().FadeColour(colour, 500);
     });
 }
Beispiel #2
0
        private void load(ConfigColourProvider colourProvider)
        {
            var colour = colourProvider.GetContentColour(this);

            // set header box and text to target color.
            var headerBox = InternalChildren.FirstOrDefault();
            var title     = (InternalChildren.LastOrDefault() as Container)?.Children?.FirstOrDefault();

            if (headerBox == null || title == null)
            {
                return;
            }

            headerBox.Colour = colour;
            title.Colour     = colour;
        }
Beispiel #3
0
            private void load(ConfigColourProvider colourProvider, Bindable <SettingsSection> selectedSection, Bindable <SettingsSubsection> selectedSubsection)
            {
                // create hove background.
                scrollContainer.Add(background = new Box
                {
                    RelativeSizeAxes = Axes.X,
                    Depth            = 1,
                    Alpha            = 0.6f
                });

                selectedSection.BindValueChanged(x =>
                {
                    var colour = colourProvider.GetBackgroundColour(x.NewValue);
                    background.Delay(200).Then().FadeColour(colour, 500);
                });

                selectedSubsection.BindValueChanged(x =>
                {
                    const int offset = 20;
                    var position     = scrollContainer.GetChildPosInContent(x.NewValue);
                    background.MoveToY(position + offset, 50);
                    background.ResizeHeightTo(x.NewValue.DrawHeight, 100);
                });
            }