private void OnTileTap(TileTapEventArgs e) { if (e.Button == InputButtons.Left && e.PressedDown) { this.leftMouseDown = true; } if (e.AllButtonStates.HasFlag(InputButtons.Left) && e.AllButtonStates.HasFlag(InputButtons.Right)) { if (e.TileEventArgs.Tile.Shown) { if (e.PressedDown) { this.LeftRightDown(e.TileEventArgs); } } return; } if (this.SelectedTiles != null) { this.SelectedTiles = null; } if (e.Button == InputButtons.Left) { if (e.DoubleClicked) { this.LeftDoubleClicked(e.TileEventArgs); } else if (!e.PressedDown) { this.TileTapLeftUp(e.TileEventArgs); this.leftAndRightMouseDown = false; } else { this.TileTapLeftDown(e.TileEventArgs); } } else if (e.Button == InputButtons.Right) { if (e.PressedDown) { this.TileTapRightDown(e.TileEventArgs); } else { this.TileTapRightUp(e.TileEventArgs); this.leftAndRightMouseDown = false; } } }