internal static bool Show(Rect rect, GameObject[] gos) { AddComponentWindow.CloseAllOpenWindows <AddComponentWindow>(); Event.current.Use(); AddComponentWindow.s_AddComponentWindow = AdvancedDropdownWindow.CreateAndInit <AddComponentWindow>(rect); AddComponentWindow.s_AddComponentWindow.m_GameObjects = gos; AddComponentWindow.s_AddComponentWindow.m_ComponentOpenTime = DateTime.UtcNow; return(true); }
private static void ResetAndCreateWindow() { if (s_Instance != null) { s_Instance.Close(); s_Instance = null; } s_ParentWindow = EditorWindow.focusedWindow; s_Instance = ScriptableObject.CreateInstance <AdvancedDropdownWindow>(); m_WindowClosed = false; }
public void Show(Rect rect) { if (s_Instance != null) { s_Instance.Close(); s_Instance = null; } s_Instance = ScriptableObject.CreateInstance <AdvancedDropdownWindow>(); var dataSource = new AdvancedDropdownSimpleDataSource(); dataSource.DisplayedOptions = DisplayedOptions; dataSource.SelectedIndex = SelectedIndex; dataSource.Label = Label; s_Instance.dataSource = dataSource; s_Instance.onSelected += w => onSelected(w.GetIdOfSelectedItem()); s_Instance.Init(rect); }