示例#1
0
            public ScrollbarScope(Scrollbar scrollbar)
            {
                _scrollbar = scrollbar;

                _outerVerticalBlock = EditorGUILayoutHelper.VerticalBlock(out Rect windowRect);

                if (Event.current.type == EventType.Repaint)
                {
                    _scrollbar._windowRect = windowRect;
                }

                _scrollView = EditorGUILayoutHelper.ScrollViewBlock(ref _scrollbar._position, _scrollbar._visible);

                _innerVerticalBlock = EditorGUILayoutHelper.VerticalBlock(out _newWholeListRect);
            }
示例#2
0
        private void DrawContent()
        {
            using (new FixedRect(_preventExpandingHeight, position.width))
            {
                using (EditorGUILayoutHelper.VerticalBlock(_preventExpandingHeight,
                                                           DropdownStyle.BackgroundColor, out float contentHeight))
                {
                    _selectionTree.Draw();

                    if (Event.current.type == EventType.Repaint)
                    {
                        _contentHeight = contentHeight;
                    }
                }

                EditorGUIHelper.DrawBorders(position.width, position.height, DropdownStyle.BorderColor);
            }
        }