public static int DynamicPopup(int selectedIndex, string label, int count, RunnableGeneric1<string, int> visitor) { if (selectedIndex >= count) { selectedIndex = 0; } string[] labels = new string[count]; for (int i = 0; i < count; ++i) { string l = visitor(i); labels[i] = l; } return EditorGUILayout.Popup(label, selectedIndex, labels); }
public ArrayList(List<T> items, RunnableGeneric1<T, T> renderer) { this.items = items; genericRenderer = renderer; }