Ejemplo n.º 1
0
        private void FindAllUserStoriesWithCategory()
        {
            List <UserStory> stories = new List <UserStory>();

            stories.AddRange(Unity.GetAssets <UserStory>(new string[] { Settings.DEFAULT_CATALOG }));
            stories   = stories.FindAll(x => x.Category == SerializedUserCategory.targetObject);
            Container = new UserStoryContainer(SerializedUserCategory.targetObject as UserStoryCategory, stories);
        }
 private static void DisplayCategory(UserStoryContainer container)
 {
     EditorGUILayout.Separator();
     GUILayout.BeginHorizontal();
     EditorGUILayout.LabelField(container.Category.Name);
     EditorGUILayout.ObjectField(container.Category, typeof(UserStoryCategory), allowSceneObjects: false);
     GUILayout.EndHorizontal();
     try
     {
         Color CategoryColor = container.Category.TextColor;
         EditorGUI.DrawRect(GUILayoutUtility.GetRect(0.0f, 2.0f, GUILayout.ExpandWidth(true)), CategoryColor);
     }
     catch
     {
         EditorGUI.DrawRect(GUILayoutUtility.GetRect(0.0f, 2.0f, GUILayout.ExpandWidth(true)), new Color(255, 255, 255, 1));
     }
 }