The size of the popup window.
private void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder) { this.m_WindowContent = windowContent; this.m_WindowContent.editorWindow = (EditorWindow) this; this.m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect); this.m_LastWantedSize = windowContent.GetWindowSize(); this.m_LocationPriorityOrder = locationPriorityOrder; Vector2 vector2 = windowContent.GetWindowSize() + new Vector2(this.m_BorderWidth * 2f, this.m_BorderWidth * 2f); this.position = PopupLocationHelper.GetDropDownRect(this.m_ActivatorRect, vector2, vector2, (ContainerWindow) null, this.m_LocationPriorityOrder); this.ShowPopup(); this.Repaint(); }
private void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder) { this.m_WindowContent = windowContent; this.m_WindowContent.editorWindow = (EditorWindow)this; this.m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect); this.m_LastWantedSize = windowContent.GetWindowSize(); this.m_LocationPriorityOrder = locationPriorityOrder; Vector2 vector2 = windowContent.GetWindowSize() + new Vector2(this.m_BorderWidth * 2f, this.m_BorderWidth * 2f); this.position = PopupLocationHelper.GetDropDownRect(this.m_ActivatorRect, vector2, vector2, (ContainerWindow)null, this.m_LocationPriorityOrder); this.ShowPopup(); this.Repaint(); }
void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder) { m_WindowContent = windowContent; m_WindowContent.editorWindow = this; m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect); m_LastWantedSize = windowContent.GetWindowSize(); m_LocationPriorityOrder = locationPriorityOrder; Vector2 windowSize = windowContent.GetWindowSize() + new Vector2(m_BorderWidth * 2, m_BorderWidth * 2); position = PopupLocationHelper.GetDropDownRect(m_ActivatorRect, windowSize, windowSize, null, m_LocationPriorityOrder); ShowPopup(); Repaint(); }
void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder, ShowMode showMode) { hideFlags = HideFlags.DontSave; wantsMouseMove = true; m_WindowContent = windowContent; m_WindowContent.editorWindow = this; m_WindowContent.OnOpen(); m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect); ShowAsDropDown(m_ActivatorRect, m_WindowContent.GetWindowSize(), locationPriorityOrder, showMode); }
internal void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocation[] locationPriorityOrder, ShowMode showMode, bool giveFocus) { hideFlags = HideFlags.DontSave; wantsMouseMove = true; m_WindowContent = windowContent; m_WindowContent.editorWindow = this; m_WindowContent.OnOpen(); m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect); m_LastWantedSize = Vector2.zero; m_LocationPriorityOrder = locationPriorityOrder; ShowAsDropDown(m_ActivatorRect, m_WindowContent.GetWindowSize(), locationPriorityOrder, showMode, giveFocus); }
private void FitWindowToContent() { Vector2 wantedSize = m_WindowContent.GetWindowSize(); if (m_LastWantedSize != wantedSize) { m_LastWantedSize = wantedSize; Rect screenRect = m_Parent.window.GetDropDownRect(m_ActivatorRect, wantedSize, wantedSize, m_LocationPriorityOrder); minSize = maxSize = new Vector2(screenRect.width, screenRect.height); position = screenRect; } }
private void FitWindowToContent() { Vector2 wantedSize = m_WindowContent.GetWindowSize(); if (m_LastWantedSize != wantedSize) { m_LastWantedSize = wantedSize; Vector2 windowSize = wantedSize + new Vector2(2 * m_BorderWidth, 2 * m_BorderWidth); Rect screenRect = PopupLocationHelper.GetDropDownRect(m_ActivatorRect, windowSize, windowSize, null, m_LocationPriorityOrder); m_Pos = screenRect; minSize = maxSize = new Vector2(screenRect.width, screenRect.height); } }
private void Init(Rect activatorRect, PopupWindowContent windowContent, TooltipLocation[] locationPriorityOrder) { m_WindowContent = windowContent; m_WindowContent.GetType() .GetProperty("editorWindow") .GetSetMethod(true) .Invoke(m_WindowContent, new object[] {this}); m_ActivatorRect = GUIToScreenRect(activatorRect); m_LastWantedSize = windowContent.GetWindowSize(); m_LocationPriorityOrder = locationPriorityOrder; Vector2 size = windowContent.GetWindowSize() + new Vector2(m_BorderWidth*2f, m_BorderWidth*2f); var rect = TooltipLocationHelper.GetDropDownRect(m_ActivatorRect, size, size, null, m_LocationPriorityOrder); minSize = size; maxSize = size; position = rect; ShowPopup(); Repaint(); }