Exemple #1
0
        private void load(OsuColour colours, IAPIProvider api)
        {
            InternalChildren = new Drawable[]
            {
                icon = new SpriteIcon
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Icon   = FontAwesome.Solid.ExclamationTriangle,
                    Size   = new Vector2(icon_size),
                    Y      = icon_y,
                },
                new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Y        = icon_y + icon_size,
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.TopCentre,
                    Children = new Drawable[]
                    {
                        textFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Spacing          = new Vector2(0, 2),
                        },
                        supportFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Alpha            = 0,
                            Spacing          = new Vector2(0, 2),
                        },
                    }
                }
            };

            textFlow.AddText("这是一个 ", t => t.Font     = t.Font.With(Typeface.Exo, 30, FontWeight.Light));
            textFlow.AddText("非常早期的构建版本", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.SemiBold));

            textFlow.AddParagraph("一些事情可能不会按预期工作", t => t.Font = t.Font.With(size: 20));
            textFlow.NewParagraph();

            Action <SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold);

            textFlow.AddParagraph("欢迎来到github的issues页进行反馈", format);
            textFlow.NewParagraph();

            textFlow.AddText("访问 ", format);
            textFlow.AddLink("discord.gg/ppy", "https://discord.gg/ppy", creationParameters: format);
            textFlow.AddText("来一起帮助开发或获取最新进度!", format);

            textFlow.NewParagraph();
            textFlow.NewParagraph();
            textFlow.NewParagraph();

            iconColour = colours.Yellow;

            currentUser.BindTo(api.LocalUser);
            currentUser.BindValueChanged(e =>
            {
                supportFlow.Children.ForEach(d => d.FadeOut().Expire());

                if (e.NewValue.IsSupporter)
                {
                    supportFlow.AddText("感谢支持osu!", format);
                }
                else
                {
                    supportFlow.AddText("考虑成为一名 ", format);
                    supportFlow.AddLink("osu!supporter", "https://osu.ppy.sh/home/support", creationParameters: format);
                    supportFlow.AddText("来帮助我们维护这个游戏", format);
                }

                heart = supportFlow.AddIcon(FontAwesome.Solid.Heart, t =>
                {
                    t.Padding = new MarginPadding {
                        Left = 5
                    };
                    t.Font   = t.Font.With(size: 12);
                    t.Origin = Anchor.Centre;
                    t.Colour = colours.Pink;
                }).First();

                if (IsLoaded)
                {
                    animateHeart();
                }

                if (supportFlow.IsPresent)
                {
                    supportFlow.FadeInFromZero(500);
                }
            }, true);
        }
Exemple #2
0
        private void load(OsuColour colours, IAPIProvider api)
        {
            InternalChildren = new Drawable[]
            {
                icon = new SpriteIcon
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Icon   = FontAwesome.Solid.ExclamationTriangle,
                    Size   = new Vector2(icon_size),
                    Y      = icon_y,
                },
                new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Y        = icon_y + icon_size,
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.TopCentre,
                    Children = new Drawable[]
                    {
                        textFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Spacing          = new Vector2(0, 2),
                        },
                        supportFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Alpha            = 0,
                            Spacing          = new Vector2(0, 2),
                        },
                    }
                }
            };

            textFlow.AddText("This is an ", t => t.Font             = t.Font.With(Typeface.Exo, 30, FontWeight.Light));
            textFlow.AddText("early development build", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.SemiBold));

            textFlow.AddParagraph("Things may not work as expected", t => t.Font = t.Font.With(size: 20));
            textFlow.NewParagraph();

            Action <SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold);

            textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format);
            textFlow.NewParagraph();

            textFlow.AddText("Visit ", format);
            textFlow.AddLink("discord.gg/ppy", "https://discord.gg/ppy", creationParameters: format);
            textFlow.AddText(" to help out or follow progress!", format);

            textFlow.NewParagraph();
            textFlow.NewParagraph();
            textFlow.NewParagraph();

            iconColour = colours.Yellow;

            currentUser.BindTo(api.LocalUser);
            currentUser.BindValueChanged(e =>
            {
                supportFlow.Children.ForEach(d => d.FadeOut().Expire());

                if (e.NewValue.IsSupporter)
                {
                    supportFlow.AddText("Thank you for supporting osu!", format);
                }
                else
                {
                    supportFlow.AddText("Consider becoming an ", format);
                    supportFlow.AddLink("osu!supporter", "https://osu.ppy.sh/home/support", creationParameters: format);
                    supportFlow.AddText(" to help support the game", format);
                }

                heart = supportFlow.AddIcon(FontAwesome.Solid.Heart, t =>
                {
                    t.Padding = new MarginPadding {
                        Left = 5
                    };
                    t.Font   = t.Font.With(size: 12);
                    t.Origin = Anchor.Centre;
                    t.Colour = colours.Pink;
                }).First();

                if (IsLoaded)
                {
                    animateHeart();
                }

                if (supportFlow.IsPresent)
                {
                    supportFlow.FadeInFromZero(500);
                }
            }, true);
        }
Exemple #3
0
        private void load(OsuColour colours, IAPIProvider api)
        {
            InternalChildren = new Drawable[]
            {
                icon = new SpriteIcon
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Icon   = FontAwesome.Solid.ExclamationTriangle,
                    Size   = new Vector2(icon_size),
                    Y      = icon_y,
                },
                new FillFlowContainer
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Direction        = FillDirection.Vertical,
                    Y        = icon_y + icon_size,
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.TopCentre,
                    Children = new Drawable[]
                    {
                        textFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Spacing          = new Vector2(0, 2),
                        },
                        supportFlow = new LinkFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            TextAnchor       = Anchor.TopCentre,
                            Anchor           = Anchor.TopCentre,
                            Origin           = Anchor.TopCentre,
                            Alpha            = 0,
                            Spacing          = new Vector2(0, 2),
                        },
                    }
                }
            };

            textFlow.AddText("This is ", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.Light));
            textFlow.AddText("Powerlated's OSU CHEAT", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.SemiBold));

            textFlow.AddParagraph("Things may not work as expected", t => t.Font = t.Font.With(size: 20));
            textFlow.NewParagraph();

            Action <SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold);

            textFlow.AddParagraph("Don't ask.", format);
            textFlow.NewParagraph();

            textFlow.NewParagraph();
            textFlow.NewParagraph();
            textFlow.NewParagraph();

            iconColour = colours.Yellow;

            currentUser.BindTo(api.LocalUser);
            currentUser.BindValueChanged(e =>
            {
                supportFlow.Children.ForEach(d => d.FadeOut().Expire());

                if (e.NewValue.IsSupporter)
                {
                    supportFlow.AddText("Thank you for supporting osu!", format);
                }
                else
                {
                    supportFlow.AddText("Consider sucking on ", format);
                    supportFlow.AddLink("my!c**k", "https://pornhub.com", creationParameters: format);
                    supportFlow.AddText(" to make me nut", format);
                }

                heart = supportFlow.AddIcon(FontAwesome.Solid.Heart, t =>
                {
                    t.Padding = new MarginPadding {
                        Left = 5
                    };
                    t.Font   = t.Font.With(size: 12);
                    t.Origin = Anchor.Centre;
                    t.Colour = colours.Pink;
                }).First();

                if (IsLoaded)
                {
                    animateHeart();
                }

                if (supportFlow.IsPresent)
                {
                    supportFlow.FadeInFromZero(500);
                }
            }, true);
        }