Пример #1
0
            private void load(ChangelogOverlay changelog)
            {
                if (!isDebug)
                {
                    Action = () => changelog?.ShowBuild(OsuGameBase.CLIENT_STREAM_NAME, version);
                }

                Add(new OsuSpriteText
                {
                    Font = OsuFont.GetFont(size: 16),

                    Text    = version,
                    Anchor  = Anchor.Centre,
                    Origin  = Anchor.Centre,
                    Y       = -10,
                    Padding = new MarginPadding(5),
                    Colour  = isDebug ? colours.Red : Color4.White,
                });
                Add(new OsuSpriteText
                {
                    Font = OsuFont.GetFont(size: 16),

                    Text    = "中文化 by github@appleneko2001",
                    Anchor  = Anchor.Centre,
                    Origin  = Anchor.Centre,
                    Y       = 10,
                    Padding = new MarginPadding(5),
                    Colour  = isDebug ? colours.Red : Color4.White,
                });
            }
            private void load(OsuColour colours, ChangelogOverlay changelog, NotificationOverlay notificationOverlay)
            {
                Icon = FontAwesome.Solid.CheckSquare;
                IconBackgound.Colour = colours.BlueDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    changelog.ShowBuild(OsuGameBase.CLIENT_STREAM_NAME, version);
                    return(true);
                };
            }
Пример #3
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            Add(changelog = new ChangelogOverlay());
            AddStep(@"Show", changelog.Show);
            AddStep(@"Hide", changelog.Hide);

            AddWaitStep("wait for hide", 3);

            AddStep(@"Show with Lazer 2018.712.0", () =>
            {
                changelog.ShowBuild(new APIChangelogBuild
                {
                    Version        = "2018.712.0",
                    DisplayVersion = "2018.712.0",
                    UpdateStream   = new APIUpdateStream {
                        Name = OsuGameBase.CLIENT_STREAM_NAME
                    },
                    ChangelogEntries = new List <APIChangelogEntry>
                    {
                        new APIChangelogEntry
                        {
                            Category    = "Test",
                            Title       = "Title",
                            MessageHtml = "Message",
                        }
                    }
                });
                changelog.Show();
            });

            AddWaitStep("wait for show", 3);
            AddStep(@"Hide", changelog.Hide);
            AddWaitStep("wait for hide", 3);

            AddStep(@"Show with listing", () =>
            {
                changelog.ShowListing();
                changelog.Show();
            });
        }
        protected override void LoadComplete()
        {
            base.LoadComplete();

            Add(changelog = new ChangelogOverlay());
            AddStep(@"Show", changelog.Show);
            AddStep(@"Hide", changelog.Hide);

            AddWaitStep("wait for hide", 3);

            AddStep(@"Show with Lazer 2018.712.0", () =>
            {
                changelog.ShowBuild(new APIChangelogBuild
                {
                    Version        = "2018.712.0",
                    DisplayVersion = "2018.712.0",
                    UpdateStream   = new APIUpdateStream {
                        Name = OsuGameBase.CLIENT_STREAM_NAME
                    },
                    ChangelogEntries = new List <APIChangelogEntry>
                    {
                        new APIChangelogEntry
                        {
                            Category    = "Test",
                            Title       = "Title",
                            MessageHtml = "Message",
                        }
                    }
                });
                changelog.Show();
            });

            AddWaitStep("wait for show", 3);
            AddStep(@"Hide", changelog.Hide);
            AddWaitStep("wait for hide", 3);

            AddStep(@"Show with listing", () =>
            {
                changelog.ShowListing();
                changelog.Show();
            });

            AddStep(@"Ensure HTML string unescaping", () =>
            {
                changelog.ShowBuild(new APIChangelogBuild
                {
                    Version        = "2019.920.0",
                    DisplayVersion = "2019.920.0",
                    UpdateStream   = new APIUpdateStream
                    {
                        Name        = "Test",
                        DisplayName = "Test"
                    },
                    ChangelogEntries = new List <APIChangelogEntry>
                    {
                        new APIChangelogEntry
                        {
                            Category    = "Testing HTML strings unescaping",
                            Title       = "Ensuring HTML strings are being unescaped",
                            MessageHtml = "&quot;&quot;&quot;This text should appear triple-quoted&quot;&quot;&quot;    &gt;_&lt;",
                            GithubUser  = new APIChangelogUser
                            {
                                DisplayName = "Dummy",
                                OsuUsername = "******",
                            }
                        },
                    }
                });
            });
        }