Beispiel #1
0
        private void refreshSelectedMods()
        {
            SelectedMods.Value = modSectionsContainer.Children.SelectMany(s => s.Buttons.Select(x => x.SelectedMod).Where(x => x != null)).ToArray();

            double multiplier = 1.0;
            bool   ranked     = true;

            foreach (Mod mod in SelectedMods.Value)
            {
                multiplier *= mod.ScoreMultiplier;
                ranked     &= mod.Ranked;
            }

            // 1.00x
            // 1.05x
            // 1.20x

            multiplierLabel.Text = $"{multiplier:N2}x";
            string rankedString = ranked ? "Ranked" : "Unranked";

            rankedLabel.Text = $@"{rankedString}, Score Multiplier: ";

            if (multiplier > 1.0)
            {
                multiplierLabel.FadeColour(highMultiplierColour, 200);
            }
            else if (multiplier < 1.0)
            {
                multiplierLabel.FadeColour(lowMultiplierColour, 200);
            }
            else
            {
                multiplierLabel.FadeColour(Color4.White, 200);
            }
        }
Beispiel #2
0
        private void updateMods()
        {
            double multiplier = 1.0;
            bool   ranked     = true;

            foreach (Mod mod in SelectedMods.Value)
            {
                multiplier *= mod.ScoreMultiplier;
                ranked     &= mod.Ranked;
            }

            MultiplierLabel.Text = $"{multiplier:N2}x";
            if (multiplier > 1.0)
            {
                MultiplierLabel.FadeColour(HighMultiplierColour, 200);
            }
            else if (multiplier < 1.0)
            {
                MultiplierLabel.FadeColour(LowMultiplierColour, 200);
            }
            else
            {
                MultiplierLabel.FadeColour(Color4.White, 200);
            }

            UnrankedLabel.FadeTo(ranked ? 0 : 1, 200);
        }
Beispiel #3
0
        private void refreshSelectedMods()
        {
            SelectedMods.Value = ModSectionsContainer.Children.SelectMany(s => s.SelectedMods).ToArray();

            double multiplier = 1.0;
            bool   ranked     = true;

            foreach (Mod mod in SelectedMods.Value)
            {
                multiplier *= mod.ScoreMultiplier;
                ranked     &= mod.Ranked;
            }

            MultiplierLabel.Text = $"{multiplier:N2}x";
            if (!ranked)
            {
                MultiplierLabel.Text += " (Unranked)";
            }

            if (multiplier > 1.0)
            {
                MultiplierLabel.FadeColour(HighMultiplierColour, 200);
            }
            else if (multiplier < 1.0)
            {
                MultiplierLabel.FadeColour(LowMultiplierColour, 200);
            }
            else
            {
                MultiplierLabel.FadeColour(Color4.White, 200);
            }
        }
Beispiel #4
0
        protected override bool OnHover(InputState state)
        {
            if (!channel.Joined.Value)
            {
                name.FadeColour(hoverColour, 50, EasingTypes.OutQuint);
            }

            return(base.OnHover(state));
        }
Beispiel #5
0
        protected override bool OnHover(HoverEvent e)
        {
            if (!channel.Joined.Value)
            {
                name.FadeColour(hoverColour, 50, Easing.OutQuint);
            }

            return(base.OnHover(e));
        }
Beispiel #6
0
 private void updateHoverState()
 {
     if (isBinding)
     {
         box.FadeColour(Color4.White, transition_time, Easing.OutQuint);
         Text.FadeColour(Color4.Black, transition_time, Easing.OutQuint);
     }
     else
     {
         box.FadeColour(IsHovered ? hoverColour : Color4.Black, transition_time, Easing.OutQuint);
         Text.FadeColour(IsHovered ? Color4.Black : Color4.White, transition_time, Easing.OutQuint);
     }
 }
Beispiel #7
0
 private void updateColour(bool joined)
 {
     if (joined)
     {
         name.FadeColour(Color4.White, transition_duration);
         joinedCheckmark.FadeTo(1f, transition_duration);
         topic.FadeTo(0.8f, transition_duration);
         topic.FadeColour(Color4.White, transition_duration);
         FadeColour(joinedColour, transition_duration);
     }
     else
     {
         joinedCheckmark.FadeTo(0f, transition_duration);
         topic.FadeTo(1f, transition_duration);
         topic.FadeColour(topicColour, transition_duration);
         FadeColour(Color4.White, transition_duration);
     }
 }
Beispiel #8
0
            private void load(ConfigColourProvider colourProvider, Bindable <SettingsSection> selectedSection)
            {
                selectedSection.BindValueChanged(x =>
                {
                    var colour = colourProvider.GetContentColour(x.NewValue);

                    pageTitle.Text = x.NewValue.Header;
                    pageTitle.FadeColour(colour, 200);
                });
            }
Beispiel #9
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            SelectorActive.BindValueChanged(selector =>
            {
                if (selector.NewValue)
                {
                    text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
                    selectBox.FadeIn(300, Easing.OutQuint);
                }
                else
                {
                    text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
                    selectBox.FadeOut(200, Easing.OutQuint);
                }
            }, true);

            Action = () => SelectorActive.Value = true;
        }
Beispiel #10
0
        private void updateState()
        {
            bool selected = selectedChannel.Value == Channel && !SelectorActive.Value;

            if (selected)
            {
                selectBox.FadeIn(300, Easing.OutQuint);
            }
            else
            {
                selectBox.FadeOut(200, Easing.OutQuint);
            }

            if (Unread.Value || selected)
            {
                text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
            }
            else
            {
                text.FadeColour(colourProvider.Light3, 200, Easing.OutQuint);
            }
        }
Beispiel #11
0
        private void updateMods()
        {
            var multiplier = 1.0;

            foreach (var mod in SelectedMods.Value)
            {
                multiplier *= mod.ScoreMultiplier;
            }

            MultiplierLabel.Text = $"{multiplier:N2}x";
            if (multiplier > 1.0)
            {
                MultiplierLabel.FadeColour(HighMultiplierColour, 200);
            }
            else if (multiplier < 1.0)
            {
                MultiplierLabel.FadeColour(LowMultiplierColour, 200);
            }
            else
            {
                MultiplierLabel.FadeColour(Color4.White, 200);
            }
        }
Beispiel #12
0
        public void MarkUnavailable()
        {
            loadFailedIcon
            .FadeIn(250, Easing.In)
            .Then(800)
            .FadeOut(400, Easing.Out);

            loadFailedText
            .FadeIn(250, Easing.In)
            .Then(800)
            .FadeOut(400, Easing.Out);

            romNameText
            .FadeColour(Color4.Red, 250, Easing.In)
            .Then(800)
            .FadeColour(Color4.White, 400, Easing.Out);
        }
Beispiel #13
0
 private void updateState()
 {
     text.FadeColour(Active.Value || IsHovered ? hoveredColour : normalColour, fade_duration, Easing.OutQuint);
     text.FadeTo(Active.Value ? 0 : 1, fade_duration, Easing.OutQuint);
     textBold.FadeTo(Active.Value ? 1 : 0, fade_duration, Easing.OutQuint);
 }
Beispiel #14
0
 private void updateState()
 {
     text.FadeColour(IsHovered ? colourProvider.Light1 : getStateColour(), 200, Easing.OutQuint);
     text.Font = text.Font.With(weight: Active.Value ? FontWeight.SemiBold : FontWeight.Regular);
 }
Beispiel #15
0
 private void onBlockedStateChanged(ValueChangedEvent <bool> isBlocked)
 {
     drawableText.FadeColour(isBlocked.NewValue ? colourProvider.Foreground1 : Color4.White, duration, Easing.OutQuint);
     background.FadeTo(isBlocked.NewValue ? 0 : 1, duration, Easing.OutQuint);
 }
Beispiel #16
0
 private void updateState()
 {
     acronymText.FadeColour(Active.Value ? activeForegroundColour : inactiveForegroundColour, 200, Easing.OutQuint);
     background.FadeColour(Active.Value ? activeBackgroundColour : inactiveBackgroundColour, 200, Easing.OutQuint);
 }