public MetaContainer(BuildInformation buildInfo, TagEntry tag, TagHierarchy tags, ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _tag = tag;
            _tags = tags;
            _buildInfo = buildInfo;
            _cache = cache;
            _streamManager = streamManager;
            _rteProvider = rteProvider;
            _stringIDTrie = stringIDTrie;

            tbMetaEditors.SelectedIndex = (int)Settings.halomapLastSelectedMetaEditor;

            // Create Meta Information Tab
            _metaInformation = new MetaInformation(_buildInfo, _tag, _cache);
            tabTagInfo.Content = _metaInformation;

            // Create Meta Editor Tab
            _metaEditor = new MetaEditor(_buildInfo, _tag, this, _tags, _cache, _streamManager, _rteProvider, _stringIDTrie)
                              {
                                  Padding = new Thickness(0)
                              };
            tabMetaEditor.Content = _metaEditor;

            // Create Plugin Editor Tab
            _pluginEditor = new PluginEditor(_buildInfo, _tag, this, _metaEditor);
            tabPluginEditor.Content = _pluginEditor;
        }
        public MetaContainer(BuildInformation buildInfo, TagEntry tag, TagHierarchy tags, ICacheFile cache, IStreamManager streamManager)
        {
            InitializeComponent();

            _tag = tag;
            _buildInfo = buildInfo;
            _cache = cache;

            tbMetaEditors.SelectedIndex = (int)Settings.halomapLastSelectedMetaEditor;

            // Create Meta Information Tab
            MetaInformation metaInformation = new MetaInformation(_buildInfo, _tag, _cache);
            tabTagInfo.Content = metaInformation;

            // Create Meta Editor Tab
            MetaEditor metaEditor = new MetaEditor(_buildInfo, _tag, tags, _cache, streamManager);
            tabMetaEditor.Content = metaEditor;

            // Create Plugin Editor Tab
            PluginEditor pluginEditor = new PluginEditor(_buildInfo, _tag, this, metaEditor);
            tabPluginEditor.Content = pluginEditor;
        }
Example #3
0
        public MetaContainer(EngineDescription buildInfo, TagEntry tag, TagHierarchy tags, ICacheFile cache,
			IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _tag = tag;
            _tags = tags;
            _buildInfo = buildInfo;
            _cache = cache;
            _streamManager = streamManager;
            _rteProvider = rteProvider;
            _stringIDTrie = stringIDTrie;

            tbMetaEditors.SelectedIndex = (int) App.AssemblyStorage.AssemblySettings.HalomapLastSelectedMetaEditor;

            // Create Meta Information Tab
            _metaInformation = new MetaInformation(_buildInfo, _tag, _cache);
            tabTagInfo.Content = _metaInformation;

            // Create Meta Editor Tab
            _metaEditor = new MetaEditor(_buildInfo, _tag, this, _tags, _cache, _streamManager, _rteProvider, _stringIDTrie)
            {
                Padding = new Thickness(0)
            };
            tabMetaEditor.Content = _metaEditor;

            // Create Plugin Editor Tab
            _pluginEditor = new PluginEditor(_buildInfo, _tag, this, _metaEditor);
            tabPluginEditor.Content = _pluginEditor;

            // Create Raw Tabs

            #region Models

            //if (_cache.ResourceMetaLoader.SupportsRenderModels && _tag.RawTag.Class.Magic == CharConstant.FromString("mode"))
            //{
            //	tabSound.Visibility = Visibility.Visible;
            //	tabSound.Content = new SoundEditor(_tag, _cache, _streamManager);
            //}
            //else
            //{
            //	tabSound.Visibility = Visibility.Collapsed;
            //	if (App.AssemblyStorage.AssemblySettings.halomapLastSelectedMetaEditor == App.AssemblyStorage.AssemblySettings.LastMetaEditorType.Model)
            //		tbMetaEditors.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.LastMetaEditorType.MetaEditor;
            //}

            #endregion

            #region BSP

            /*if (true && _tag.RawTag.Class.Magic == CharConstant.FromString("sbsp")) // add some manual check here akarias, since you code isn't in blamite
            {
                tabBspEditor.Visibility = Visibility.Visible;
                tabBspEditor.Content = new BspEditor(_tag, _cache, _streamManager);
            }
            else*/
            {
                tabBspEditor.Visibility = Visibility.Collapsed;
                if (App.AssemblyStorage.AssemblySettings.HalomapLastSelectedMetaEditor == Settings.LastMetaEditorType.Bsp)
                    tbMetaEditors.SelectedIndex = (int) Settings.LastMetaEditorType.MetaEditor;
            }

            #endregion

            #region Sound

            //if (_cache.ResourceMetaLoader.SupportsSounds && _tag.RawTag.Class.Magic == CharConstant.FromString("snd!"))
            //{
            //	tabSound.Visibility = Visibility.Visible;
            //	tabSound.Content = new SoundEditor(_tag, _cache, _streamManager);
            //}
            //else
            //{
            //	tabSound.Visibility = Visibility.Collapsed;
            //	if (App.AssemblyStorage.AssemblySettings.halomapLastSelectedMetaEditor == App.AssemblyStorage.AssemblySettings.LastMetaEditorType.Sound)
            //		tbMetaEditors.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.LastMetaEditorType.MetaEditor;
            //}

            #endregion
        }
Example #4
0
        public void LoadNewTagEntry(TagEntry tag)
        {
            TagEntry = tag;

            // Create Meta Information Tab
            _metaInformation = new MetaInformation(_buildInfo, _tag, _cache);
            tabTagInfo.Content = _metaInformation;

            // Create Meta Editor Tab
            _metaEditor.LoadNewTagEntry(tag);

            // Create Plugin Editor Tab
            _pluginEditor = new PluginEditor(_buildInfo, _tag, this, _metaEditor);
            tabPluginEditor.Content = _pluginEditor;
        }
Example #5
0
        public MetaContainer(EngineDescription buildInfo, TagEntry tag, TagHierarchy tags, ICacheFile cache,
                             IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _tag           = tag;
            _tags          = tags;
            _buildInfo     = buildInfo;
            _cache         = cache;
            _streamManager = streamManager;
            _rteProvider   = rteProvider;
            _stringIDTrie  = stringIDTrie;

            tbMetaEditors.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.HalomapLastSelectedMetaEditor;

            // Create Meta Information Tab
            _metaInformation   = new MetaInformation(_buildInfo, _tag, _cache);
            tabTagInfo.Content = _metaInformation;

            // Create Meta Editor Tab
            _metaEditor = new MetaEditor(_buildInfo, _tag, this, _tags, _cache, _streamManager, _rteProvider, _stringIDTrie)
            {
                Padding = new Thickness(0)
            };
            tabMetaEditor.Content = _metaEditor;

            // Create Plugin Editor Tab
            _pluginEditor           = new PluginEditor(_buildInfo, _tag, this, _metaEditor);
            tabPluginEditor.Content = _pluginEditor;

            // Create Raw Tabs

            #region Models

            //if (_cache.ResourceMetaLoader.SupportsRenderModels && _tag.RawTag.Class.Magic == CharConstant.FromString("mode"))
            //{
            //	tabSound.Visibility = Visibility.Visible;
            //	tabSound.Content = new SoundEditor(_tag, _cache, _streamManager);
            //}
            //else
            //{
            //	tabSound.Visibility = Visibility.Collapsed;
            //	if (App.AssemblyStorage.AssemblySettings.halomapLastSelectedMetaEditor == App.AssemblyStorage.AssemblySettings.LastMetaEditorType.Model)
            //		tbMetaEditors.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.LastMetaEditorType.MetaEditor;
            //}

            #endregion

            #region BSP

            /*if (true && _tag.RawTag.Class.Magic == CharConstant.FromString("sbsp")) // add some manual check here akarias, since you code isn't in blamite
             * {
             *      tabBspEditor.Visibility = Visibility.Visible;
             *      tabBspEditor.Content = new BspEditor(_tag, _cache, _streamManager);
             * }
             * else*/
            {
                tabBspEditor.Visibility = Visibility.Collapsed;
                if (App.AssemblyStorage.AssemblySettings.HalomapLastSelectedMetaEditor == Settings.LastMetaEditorType.Bsp)
                {
                    tbMetaEditors.SelectedIndex = (int)Settings.LastMetaEditorType.MetaEditor;
                }
            }

            #endregion

            #region Sound

            //if (_cache.ResourceMetaLoader.SupportsSounds && _tag.RawTag.Class.Magic == CharConstant.FromString("snd!"))
            //{
            //	tabSound.Visibility = Visibility.Visible;
            //	tabSound.Content = new SoundEditor(_tag, _cache, _streamManager);
            //}
            //else
            //{
            //	tabSound.Visibility = Visibility.Collapsed;
            //	if (App.AssemblyStorage.AssemblySettings.halomapLastSelectedMetaEditor == App.AssemblyStorage.AssemblySettings.LastMetaEditorType.Sound)
            //		tbMetaEditors.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.LastMetaEditorType.MetaEditor;
            //}

            #endregion
        }