private static ArtGroup CreateGroup(ArtGroupTag egroup, Color color) { var group = new ArtGroup(egroup, color); groups[(int)group.artGroupTag] = group; return(group); }
/// <summary> /// Construct new art group /// </summary> /// <param name="groupTag"></param> /// <param name="color"></param> public ArtGroup(ArtGroupTag groupTag, Color color) { artGroupTag = groupTag; FeatureOverlays = CreateCategory(ArtCategoryTag.FeatureOverlays, color, true); NavShapes = CreateCategory(ArtCategoryTag.NavShapes, color, true); Traversal = CreateCategory(ArtCategoryTag.Traversal, color, true); ActorsSpawners = CreateCategory(ArtCategoryTag.ActorsSpawners, color, true); Regions = CreateCategory(ArtCategoryTag.Regions, color, true); Splines = CreateCategory(ArtCategoryTag.Splines, color, true); }
/// <summary> /// Construct new category /// </summary> /// <param name="groupTag">Parent group</param> /// <param name="categoryTag">Category tag</param> /// <param name="defaultColor"></param> /// <param name="optional"></param> public ArtCategory(ArtGroupTag groupTag, ArtCategoryTag categoryTag, Color defaultColor, bool optional) { isOptional = optional; artCategoryTag = categoryTag; var artGroupName = groupTag.ToString(); var categoryName = categoryTag.ToString(); visiblePreferenceName = $"CategoriesWindowVisible{artGroupName}{categoryName}"; colorPreferenceNameR = $"CategoriesWindowColorR{artGroupName}{categoryName}"; colorPreferenceNameG = $"CategoriesWindowColorG{artGroupName}{categoryName}"; colorPreferenceNameB = $"CategoriesWindowColorB{artGroupName}{categoryName}"; isVisible = GetVisibleInternal(true); color = GetColorInternal(defaultColor); }
/// <summary> /// Get art group /// </summary> /// <param name="artGroupTag"></param> /// <returns></returns> /// <exception cref="ArgumentOutOfRangeException"></exception> public static ArtGroup GetGroup(ArtGroupTag artGroupTag) { switch (artGroupTag) { case ArtGroupTag.Globals: return(Globals); case ArtGroupTag.Camera: return(Camera); case ArtGroupTag.Sounds: return(Sounds); case ArtGroupTag.Rendering: return(Rendering); case ArtGroupTag.GamePlay: return(Gameplay); default: throw new ArgumentOutOfRangeException(); } }
private GroupView GetGroup(ArtGroupTag artGroupTag) { return(GroupViews[(int)artGroupTag]); }