protected override void OnKeyDown(KeyEventArgs e) { switch (e.KeyCode) { case Keys.Delete: if (parent.SelectionRectangle != Rectangle.Empty) { parent.DeleteSelection(); } break; case Keys.Space: if (!IsDragging) { WorldTool tool = parent.SelectedTool; if (tool is WorldSelection) { ((WorldSelection)tool).ClearSelection(); } IsDragging = true; Cursor = FormMain.CursorDrag; mouselastDown = mouselastMoved; Invalidate(); } break; } }
public ToolBarButton(WorldTool type, Image image, int x, int y) : base(x, y, 56, 56, PVResources.DEAD_IMAGE) { _ToolType = type; _Image = image; X = x; Y = y; }