예제 #1
0
            private void load(OverlayColourProvider overlayColours, GameHost host, Bindable <APIChangelogBuild> current)
            {
                current.BindValueChanged(e =>
                {
                    var isCurrent = post == e.NewValue;

                    // update hover color.
                    Colour      = isCurrent ? Color4.White : overlayColours.Light2;
                    HoverColour = isCurrent ? Color4.White : overlayColours.Light1;

                    // update font.
                    text.OfType <SpriteText>().ForEach(f =>
                    {
                        f.Font = OsuFont.GetFont(size: 12, weight: isCurrent ? FontWeight.SemiBold : FontWeight.Medium);
                    });
                }, true);

                TooltipText = "view current changelog";

                Action = () => current.Value = post;
            }