Example #1
0
        /// <summary>
        /// 画素の色を基に操作受付を切り替える
        /// </summary>
        void UpdateClickThrough()
        {
            // マウスカーソル非表示状態ならば透明画素上と同扱い
            bool opaque = (onObject && !UniWinApi.GetCursorVisible());

            if (_isClickThrough)
            {
                if (opaque)
                {
                    if (uniWin != null)
                    {
                        uniWin.EnableClickThrough(false);
                    }
                    _isClickThrough = false;
                }
            }
            else
            {
                if (isTransparent && !opaque && !isDragging)
                {
                    if (uniWin != null)
                    {
                        uniWin.EnableClickThrough(true);
                    }
                    _isClickThrough = true;
                }
            }
        }
 /// <summary>
 /// 画素の色を基に操作受付を切り替える
 /// </summary>
 void UpdateClickThrough()
 {
     if (_isClickThrough)
     {
         if (onOpaquePixel)
         {
             if (uniWin != null)
             {
                 uniWin.EnableClickThrough(false);
             }
             _isClickThrough = false;
         }
     }
     else
     {
         if (isTransparent && !onOpaquePixel && !isDragging)
         {
             if (uniWin != null)
             {
                 uniWin.EnableClickThrough(true);
             }
             _isClickThrough = true;
         }
     }
 }