示例#1
0
        public virtual void TestPlayIntroWithFailingAudioDevice()
        {
            AddStep("hide notifications", () => notifications.Hide());
            AddStep("restart sequence", () =>
            {
                logo.FinishTransforms();
                logo.IsTracking = false;

                IntroStack?.Expire();

                Add(IntroStack = new OsuScreenStack
                {
                    RelativeSizeAxes = Axes.Both,
                });

                IntroStack.Push(intro = CreateScreen());
            });

            AddStep("trigger failure", () =>
            {
                trackResetDelegate = Scheduler.AddDelayed(() =>
                {
                    intro.Beatmap.Value.Track.Seek(0);
                }, 0, true);
            });

            AddUntilStep("wait for menu", () => intro.DidLoadMenu);

            if (IntroReliesOnTrack)
            {
                AddUntilStep("wait for notification", () => notifications.UnreadCount.Value == 1);
            }

            AddStep("uninstall delegate", () => trackResetDelegate?.Cancel());
        }
示例#2
0
            private void load(OsuColour colours, NotificationOverlay notificationOverlay)
            {
                Icon = FontAwesome.Solid.BatteryQuarter;
                IconBackgound.Colour = colours.RedDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    return(true);
                };
            }
            private void load(OsuColour colours, ChatOverlay chatOverlay, NotificationOverlay notificationOverlay)
            {
                IconBackground.Colour = colours.PurpleDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    chatOverlay.HighlightMessage(message, channel);
                    return(true);
                };
            }
示例#4
0
            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);
                };
            }
示例#5
0
            private void load(OsuColour colours, NotificationOverlay notificationOverlay, GameHost host)
            {
                Icon = FontAwesome.Solid.CheckSquare;
                IconBackgound.Colour = colours.BlueDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    host.OpenUrlExternally($"https://github.com/hornyyy/Osu-Toy/releases/tag/{version}");
                    return(true);
                };
            }
示例#6
0
            private void load(OsuColour colours, ChatOverlay chatOverlay, NotificationOverlay notificationOverlay, ChannelManager channelManager)
            {
                IconBackground.Colour = colours.PurpleDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    chatOverlay.Show();
                    channelManager.CurrentChannel.Value = channel;

                    return(true);
                };
            }
示例#7
0
            private void load(OsuColour colours, AudioManager audioManager, NotificationOverlay notificationOverlay, VolumeOverlay volumeOverlay)
            {
                Icon = FontAwesome.Solid.VolumeMute;
                IconBackgound.Colour = colours.RedDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();

                    volumeOverlay.IsMuted.Value = false;
                    audioManager.Volume.SetDefault();
                    audioManager.VolumeTrack.SetDefault();

                    return(true);
                };
            }
示例#8
0
            private void load(OsuColour colours, AudioManager audioManager, NotificationOverlay notificationOverlay, VolumeOverlay volumeOverlay)
            {
                Icon = FontAwesome.Solid.VolumeMute;
                IconBackground.Colour = colours.RedDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();

                    volumeOverlay.IsMuted.Value = false;

                    // Check values before resetting, as the user may have only had mute enabled, in which case we might not need to adjust volumes.
                    if (audioManager.Volume.Value <= volume_requirement)
                    {
                        audioManager.Volume.SetDefault();
                    }
                    if (audioManager.VolumeTrack.Value <= volume_requirement)
                    {
                        audioManager.VolumeTrack.SetDefault();
                    }

                    return(true);
                };
            }