internal static void BeginContainerGUI(GUILayoutUtility.LayoutCache cache, Event evt, IMGUIContainer container) { if (container.useOwnerObjectGUIState) { GUIUtility.BeginContainerFromOwner(container.elementPanel.ownerObject); } else { GUIUtility.BeginContainer(container.guiState); } s_ContainerStack.Push(container); GUIUtility.s_SkinMode = (int)container.contextType; GUIUtility.s_OriginalID = container.elementPanel.ownerObject.GetInstanceID(); if (Event.current == null) { Event.current = evt; } else { Event.current.CopyFrom(evt); } // call AFTER setting current event if (s_BeginContainerCallback != null) { s_BeginContainerCallback(container); } GUI.enabled = container.enabledInHierarchy; GUILayoutUtility.BeginContainer(cache); GUIUtility.ResetGlobalState(); }
internal static void BeginContainerGUI(GUILayoutUtility.LayoutCache cache, Event evt, IMGUIContainer container) { bool useOwnerObjectGUIState = container.useOwnerObjectGUIState; if (useOwnerObjectGUIState) { GUIUtility.BeginContainerFromOwner(container.elementPanel.ownerObject); } else { GUIUtility.BeginContainer(container.guiState); } UIElementsUtility.s_ContainerStack.Push(container); GUIUtility.s_SkinMode = (int)container.contextType; GUIUtility.s_OriginalID = container.elementPanel.ownerObject.GetInstanceID(); bool flag = Event.current == null; if (flag) { Event.current = evt; } else { Event.current.CopyFrom(evt); } bool flag2 = UIElementsUtility.s_BeginContainerCallback != null; if (flag2) { UIElementsUtility.s_BeginContainerCallback(container); } GUI.enabled = container.enabledInHierarchy; GUILayoutUtility.BeginContainer(cache); GUIUtility.ResetGlobalState(); }
internal static void BeginContainerGUI(GUILayoutUtility.LayoutCache cache, Event evt, IMGUIContainer container) { if (container.useOwnerObjectGUIState) { GUIUtility.BeginContainerFromOwner(container.elementPanel.ownerObject); } else { GUIUtility.BeginContainer(container.guiState); } UIElementsUtility.s_ContainerStack.Push(container); GUIUtility.s_SkinMode = (int)container.contextType; GUIUtility.s_OriginalID = container.elementPanel.ownerObject.GetInstanceID(); Event.current = evt; GUI.enabled = container.enabledInHierarchy; GUILayoutUtility.BeginContainer(cache); GUIUtility.ResetGlobalState(); Rect clipRect = container.lastWorldClip; if (clipRect.width == 0f || clipRect.height == 0f) { clipRect = container.worldBound; } Matrix4x4 lhs = container.worldTransform; if (evt.type == EventType.Repaint && container.elementPanel != null && container.elementPanel.stylePainter != null) { lhs = container.elementPanel.stylePainter.currentTransform; } GUIClip.SetTransform(lhs * Matrix4x4.Translate(container.layout.position), clipRect); }
internal static void BeginContainerGUI(GUILayoutUtility.LayoutCache cache, int instanceID, Event evt, IMGUIContainer container) { GUIUtility.BeginContainer(instanceID); UIElementsUtility.s_ContainerStack.Push(container); GUIUtility.s_SkinMode = (int)container.contextType; GUIUtility.s_OriginalID = instanceID; Event.current = evt; if (UIElementsUtility.s_BeginContainerCallback != null) { UIElementsUtility.s_BeginContainerCallback(container); } GUILayoutUtility.BeginContainer(cache); GUIUtility.ResetGlobalState(); Rect clipRect = container.lastWorldClip; if (clipRect.width == 0f || clipRect.height == 0f) { clipRect = container.globalBound; } Matrix4x4 rhs = Matrix4x4.TRS(new Vector3(container.position.x, container.position.y, 0f), Quaternion.identity, Vector3.one); GUIClip.SetTransform(container.globalTransform * rhs, clipRect); }