Nez.UI.Element.getHeight C# (CSharp) Метод

getHeight() публичный Метод

public getHeight ( ) : float
Результат float
		public float getHeight()
		{
			return height;
		}

Usage Example

Пример #1
0
        void setContainerPosition(float x, float y)
        {
            var stage = _targetElement.getStage();

            if (stage == null)
            {
                return;
            }

            _container.pack();
            float offsetX = _manager.offsetX, offsetY = _manager.offsetY, dist = _manager.edgeDistance;
            var   point = _targetElement.localToStageCoordinates(
                new Vector2(x + offsetX - _container.getWidth() / 2, y - offsetY - _container.getHeight()));

            if (point.Y < dist)
            {
                point = _targetElement.localToStageCoordinates(new Vector2(x + offsetX, y + offsetY));
            }
            if (point.X < dist)
            {
                point.X = dist;
            }
            if (point.X + _container.getWidth() > stage.getWidth() - dist)
            {
                point.X = stage.getWidth() - dist - _container.getWidth();
            }
            if (point.Y + _container.getHeight() > stage.getHeight() - dist)
            {
                point.Y = stage.getHeight() - dist - _container.getHeight();
            }
            _container.setPosition(point.X, point.Y);

            point = _targetElement.localToStageCoordinates(
                new Vector2(_targetElement.getWidth() / 2, _targetElement.getHeight() / 2));
            point -= new Vector2(_container.getX(), _container.getY());
            _container.setOrigin(point.X, point.Y);
        }
All Usage Examples Of Nez.UI.Element::getHeight