示例#1
0
        protected override Vector2 MeasureOverride(Vector2 availableSize)
        {
            if (_message == null)
            {
                return(Vector2.Zero);
            }

            _entry.Update(_getFont(), availableSize.X * UIScale, UIScale);

            return(_entry.Width / UIScale, _entry.Height / UIScale);
        }
示例#2
0
        private void _updateEntry()
        {
            var font = _getFont();

            if (_message != null)
            {
                var oldHeight = _entry.Height;
                _entry.Update(font, Width, UIScale);
                if (oldHeight != _entry.Height)
                {
                    MinimumSizeChanged();
                }
            }
        }
示例#3
0
        private void _updateEntry()
        {
            var font = _getFont();

            if (_message != null)
            {
                var oldHeight = _entry.Height;
                var oldWidth  = _entry.Width;
                _entry.Update(font, MaxWidth ?? Width, UIScale);
                if (oldHeight != _entry.Height || MaxWidth != null && _entry.Width != oldWidth)
                {
                    MinimumSizeChanged();
                }
            }
        }