private void TroopXnaPanelMouseMove(object sender, MouseEventArgs e)
{
if (_tilesetTexture != null)
{
int x = e.X.Clamp(0, _tilesetTexture.Width);
int y = e.Y.Clamp(0, _tilesetTexture.Height);
_currentId = this.GetTileAtPoint(x, y);
if (this.SelectionEnabled && _mouseDown && _selectionActive)
{
_endPoint.X = x;
_endPoint.Y = y;
}
Invalidate();
}
}