示例#1
0
        /// <inheritdoc cref="Window.PreOpen"/>
        public override void PreOpen()
        {
            _tabWorker.AddTab(
                new TabItem
            {
                ContentDrawer = DrawGeneralSettings, Label = "TKUtils.General.Label".TranslateSimple(), Tooltip = "TKUtils.General.Tooltip".TranslateSimple()
            }
                );

            _tabWorker.AddTab(
                new TabItem {
                ContentDrawer = DrawDataSettings, Label = "TKUtils.Data.Label".TranslateSimple(), Tooltip = "TKUtils.Data.Tooltip".TranslateSimple()
            }
                );

            _tabWorker.AddTab(
                new TabItem
            {
                ContentDrawer = DrawCommandTweakSettings,
                Label         = "TKUtils.CommandTweaks.Label".TranslateSimple(),
                Tooltip       = "TKUtils.CommandTweaks.Tooltip".TranslateSimple()
            }
                );

            _tabWorker.AddTab(
                new TabItem
            {
                ContentDrawer = DrawModCompatSettings, Label = "TKUtils.ModCompat.Label".TranslateSimple(), Tooltip = "TKUtils.ModCompat.Tooltip".TranslateSimple()
            }
                );

            base.PreOpen();
        }
示例#2
0
        private void InitializeTabs()
        {
            _itemTab ??= new TabItem {
                Label = "TKUtils.EditorTabs.Items".TranslateSimple(), ContentDrawer = rect => _itemWorker.Draw()
            };

            _pawnTab ??= new TabItem {
                Label = "TKUtils.EditorTabs.PawnKinds".TranslateSimple(), ContentDrawer = rect => _pawnWorker.Draw()
            };

            _eventTab ??= new TabItem {
                Label = "TKUtils.EditorTabs.Events".TranslateSimple(), ContentDrawer = rect => _eventWorker.Draw()
            };

            _traitTab ??= new TabItem {
                Label = "TKUtils.EditorTabs.Traits".TranslateSimple(), ContentDrawer = rect => _traitWorker.Draw()
            };


            _tabWorker.AddTab(_itemTab);
            _tabWorker.AddTab(_eventTab);
            _tabWorker.AddTab(_traitTab);
            _tabWorker.AddTab(_pawnTab);
        }