public override void DrawMenu() { if (IsActive == false) { //Debug.Log("处于非激活状态" + m_MenuName); return; } base.DrawMenu(); // Debug.Log("DrawMenu " + m_CurShowArea); GUILayout.BeginArea(m_CurShowArea); GUI.DrawTexture(new Rect(0, 0, m_CurShowArea.width, m_CurShowArea.height), EditorImageHelper.GetImageByPath(m_NodeBgPath)); m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, false, true, GUILayout.Width(Constants.ContexNodeActionMenuSize.x), GUILayout.Height(Constants.ContexNodeActionMenuSize.y)); // Debug.Log("<<<<<<<< " + m_CurShowArea.height+ " m_TopSpaceHeight="+ m_TopSpaceHeight); //***添加一个空白的标签以便于正确的识别树形结构的高度 float treeViewHeight = NodeActionTreeView_View.ShowTreeView(); GUILayout.Label("", GUILayout.Height(treeViewHeight)); GUILayout.EndScrollView(); GUILayout.EndArea(); //Debug.Log("xxx" + Event.current.mousePosition); }
public override void DrawMenu() { base.DrawMenu(); GUILayout.Space(m_TopSpaceHeight); m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, false, true, GUILayout.Width(m_CurShowArea.width), GUILayout.Height(m_CurShowArea.height - m_TopSpaceHeight - 100)); // Debug.Log("<<<<<<<< " + m_CurShowArea.height+ " m_TopSpaceHeight="+ m_TopSpaceHeight); //***添加一个空白的标签以便于正确的识别树形结构的高度 float treeViewHeight = NodeActionTreeView_View.ShowTreeView(); //获取当前树形结构展开的高度值 GUILayout.Label("", GUILayout.Height(treeViewHeight)); GUILayout.EndScrollView(); }