示例#1
0
        /* -------------------------------------------------------------- *\
        *   picTiles_MouseMove()
        *
        *   - Keeps track / translates coordinates to tilelibrary tile to be
        *     selected if clicked on.
        \* -------------------------------------------------------------- */
        private void picTiles_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.X < 0 || e.Y < 0)
            {
                return;
            }
            if (e.X < m_LibRect.Left || e.X > m_LibRect.Right || e.Y < m_LibRect.Top || e.Y > m_LibRect.Bottom)
            {
                m_bDrawTileRect = true;

                m_TileLibrary.PointToTile(e.X, e.Y, ref m_ActiveTileXIndex, ref m_ActiveTileYIndex);
                m_TileLibrary.PointToBoundingRect(e.X, e.Y, ref m_LibRect);

                m_bRefreshLib = true;

                PrintDebug("TileXIndex = " + m_ActiveTileXIndex.ToString() + " TileYIndex = " + m_ActiveTileYIndex.ToString());
                PrintDebug("X = " + e.X.ToString() + " Y = " + e.Y.ToString());
            }
        }