private Init ( |
||
activatorRect | ||
windowContent | ||
locationPriorityOrder | ||
리턴 | void |
private void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder)
{
this.m_WindowContent = windowContent;
this.m_WindowContent.editorWindow = this;
this.m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect);
this.m_LastWantedSize = windowContent.GetWindowSize();
this.m_LocationPriorityOrder = locationPriorityOrder;
Vector2 minSize = windowContent.GetWindowSize() + new Vector2(this.m_BorderWidth * 2f, this.m_BorderWidth * 2f);
base.position = PopupLocationHelper.GetDropDownRect(this.m_ActivatorRect, minSize, minSize, null, this.m_LocationPriorityOrder);
base.ShowPopup();
base.Repaint();
}
internal new static void Show(Rect activatorRect, PopupWindowContent windowContent, PopupLocation[] locationPriorityOrder) { if (windowContent == null) { throw new System.ArgumentNullException(nameof(windowContent)); } if (s_PopupWindowWithoutFocus != null) { s_PopupWindowWithoutFocus.CloseContent(); } if (ShouldShowWindow(activatorRect)) { if (s_PopupWindowWithoutFocus == null) { s_PopupWindowWithoutFocus = CreateInstance <PopupWindowWithoutFocus>(); } s_PopupWindowWithoutFocus.Init(activatorRect, windowContent, locationPriorityOrder, ShowMode.PopupMenu, false); } else { windowContent.OnClose(); } }