/// Handles "Show Vertices" Button click event. private void ShowVerticesBtn_Click(object sender, EventArgs e) { drawVerts = !drawVerts; // Toggles bool. DeselectTower(); GameWorldPB.Invalidate(); DrawBackground(); }
private void FuzzyTowerPB_Click(object sender, EventArgs e) { this.selectedTower = new FuzzyTower(); GameWorldPB.Invalidate(); DeselectTower(); towerDescription.Text = selectedTower.description; }
private void Tower3PB_MouseDown(object sender, MouseEventArgs e) { this.selectedTower = new SplitShotTower(); GameWorldPB.Invalidate(); DeselectTower(); towerDescription.Text = selectedTower.description; }
/// Handles change of mouse location within PictureBox, redraws. private void GameWorldPB_MouseMove(object sender, MouseEventArgs e) { mousePos = e.Location; if (selectedTower == null && !GetTileAtMouse.buildable) { GameWorldPB.Cursor = Cursors.Hand; } else { GameWorldPB.Cursor = Cursors.Default; } GameWorldPB.Invalidate(); }
private void HandSelectPB_Click(object sender, EventArgs e) { this.selectedTower = null; GameWorldPB.Invalidate(); }
/// Sets mousePos to null after leaving main PictureBox, redraws PictureBox. private void GameWorldPB_MouseLeave(object sender, EventArgs e) { mousePos = null; GameWorldPB.Invalidate(); }