protected void AddPrefabType(MyTreeViewItem parentItem, MyMwcObjectBuilder_Prefab_AppearanceEnum appearanceTextureEnum, MyTextsWrapperEnum typeText, BuildTypesEnum buildTypesEnum, 
            CategoryTypesEnum[] categories, MyTexture2D icon, Vector2 iconSize, MyTexture2D expand, MyTexture2D collapse, 
            Vector2 expandIconSize)
        {
            var prefabTypeItem = parentItem == null ?
                m_addObjectTreeView.AddItem(MyTextsWrapper.Get(typeText), icon, iconSize, expand, collapse, expandIconSize) :
                parentItem.AddItem(MyTextsWrapper.Get(typeText), icon, iconSize, expand, collapse, expandIconSize);

            foreach (var categoryTypesEnum in categories)
            {
                var categoryItem = prefabTypeItem.AddItem(MyGuiPrefabHelpers.GetMyGuiCategoryTypeHelper(categoryTypesEnum).Description, icon, 
                    iconSize, expand, collapse, expandIconSize);
                AddPrefabItems(categoryItem, appearanceTextureEnum, buildTypesEnum, categoryTypesEnum);
            }
        }
        protected override void AddPrefabItems(MyTreeViewItem parentItem, MyMwcObjectBuilder_Prefab_AppearanceEnum appearanceTextureEnum, BuildTypesEnum buildType, CategoryTypesEnum categoryType)
        {
            MyMwcLog.WriteLine("GOD AddPrefabItems - START");

            Vector2 itemSize = MyGuiConstants.CHECKBOX_SIZE * 3;
            foreach (MyMwcObjectBuilderTypeEnum enumValue in MyGuiPrefabHelpers.MyMwcPrefabTypesEnumValues)
            {
                foreach (int prefabId in MyMwcObjectBuilder_Base.GetObjectBuilderIDs(enumValue))
                {
                    MyPrefabConfiguration config = MyPrefabConstants.GetPrefabConfiguration(enumValue, prefabId);
                    MyGuiPrefabHelper prefabModuleHelper = MyGuiObjectBuilderHelpers.GetGuiHelper(enumValue, prefabId) as MyGuiPrefabHelper;

                    if (config == null)
                        continue;

                    if (config.FactionSpecific.HasValue && config.FactionSpecific.Value != appearanceTextureEnum)
                        continue;

                    if (config.BuildType == buildType && config.CategoryType == categoryType && config.EnabledInEditor)
                    {
                        MyTexture2D previewTexture = MyGuiManager.GetPrefabPreviewTexture(enumValue, prefabId, appearanceTextureEnum);
                        var item = parentItem.AddItem(new StringBuilder(), previewTexture, itemSize,
                                                      MyGuiManager.GetBlankTexture(), MyGuiManager.GetBlankTexture(),
                                                      MyGuiConstants.CHECKBOX_SIZE);
                        item.ToolTip = GetPrefabToolTip(prefabModuleHelper.Description, config);
                        //item.ToolTip = new MyToolTips(prefabModuleHelper.Description);
                        item.Tag = new PrefabTag(enumValue, prefabId, appearanceTextureEnum, categoryType);
                        item.Action = OnAddPrefab;
                        item.DragDrop = m_addObjectTreeViewdragDrop;
                    }                    
                }
            }            
            MyMwcLog.WriteLine("GOD AddPrefabItems - END");
        }
 private void AddDebrisItems(MyTreeViewItem parentItem)
 {
     Vector2 itemSize = MyGuiManager.GetNormalizedSizeFromScreenSize(new Vector2(64, 64));
     foreach (MyMwcObjectBuilder_SmallDebris_TypesEnum enumValue in MyGuiSmallDebrisHelpers.MyMwcSmallDebrisEnumValues)
     {
         MyGuiSmallDebrisHelper smallDebrisHelper = MyGuiSmallDebrisHelpers.GetMyGuiSmallDebrisHelper(enumValue);
         var item = parentItem.AddItem(new StringBuilder(), smallDebrisHelper.Icon, itemSize, MyGuiManager.GetBlankTexture(), MyGuiManager.GetBlankTexture(), MyGuiConstants.CHECKBOX_SIZE);
         item.ToolTip = new MyToolTips(smallDebrisHelper.Description);
         item.Tag = enumValue;
         item.Action = OnAddDebris;
         item.DragDrop = m_addObjectTreeViewdragDrop;
     }
 }
 private MyTreeViewItem AddBaseDragTreeItem(MyTreeViewItem parentItem, MyTextsWrapperEnum text, MyTexture2D icon, MyTexture2D expand, MyTexture2D collapse, Vector2 smallIconSize, Vector2 expandIconSize, object tag) 
 {
     var item = parentItem.AddItem(MyTextsWrapper.Get(text), icon, smallIconSize, expand, collapse, expandIconSize);
     item.DragDrop = m_addObjectTreeViewdragDrop;
     item.Tag = tag;
     return item;
 }
 private void AddLargeShipItems(MyTreeViewItem parentItem)
 {
     Vector2 itemSize = MyGuiManager.GetNormalizedSizeFromScreenSize(new Vector2(64, 64));
     foreach (MyMwcObjectBuilder_LargeShip_TypesEnum enumValue in MyGuiLargeShipHelpers.MyMwcLargeShipTypesEnumValues)
     {
         if (enumValue != MyMwcObjectBuilder_LargeShip_TypesEnum.JEROMIE_INTERIOR_STATION && enumValue != MyMwcObjectBuilder_LargeShip_TypesEnum.CRUISER_SHIP)
         {
             MyGuiLargeShipHelper largeShipHelper = MyGuiLargeShipHelpers.GetMyGuiLargeShipHelper(enumValue);
             var item = parentItem.AddItem(new StringBuilder(), largeShipHelper.Icon, itemSize, MyGuiManager.GetBlankTexture(), MyGuiManager.GetBlankTexture(), MyGuiConstants.CHECKBOX_SIZE);
             item.ToolTip = new MyToolTips(largeShipHelper.Description);
             item.Tag = enumValue;
             item.Action = OnAddLargeShip;
             item.DragDrop = m_addObjectTreeViewdragDrop;
         }
     }
 }