Example #1
0
            public LanguageSelectionButton()
            {
                Action = () =>
                {
                    try
                    {
                        var displayContainer = Game.GetDisplayContainer();
                        if (displayContainer == null)
                        {
                            return;
                        }

                        // Should only has one instance.
                        var dialog = displayContainer.Children.OfType <LanguageSelectionDialog>().FirstOrDefault();

                        if (dialog == null)
                        {
                            displayContainer.Add(dialog = new LanguageSelectionDialog());
                        }

                        dialog.Current = Current;
                        dialog.Show();
                    }
                    catch
                    {
                        // maybe this overlay has been moved into internal.
                    }
                };

                Current.BindValueChanged(e => Text = e.NewValue.DisplayName);
            }
Example #2
0
 public void SetUp() => Schedule(() =>
 {
     var language = new Bindable <CultureInfo>(new CultureInfo("ja"));
     Child        = dialog = new LanguageSelectionDialog
     {
         Current = language,
     };
 });
Example #3
0
        public KaraokeHitObjectComposer(Ruleset ruleset)
            : base(ruleset)
        {
            // Duplicated registration because selection handler need to use it.
            positionCalculator     = new PositionCalculator(9);
            editConfigManager      = new KaraokeRulesetEditConfigManager();
            generatorConfigManager = new KaraokeRulesetEditGeneratorConfigManager();
            checkerConfigManager   = new KaraokeRulesetEditCheckerConfigManager();

            AddInternal(exportLyricManager  = new ExportLyricManager());
            AddInternal(noteManager         = new NoteManager());
            AddInternal(lyricManager        = new LyricManager());
            AddInternal(lyricCheckerManager = new LyricCheckerManager());
            AddInternal(singerManager       = new SingerManager());
            LayerBelowRuleset.Add(languageSelectionDialog = new LanguageSelectionDialog());
        }
Example #4
0
        private void load()
        {
            Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);

            base.Content.AddRange(new Drawable[]
            {
                Content,
                dialogOverlay           = new DialogOverlay(),
                languageSelectionDialog = new LanguageSelectionDialog()
            });

            Dependencies.Cache(dialogOverlay);
            Dependencies.Cache(languageSelectionDialog);

            Child = new TranslateScreen();
        }
Example #5
0
        private void load()
        {
            Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);

            base.Content.AddRange(new Drawable[]
            {
                Content,
                dialogOverlay           = new DialogOverlay(),
                languageSelectionDialog = new LanguageSelectionDialog(),
                importManager           = new ImportLyricManager(),
                lyricCheckerManager     = new LyricCheckerManager()
            });

            Dependencies.Cache(dialogOverlay);
            Dependencies.Cache(languageSelectionDialog);
            Dependencies.Cache(importManager);
            Dependencies.Cache(lyricCheckerManager);
        }