Exemplo n.º 1
0
        public PromptForSaveDialog(Action exit, Action saveAndExit, Action cancel)
        {
            HeaderText = "Did you want to save your changes?";

            Icon = FontAwesome.Regular.Save;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Save my masterpiece!",
                    Action = saveAndExit
                },
                new PopupDialogDangerousButton
                {
                    Text   = @"Forget all changes",
                    Action = exit
                },
                new PopupDialogCancelButton
                {
                    Text   = @"Oops, continue editing",
                    Action = cancel
                },
            };
        }
Exemplo n.º 2
0
        public SkinDeleteDialog(Skin skin)
        {
            BodyText   = skin.SkinInfo.Value.Name;
            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"Confirm deletion of";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogDangerousButton
                {
                    Text   = @"Yes. Totally. Delete it.",
                    Action = () =>
                    {
                        if (manager == null)
                        {
                            return;
                        }

                        manager.Delete(skin.SkinInfo.Value);
                        manager.CurrentSkinInfo.SetDefault();
                    },
                },
                new PopupDialogCancelButton
                {
                    Text = @"Firetruck, I didn't mean to!",
                },
            };
        }
Exemplo n.º 3
0
        public CreateNewDifficultyDialog(CreateNewDifficulty createNewDifficulty)
        {
            HeaderText = "Would you like to create a blank difficulty?";

            Icon = FontAwesome.Regular.Clone;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = "Yeah, let's start from scratch!",
                    Action = () => createNewDifficulty.Invoke(false)
                },
                new PopupDialogCancelButton
                {
                    Text   = "No, create an exact copy of this difficulty",
                    Action = () => createNewDifficulty.Invoke(true)
                },
                new PopupDialogCancelButton
                {
                    Text   = "I changed my mind, I want to keep editing this difficulty",
                    Action = () => { }
                }
            };
        }
Exemplo n.º 4
0
        public BeatmapDeleteDialog(WorkingBeatmap beatmap)
        {
            if (beatmap == null)
            {
                throw new ArgumentNullException(nameof(beatmap));
            }

            Icon       = FontAwesome.fa_trash_o;
            HeaderText = @"Confirm deletion of";
            BodyText   = $@"{beatmap.Metadata?.Artist} - {beatmap.Metadata?.Title}";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. Totally. Delete it.",
                    Action = () =>
                    {
                        beatmap.Dispose();
                        manager.Delete(beatmap.BeatmapSetInfo);
                    },
                },
                new PopupDialogCancelButton
                {
                    Text = @"Firetruck, I didn't mean to!",
                },
            };
        }
Exemplo n.º 5
0
        private void load()
        {
            BeatmapInfo beatmap = beatmapManager.QueryBeatmap(b => b.ID == score.BeatmapInfoID);

            Debug.Assert(beatmap != null);

            string accuracy = string.Format(score.Accuracy == 1 ? "{0:P0}" : "{0:P2}", score.Accuracy);

            BodyText = $"{score.User} ({accuracy}, {score.Rank})";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = "Confirm deletion of local score";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = "Yes. Please.",
                    Action = () => scoreManager?.Delete(score)
                },
                new PopupDialogCancelButton
                {
                    Text = "No, I'm still attached.",
                },
            };
        }
Exemplo n.º 6
0
 public OkPopupDialog(Action <bool> okAction = null)
 {
     Buttons = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
     };
 }
Exemplo n.º 7
0
        public DeleteDataErrorDialog()
        {
            HeaderText = "An error occured while trying to delete ROM save data...";
            Icon       = FontAwesome.Solid.Exclamation;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text = @"Ok",
                },
            };
        }
Exemplo n.º 8
0
 public AlreadyContainTimeTagPopupDialog(Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Solid.Globe;
     HeaderText = "Already contains time-tag.";
     BodyText   = "Seems this karaoke file already contains valid time-tag.";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
     };
 }
Exemplo n.º 9
0
 public IPCErrorDialog(string headerText, string bodyText)
 {
     Icon       = FontAwesome.Regular.SadTear;
     HeaderText = headerText;
     BodyText   = bodyText;
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"Alright.",
             Action = () => Expire()
         }
     };
 }
Exemplo n.º 10
0
        public DeleteAllBeatmapsDialog(Action deleteAction)
        {
            BodyText = "删除所有Σ(゚д゚;)?";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"确认删除";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"是的,gkd",
                    Action = deleteAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"不不不! 中止任务!",
                },
            };
        }
Exemplo n.º 11
0
        public DeleteDataDialog(Action action)
        {
            HeaderText = "Delete ROM save data?";
            BodyText   = "Your precious ROM save files will be returned to void. Are you sure?";

            Icon    = FontAwesome.Regular.TrashAlt;
            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. I'll start from zero again.",
                    Action = action
                },
                new PopupDialogCancelButton
                {
                    Text = @"No! Abort mission!",
                },
            };
        }
Exemplo n.º 12
0
        public SaveBeforeGameplayTestDialog(Action saveAndPreview)
        {
            HeaderText = "The beatmap will be saved in order to test it.";

            Icon = FontAwesome.Regular.Save;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = "Sounds good, let's go!",
                    Action = saveAndPreview
                },
                new PopupDialogCancelButton
                {
                    Text = "Oops, continue editing",
                },
            };
        }
Exemplo n.º 13
0
        public DeleteAllBeatmapsDialog(Action deleteAction)
        {
            BodyText = "所有已安裝的圖譜嗎?";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"確認清除";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"是的, 去吧!",
                    Action = deleteAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"不要! 取消任務!",
                },
            };
        }
Exemplo n.º 14
0
 public RollBackResetPopupDialog(IImportLyricSubScreen screen, Action <bool> okAction = null)
 {
     Icon       = screen.Icon;
     HeaderText = "Really sure?";
     BodyText   = $"Are you really sure you wants to roll-back to step '{screen.Title}'? you might lost every change you made.";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"Sure",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Let me think about it",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 15
0
        public BeatmapDeleteDialog(BeatmapSetInfo beatmap)
        {
            BodyText = $@"{beatmap.Metadata?.Artist} - {beatmap.Metadata?.Title}";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"確認刪除圖譜包";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"是, 把它扔掉!",
                    Action = () => manager.Delete(beatmap),
                },
                new PopupDialogCancelButton
                {
                    Text = @"沒有, 我不是這個意思!",
                },
            };
        }
Exemplo n.º 16
0
        public BeatmapDeleteDialog(BeatmapSetInfo beatmap)
        {
            BodyText = $@"{beatmap.Metadata?.Artist} - {beatmap.Metadata?.Title}";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"请确认是否删除:";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"是的,完全删除",
                    Action = () => manager.Delete(beatmap),
                },
                new PopupDialogCancelButton
                {
                    Text = @"没有..我不是这个意思><!",
                },
            };
        }
Exemplo n.º 17
0
        public DeleteAllBeatmapsDialog(Action deleteAction)
        {
            BodyText = "Everything?";

            Icon       = FontAwesome.fa_trash_o;
            HeaderText = @"Confirm deletion of";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. Go for it.",
                    Action = deleteAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"No! Abort mission!",
                },
            };
        }
Exemplo n.º 18
0
 public RollBackPopupDialog(IImportLyricSubScreen screen, Action <bool> okAction = null)
 {
     Icon       = screen.Icon;
     HeaderText = screen.ShortTitle;
     BodyText   = $"Will roll-back to step '{screen.Title}'";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Cancel",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
 public UseAutoGenerateRomajiPopupDialog(Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Solid.Globe;
     HeaderText = "Auto generate romaji";
     BodyText   = "Would you like to use romaji generator to auto generate each lyric's romaji?";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Cancel",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 20
0
            public TestPopupDialog()
            {
                Icon = FontAwesome.Solid.AssistiveListeningSystems;

                HeaderText = @"This is a test popup";
                BodyText   = "I can say lots of stuff and even wrap my words!";

                Buttons = new PopupDialogButton[]
                {
                    new PopupDialogCancelButton
                    {
                        Text = @"Yes. That you can.",
                    },
                    new PopupDialogOkButton
                    {
                        Text = @"You're a fake!",
                    },
                };
            }
Exemplo n.º 21
0
        public MassDeleteConfirmationDialog(Action deleteAction)
        {
            BodyText = "Everything?";

            Icon       = FontAwesome.Regular.TrashAlt;
            HeaderText = @"Confirm deletion of";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogDangerousButton
                {
                    Text   = @"Yes. Go for it.",
                    Action = deleteAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"No! Abort mission!",
                },
            };
        }
Exemplo n.º 22
0
 public CreateNewLanguagePopupDialog(Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Solid.Globe;
     HeaderText = "Create first language.";
     BodyText   = "Seems has no translate language in your beatmap, would you like to create one?";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"Sure",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Let me think about it",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 23
0
 public DeleteSingerDialog(Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Solid.Globe;
     HeaderText = "Select singer";
     BodyText   = "Would you really wants to delete singer?";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Cancel",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 24
0
        public BeatmapDeleteDialog(BeatmapSetInfo beatmap)
        {
            BodyText = $@"{beatmap.Metadata?.Artist} - {beatmap.Metadata?.Title}";

            Icon       = FontAwesome.fa_trash_o;
            HeaderText = @"Confirm deletion of";
            Buttons    = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. Totally. Delete it.",
                    Action = () => manager.Delete(beatmap),
                },
                new PopupDialogCancelButton
                {
                    Text = @"Firetruck, I didn't mean to!",
                },
            };
        }
 public UseLanguageDetectorPopupDialog(Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Solid.Globe;
     HeaderText = "Language detector";
     BodyText   = "Would you like to use language detector to auto assign each lyric's language?";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"OK",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Cancel",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 26
0
 public DeleteLanguagePopupDialog(CultureInfo currentLanguage, Action <bool> okAction = null)
 {
     Icon       = FontAwesome.Regular.TrashAlt;
     HeaderText = "Confirm delete language?";
     BodyText   = $"Are you really sure you wants to delete language '{currentLanguage.Name}'?";
     Buttons    = new PopupDialogButton[]
     {
         new PopupDialogOkButton
         {
             Text   = @"Sure",
             Action = () => okAction?.Invoke(true),
         },
         new PopupDialogCancelButton
         {
             Text   = @"Let me think about it",
             Action = () => okAction?.Invoke(false),
         },
     };
 }
Exemplo n.º 27
0
        public ExternalLinkDialog(string url, Action openExternalLinkAction)
        {
            HeaderText = "Just checking...";
            BodyText   = $"You are about to leave osu! and open the following link in a web browser:\n\n{url}";

            Icon = FontAwesome.fa_warning;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. Go for it.",
                    Action = openExternalLinkAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"No! Abort mission!"
                },
            };
        }
Exemplo n.º 28
0
        public ImportFromStablePopup(Action importFromStable)
        {
            HeaderText = @"You have no beatmaps!";
            BodyText   = "An existing copy of osu! was found, though.\nWould you like to import your beatmaps, skins, collections and scores?\nThis will create a second copy of all files on disk.";

            Icon = FontAwesome.Solid.Plane;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes please!",
                    Action = importFromStable
                },
                new PopupDialogCancelButton
                {
                    Text = @"No, I'd like to start from scratch",
                },
            };
        }
Exemplo n.º 29
0
        public ImportFromStablePopup(Action importFromStable)
        {
            HeaderText = @"You have no beatmaps!";
            BodyText   = "An existing copy of osu! was found, though.\nWould you like to import your beatmaps (and skins)?";

            Icon = FontAwesome.fa_plane;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes please!",
                    Action = importFromStable
                },
                new PopupDialogCancelButton
                {
                    Text = @"No, I'd like to start from scratch",
                },
            };
        }
Exemplo n.º 30
0
        public DeleteLayoutDialog(LyricLayout layout, Action deleteAction)
        {
            HeaderText = "Confirm deletion of";
            BodyText   = $"Are you sure you want to delete layout {layout.Name}?";

            Icon = FontAwesome.Regular.TrashAlt;

            Buttons = new PopupDialogButton[]
            {
                new PopupDialogOkButton
                {
                    Text   = @"Yes. Go for it.",
                    Action = deleteAction
                },
                new PopupDialogCancelButton
                {
                    Text = @"No! Abort mission!",
                },
            };
        }