コード例 #1
0
        /// <summary>
        /// Selects a handle under the pointer position.
        /// </summary>
        /// <param name="pointerPos">Position of the pointer relative to the parent GUI panel.</param>
        public void TrySelect(Vector2I pointerPos)
        {
            if (!bounds.Contains(pointerPos))
            {
                return;
            }

            pointerPos.x -= bounds.x;
            pointerPos.y -= bounds.y;
            sceneHandles.TrySelect(pointerPos);
        }
コード例 #2
0
        /// <summary>
        /// Selects a handle under the pointer position.
        /// </summary>
        /// <param name="pointerPos">Position of the pointer relative to the parent GUI panel.</param>
        public void TrySelect(Vector2I pointerPos)
        {
            if (!bounds.Contains(pointerPos))
            {
                return;
            }

            pointerPos.x -= bounds.x;
            pointerPos.y -= bounds.y;
            if (sceneHandles.TrySelect(pointerPos))
            {
                NotifyNeedsRedraw();
            }
        }