Пример #1
0
 private static void ResetAndCreateWindow()
 {
     if (StatelessAdvancedDropdown.s_Instance != null)
     {
         StatelessAdvancedDropdown.s_Instance.Close();
         StatelessAdvancedDropdown.s_Instance = null;
     }
     StatelessAdvancedDropdown.s_ParentWindow = EditorWindow.focusedWindow;
     StatelessAdvancedDropdown.s_Instance     = ScriptableObject.CreateInstance <AdvancedDropdown>();
     StatelessAdvancedDropdown.m_WindowClosed = false;
 }
 public void Show(Rect rect)
 {
     if (this.s_Instance != null)
     {
         this.s_Instance.Close();
         this.s_Instance = null;
     }
     this.s_Instance = ScriptableObject.CreateInstance <AdvancedDropdown>();
     this.s_Instance.DisplayedOptions = this.DisplayedOptions;
     this.s_Instance.SelectedIndex    = this.SelectedIndex;
     this.s_Instance.Label            = this.Label;
     this.s_Instance.onSelected      += delegate(AdvancedDropdownWindow w)
     {
         this.onSelected(w.GetIdOfSelectedItem());
     };
     this.s_Instance.Init(rect);
 }