Пример #1
0
        public void DoWindowContents(Rect canvas)
        {
            var listing = new Listing_Standard();

            listing.ColumnWidth = canvas.width;
            listing.Begin(canvas);
            listing.CheckboxLabeled(I18n.ShowAllRequirements, ref ShowSatisfiedRequirements,
                                    I18n.ShowAllRequirementsTip);
            listing.CheckboxLabeled(I18n.ShowVersionChecksForSteamMods, ref ShowVersionChecksOnSteamMods,
                                    I18n.ShowVersionChecksForSteamModsTip);

            listing.Gap();
            listing.CheckboxLabeled(I18n.ShowPromotions, ref ShowPromotions, I18n.ShowPromotionsTip);

            if (!ShowPromotions)
            {
                GUI.color = Color.grey;
            }

            listing.CheckboxLabeled(I18n.ShowPromotions_NotSubscribed, ref ShowPromotions_NotSubscribed);
            listing.CheckboxLabeled(I18n.ShowPromotions_NotActive, ref ShowPromotions_NotActive);
            var before = UseTempFolderForCrossPromotions;

            if (CrossPromotionManager.cachePathOverriden)
            {
                GUI.color = Color.grey;
            }
            listing.CheckboxLabeled(I18n.UseTempFolderForCrossPromotionCache, ref UseTempFolderForCrossPromotions,
                                    I18n.UseTempFolderForCrossPromotionCacheTip);
            if (before != UseTempFolderForCrossPromotions)
            {
                CrossPromotionManager.Notify_CrossPromotionPathChanged();
            }
            if (CrossPromotionManager.CacheCount > 0)
            {
                GUI.color = Color.white;
                if (listing.ButtonTextLabeled(I18n.CrossPromotionCacheFolderSize(CrossPromotionManager.CacheSize),
                                              I18n.DeleteCrossPromotionCache))
                {
                    CrossPromotionManager.DeleteCache();
                }
            }
            else
            {
                GUI.color = Color.grey;
                listing.Label(I18n.CrossPromotionCacheFolderSize(CrossPromotionManager.CacheSize));
            }

            GUI.color = Color.white;
            listing.Gap();

            listing.CheckboxLabeled(I18n.TrimTags, ref TrimTags, I18n.TrimTagsTip);
            if (!TrimTags)
            {
                GUI.color = Color.grey;
            }
            listing.CheckboxLabeled(I18n.TrimVersionStrings, ref TrimVersionStrings,
                                    I18n.TrimVersionStringsTip);

            GUI.color = Color.white;
            listing.Gap();
            listing.CheckboxLabeled(I18n.AddModManagerToNewModList, ref AddModManagerToNewModLists,
                                    I18n.AddModManagerToNewModListTip);
            listing.CheckboxLabeled(I18n.AddHugsLibToNewModList, ref AddHugsLibToNewModLists,
                                    I18n.AddHugsLibToNewModListTip);
            listing.CheckboxLabeled(I18n.AddExpansionsToNewModList, ref AddExpansionsToNewModLists,
                                    I18n.AddExpansionsToNewModListTip);
            listing.End();
        }