Exemplo n.º 1
0
        public void Update(Control cursor)
        {
            bool intersects = cursor.IntersectsWith(this);

            if (intersects && !_hasIntersected)
            {
                // Cursor just hovered.
                _hasIntersected = true;

                BeginUpdateUI();
            }
            else if (!intersects && _hasIntersected)
            {
                // Cursor just left.
                _hasIntersected = false;

                EndUpdateUI();
            }
        }