Exemple #1
0
        void ShouldClearOverlay()
        {
            NotificationOverlay TestOverlay = new NotificationOverlay("Message One", "Message Two");

            _viewModel.Overlay = TestOverlay;
            _viewModel.ClearOverlay.Execute(null);
        }
Exemple #2
0
        private void load()
        {
            NotificationOverlay notifications;

            dependencies.Cache(notifications = new NotificationOverlay());

            ConfirmationOverlay confirmationOverlay;

            dependencies.Cache(confirmationOverlay = new ConfirmationOverlay());

            ScreenStack screens = new ScreenStack();

            screens.Push(new MainMenuScreen());

            Add(new BasicContextMenuContainer
            {
                RelativeSizeAxes = Axes.Both,
                Child            = new IWannaTooltipContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        screens,
                        notifications,
                        confirmationOverlay
                    }
                }
            });
        }
Exemple #3
0
        private void load(GameHost host, OsuConfigManager config, Storage storage, NotificationOverlay notificationOverlay, AudioManager audio)
        {
            this.host                = host;
            this.storage             = storage.GetStorageForDirectory(@"screenshots");
            this.notificationOverlay = notificationOverlay;

            screenshotFormat = config.GetBindable <ScreenshotFormat>(OsuSetting.ScreenshotFormat);

            shutter = audio.Sample.Get("UI/shutter");
        }
            private void load(OsuColour colours, ChatOverlay chatOverlay, NotificationOverlay notificationOverlay)
            {
                IconBackground.Colour = colours.PurpleDark;

                Activated = delegate
                {
                    notificationOverlay.Hide();
                    chatOverlay.HighlightMessage(message, channel);
                    return(true);
                };
            }
        private void Load()
        {
            var lipsumGenerator     = new LipsumGenerator();
            var notificationOverlay = new NotificationOverlay();

            AddSetupStep("Setup Overlay", () =>
            {
                Add(notificationOverlay = new NotificationOverlay());
            });

            AddStep("Create random Lorem Ipsum", () =>
            {
                var random       = new Random();
                var randomColour = new Color4((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble(), 1f);

                notificationOverlay.AddNotification(
                    new LocalisedString(lipsumGenerator.GenerateLipsum(4, Features.Sentences, FormatStrings.Paragraph.LineBreaks)),
                    randomColour, 5000);
            });
        }