Esempio n. 1
0
 private void load(KaraokeRulesetEditConfigManager editConfigManager)
 {
     editConfigManager.BindWith(KaraokeRulesetEditSetting.EditMode, bindableEditMode);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.DisplayRuby, bindableDisplayRubyToggle);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.DisplayRomaji, bindableDisplayRomajiToggle);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.DisplayTranslate, bindableDisplayTranslateToggle);
 }
Esempio n. 2
0
        public TestSceneLyricEditor()
        {
            // It's a tricky to let osu! to read karaoke testing beatmap
            KaraokeLegacyBeatmapDecoder.Register();

            configManager = new KaraokeRulesetEditConfigManager();
        }
Esempio n. 3
0
        public AutoFocusToEditLyricMenu(KaraokeRulesetEditConfigManager config, string text)
            : base(text)
        {
            var selections = new List <MenuItem>
            {
                new ToggleMenuItem(getName(disable_selection_index), MenuItemType.Standard, _ => updateAutoFocusToEditLyric())
            };

            selections.AddRange(Enumerable.Range(0, 4).Select(x => new ToggleMenuItem(getName(x), MenuItemType.Standard, _ => updateAutoFocusToEditLyricSkipRows(x))));
            Items = selections;

            config.BindWith(KaraokeRulesetEditSetting.AutoFocusToEditLyric, bindableAutoFocusToEditLyric);
            config.BindWith(KaraokeRulesetEditSetting.AutoFocusToEditLyricSkipRows, bindableAutoFocusToEditLyricSkipRows);

            // mark disable as selected option.
            bindableAutoFocusToEditLyric.BindValueChanged(e =>
            {
                updateSelectionState();
            }, true);

            // mark line as selected option.
            bindableAutoFocusToEditLyricSkipRows.BindValueChanged(e =>
            {
                updateSelectionState();
            }, true);
        }
Esempio n. 4
0
        public TestSceneImportLyric()
        {
            var beatmap        = new TestKaraokeBeatmap(null);
            var karaokeBeatmap = new KaraokeBeatmapConverter(beatmap, new KaraokeRuleset()).Convert() as KaraokeBeatmap;

            editorBeatmap = new EditorBeatmap(karaokeBeatmap);
            configManager = new KaraokeRulesetEditConfigManager();
        }
Esempio n. 5
0
 private void load(KaraokeRulesetEditConfigManager editConfigManager)
 {
     editConfigManager.BindWith(KaraokeRulesetEditSetting.LyricEditorFontSize, bindableLyricEditorFontSize);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.LyricEditorMode, bindableLyricEditorMode);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.RecordingMovingCaretMode, bindableRecordingMovingCaretMode);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.AutoFocusToEditLyric, bindableAutoFocusToEditLyric);
     editConfigManager.BindWith(KaraokeRulesetEditSetting.AutoFocusToEditLyricSkipRows, bindableAutoFocusToEditLyricSkipRows);
 }
        public NoteEditorPreviewMenu(KaraokeRulesetEditConfigManager config, string text)
            : base(text)
        {
            this.config = config;

            Items = new[]
            {
                createToggleMenu("Display ruby", KaraokeRulesetEditSetting.DisplayRuby),
                createToggleMenu("Display romaji", KaraokeRulesetEditSetting.DisplayRomaji),
                createToggleMenu("Display translate", KaraokeRulesetEditSetting.DisplayTranslate),
            };
        }
Esempio n. 7
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());
        }
Esempio n. 8
0
        public LyricEditorTextSizeMenu(KaraokeRulesetEditConfigManager config, string text)
            : base(text)
        {
            Items = createMenuItems();

            config.BindWith(KaraokeRulesetEditSetting.LyricEditorFontSize, bindableFontSize);
            bindableFontSize.BindValueChanged(e =>
            {
                var newSelection = e.NewValue;
                Items.OfType <ToggleMenuItem>().ForEach(x =>
                {
                    var match     = x.Text.Value == FontUtils.GetText(newSelection);
                    x.State.Value = match;
                });
            }, true);
        }
Esempio n. 9
0
        protected EnumMenu(KaraokeRulesetEditConfigManager config, string text)
            : base(text)
        {
            Items = createMenuItems();

            config.BindWith(Setting, bindableEnum);
            bindableEnum.BindValueChanged(e =>
            {
                var newSelection = e.NewValue;
                Items.OfType <ToggleMenuItem>().ForEach(x =>
                {
                    var match     = x.Text.Value == GetName(newSelection);
                    x.State.Value = match;
                });
            }, true);
        }
        private void load()
        {
            var     config = new KaraokeRulesetEditConfigManager();
            IScreen editor = null;

            Add(new Container
            {
                Anchor           = Anchor.TopCentre,
                Origin           = Anchor.TopCentre,
                RelativeSizeAxes = Axes.X,
                Height           = 50,
                Y     = 50,
                Child = new EditorMenuBar
                {
                    RelativeSizeAxes = Axes.Both,
                    Items            = new[]
                    {
                        new MenuItem("File")
                        {
                            Items = new MenuItem[]
                            {
                                new ImportLyricMenu(editor, "Import from text"),
                                new ImportLyricMenu(editor, "Import from .lrc file"),
                                new EditorMenuItemSpacer(),
                                new EditorMenuItem("Export to .lrc", MenuItemType.Standard, () => { }),
                                new EditorMenuItem("Export to text", MenuItemType.Standard, () => { }),
                                new EditorMenuItem("Export to json", MenuItemType.Destructive, () => { }),
                            }
                        },
                        new MenuItem("View")
                        {
                            Items = new MenuItem[]
                            {
                                new EditModeMenu(config, "Edit mode"),
                                new EditorMenuItemSpacer(),
                                new LyricEditorModeMenu(config, "Lyric editor mode"),
                                new LyricEditorTextSizeMenu(config, "Text size"),
                                new EditorMenuItemSpacer(),
                                new NoteEditorPreviewMenu(config, "Note editor"),
                            }
                        },
                        new MenuItem("Tools")
                        {
                            Items = new MenuItem[]
                            {
                                new ManagerMenu(editor, "Manage"),
                                new GeneratorMenu("Generator"),
                            }
                        },
                        new MenuItem("Config")
                        {
                            Items = new MenuItem[]
                            {
                                new EditorMenuItem("Lyric editor"),
                                new GeneratorConfigMenu("Generator"),
                            }
                        }
                    }
                }
            });
        }
Esempio n. 11
0
 public LyricEditorModeMenu(KaraokeRulesetEditConfigManager config, string text)
     : base(config, text)
 {
 }
Esempio n. 12
0
 public LockStateMenu(KaraokeRulesetEditConfigManager config, string text)
     : base(config, text)
 {
 }
Esempio n. 13
0
 private void load(KaraokeRulesetEditConfigManager editConfigManager)
 {
     editConfigManager.BindWith(KaraokeRulesetEditSetting.EditMode, bindableEditMode);
 }