Esempio n. 1
0
        private void OnPositioning()
        {
            lock (guiLock)
            {
                if (!initialYSet)
                {
                    initialY    = this.position.y;
                    initialYSet = true;
                }

                var totalWidth = Mathf.Max(minWidth, activatorPosition.width, minOptionWidth + 36, headerWidth + 36);

                var totalHeight = Mathf.Min(height, maxHeight);

                var position = this.GetDropdownPosition(activatorPosition, new Vector2(totalWidth, totalHeight));

                position.y = initialY;

                if (!isAnimating && !activeParent.isLoading && activeNode?.option != null && activeNode.option.hasFooter)
                {
                    footerHeight = activeNode.option.GetFooterHeight(activeNode, totalWidth);

                    position.height += footerHeight;
                }

                position      = LudiqGUIUtility.CropDropdownPosition(position);
                minSize       = maxSize = position.size;
                this.position = position;
            }
        }