public void SetFCNames(IEnumerable <string> names) { foreach (var name in names) { FeatureClasses.Add(name); } }
private void OnDrawSelectFeatureID() { FeatureClasses oldSelected = selectedFeatureClass; selectedFeatureClass = (FeatureClasses)EditorGUILayout.EnumPopup("Feature Class", selectedFeatureClass); if (oldSelected != selectedFeatureClass) { var classFeatures = FeatureCollection.GetClassFeatures(selectedFeatureClass); selectedFeatureNames = classFeatures.Values.ToList(); feature.FeatureClass = selectedFeatureClass; EditorUtility.SetDirty(feature); } int oldFeatureID = selectedFeatureID; selectedFeatureID = EditorGUILayout.Popup("Feature Name", selectedFeatureID, selectedFeatureNames.ToArray()); if (oldFeatureID != selectedFeatureID) { var featureName = selectedFeatureNames[selectedFeatureID]; var classFeatures = FeatureCollection.GetClassFeatures(selectedFeatureClass); feature.FeatureID = classFeatures.FirstOrDefault(x => x.Value == featureName).Key; EditorUtility.SetDirty(feature); } var oldTiming = feature.FeatureTiming; feature.FeatureTiming = (FeatureTiming)EditorGUILayout.EnumPopup("Feature Timing", feature.FeatureTiming); if (feature.FeatureTiming != oldTiming) { EditorUtility.SetDirty(feature); } }
private void InitializeFeatureIDSelection() { selectedFeatureClass = featureCondition.FeatureClass; var classFeatures = FeatureCollection.GetClassFeatures(selectedFeatureClass); selectedFeatureNames = classFeatures.Values.ToList(); var currentSelectedFeatureID = classFeatures[featureCondition.FeatureID]; selectedFeatureID = selectedFeatureNames.IndexOf(currentSelectedFeatureID); }
public static Dictionary <int, string> GetClassFeatures(FeatureClasses featureClass) { switch (featureClass) { case FeatureClasses.General: return(GeneralFeatures); case FeatureClasses.Ace: return(AceFeatures); case FeatureClasses.Chaser: return(ChaserFeatures); case FeatureClasses.EnduringSoul: return(EnduringSoulFeatures); default: return(new Dictionary <int, string>()); } }
public void ClearFCList() { FeatureClasses.Clear(); OnPropertyChanged("SelectedFC"); }