示例#1
0
        public void Open(UIBox2?box = null)
        {
            if (Visible)
            {
                UserInterfaceManagerInternal.RemoveModal(this);
            }

            if (box != null)
            {
                PopupContainer.SetPopupOrigin(this, box.Value.TopLeft);

                _desiredSize = box.Value.Size;
            }

            Visible = true;
            UserInterfaceManagerInternal.PushModal(this);
        }
示例#2
0
        public void Open(UIBox2?box = null, Vector2?altPos = null)
        {
            if (Visible)
            {
                UserInterfaceManagerInternal.RemoveModal(this);
            }

            if (box != null && _desiredSize != box.Value.Size)
            {
                PopupContainer.SetPopupOrigin(this, box.Value.TopLeft);
                PopupContainer.SetAltOrigin(this, altPos);

                _desiredSize = box.Value.Size;
                MinimumSizeChanged();
            }

            Visible = true;
            UserInterfaceManagerInternal.PushModal(this);
        }
示例#3
0
        public void Open(UIBox2?box = null, Vector2?altPos = null)
        {
            if (Visible)
            {
                UserInterfaceManagerInternal.RemoveModal(this);
            }

            if (box != null &&
                (_desiredSize != box.Value.Size ||
                 PopupContainer.GetPopupOrigin(this) != box.Value.TopLeft ||
                 PopupContainer.GetAltOrigin(this) != altPos))
            {
                PopupContainer.SetPopupOrigin(this, box.Value.TopLeft);
                PopupContainer.SetAltOrigin(this, altPos);

                _desiredSize = box.Value.Size;
                InvalidateMeasure();
            }

            Visible = true;
            UserInterfaceManagerInternal.PushModal(this);
        }