private void Init(Vector2 pos, List<SceneHierarchySortingWindow.InputData> data, SceneHierarchySortingWindow.OnSelectCallback callback)
 {
   Rect screenRect = GUIUtility.GUIToScreenRect(new Rect(pos.x, pos.y - 16f, 16f, 16f));
   data.Sort((Comparison<SceneHierarchySortingWindow.InputData>) ((lhs, rhs) => lhs.m_Name.CompareTo(rhs.m_Name)));
   this.m_Data = data;
   this.m_Callback = callback;
   if (SceneHierarchySortingWindow.s_Styles == null)
     SceneHierarchySortingWindow.s_Styles = new SceneHierarchySortingWindow.Styles();
   Vector2 windowSize = new Vector2(2f + this.GetWidth(), 2f + this.GetHeight());
   this.ShowAsDropDown(screenRect, windowSize);
 }
        private void Init(Vector2 pos, List <SceneHierarchySortingWindow.InputData> data, SceneHierarchySortingWindow.OnSelectCallback callback)
        {
            Rect screenRect = GUIUtility.GUIToScreenRect(new Rect(pos.x, pos.y - 16f, 16f, 16f));

            data.Sort((Comparison <SceneHierarchySortingWindow.InputData>)((lhs, rhs) => lhs.m_Name.CompareTo(rhs.m_Name)));
            this.m_Data     = data;
            this.m_Callback = callback;
            if (SceneHierarchySortingWindow.s_Styles == null)
            {
                SceneHierarchySortingWindow.s_Styles = new SceneHierarchySortingWindow.Styles();
            }
            Vector2 windowSize = new Vector2(2f + this.GetWidth(), 2f + this.GetHeight());

            this.ShowAsDropDown(screenRect, windowSize);
        }
		private void Init(Vector2 pos, List<SceneHierarchySortingWindow.InputData> data, SceneHierarchySortingWindow.OnSelectCallback callback)
		{
			Rect rect = new Rect(pos.x, pos.y - 16f, 16f, 16f);
			rect = GUIUtility.GUIToScreenRect(rect);
			data.Sort((SceneHierarchySortingWindow.InputData lhs, SceneHierarchySortingWindow.InputData rhs) => lhs.m_Name.CompareTo(rhs.m_Name));
			this.m_Data = data;
			this.m_Callback = callback;
			if (SceneHierarchySortingWindow.s_Styles == null)
			{
				SceneHierarchySortingWindow.s_Styles = new SceneHierarchySortingWindow.Styles();
			}
			float y = 2f + this.GetHeight();
			float x = 2f + this.GetWidth();
			Vector2 windowSize = new Vector2(x, y);
			base.ShowAsDropDown(rect, windowSize);
		}
예제 #4
0
        private void Init(Vector2 pos, List <SceneHierarchySortingWindow.InputData> data, SceneHierarchySortingWindow.OnSelectCallback callback)
        {
            Rect rect = new Rect(pos.x, pos.y - 16f, 16f, 16f);

            rect = GUIUtility.GUIToScreenRect(rect);
            data.Sort((SceneHierarchySortingWindow.InputData lhs, SceneHierarchySortingWindow.InputData rhs) => lhs.m_Name.CompareTo(rhs.m_Name));
            this.m_Data     = data;
            this.m_Callback = callback;
            if (SceneHierarchySortingWindow.s_Styles == null)
            {
                SceneHierarchySortingWindow.s_Styles = new SceneHierarchySortingWindow.Styles();
            }
            float   y          = 2f + this.GetHeight();
            float   x          = 2f + this.GetWidth();
            Vector2 windowSize = new Vector2(x, y);

            base.ShowAsDropDown(rect, windowSize);
        }
예제 #5
0
        internal static bool ShowAtPosition(Vector2 pos, List <SceneHierarchySortingWindow.InputData> data, SceneHierarchySortingWindow.OnSelectCallback callback)
        {
            long num = DateTime.Now.Ticks / 10000L;

            if (num >= SceneHierarchySortingWindow.s_LastClosedTime + 50L)
            {
                Event.current.Use();
                if (SceneHierarchySortingWindow.s_SceneHierarchySortingWindow == null)
                {
                    SceneHierarchySortingWindow.s_SceneHierarchySortingWindow = ScriptableObject.CreateInstance <SceneHierarchySortingWindow>();
                }
                SceneHierarchySortingWindow.s_SceneHierarchySortingWindow.Init(pos, data, callback);
                return(true);
            }
            return(false);
        }