Add checkbox to enable/disable moving field editor on mouse drag (#467)

This commit is contained in:
Charlie U
2021-03-22 18:27:29 -04:00
committed by GitHub
parent 008f372f9c
commit 8fd348448a
2 changed files with 16 additions and 1 deletions

View File

@@ -146,6 +146,7 @@ private void InitializeComponent()
this.RB_Terrain = new System.Windows.Forms.RadioButton();
this.L_TileMode = new System.Windows.Forms.Label();
this.CHK_RedirectExtensionLoad = new System.Windows.Forms.CheckBox();
this.CHK_MoveOnDrag = new System.Windows.Forms.CheckBox();
this.CHK_FieldItemSnap = new System.Windows.Forms.CheckBox();
this.Menu_Batch = new System.Windows.Forms.ToolStripMenuItem();
this.CM_Click.SuspendLayout();
@@ -1353,6 +1354,18 @@ private void InitializeComponent()
this.CHK_RedirectExtensionLoad.Text = "View Root instead of Extension";
this.CHK_RedirectExtensionLoad.UseVisualStyleBackColor = true;
//
// CKH_MoveOnDrag
//
this.CHK_MoveOnDrag.AutoSize = true;
this.CHK_MoveOnDrag.Checked = true;
this.CHK_MoveOnDrag.CheckState = System.Windows.Forms.CheckState.Checked;
this.CHK_MoveOnDrag.Location = new System.Drawing.Point(535, 423);
this.CHK_MoveOnDrag.Name = "CHK_MoveOnDrag";
this.CHK_MoveOnDrag.Size = new System.Drawing.Size(173, 17);
this.CHK_MoveOnDrag.TabIndex = 46;
this.CHK_MoveOnDrag.Text = "Move Field Item Editor on mouse drag";
this.CHK_MoveOnDrag.UseVisualStyleBackColor = true;
//
// CHK_FieldItemSnap
//
this.CHK_FieldItemSnap.AutoSize = true;
@@ -1379,6 +1392,7 @@ private void InitializeComponent()
this.ClientSize = new System.Drawing.Size(1027, 537);
this.Controls.Add(this.CHK_FieldItemSnap);
this.Controls.Add(this.CHK_RedirectExtensionLoad);
this.Controls.Add(this.CHK_MoveOnDrag);
this.Controls.Add(this.L_TileMode);
this.Controls.Add(this.RB_Terrain);
this.Controls.Add(this.RB_Item);
@@ -1554,6 +1568,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem Menu_SavePNGItems;
private System.Windows.Forms.ToolStripMenuItem Menu_SavePNGTerrain;
private System.Windows.Forms.CheckBox CHK_RedirectExtensionLoad;
private System.Windows.Forms.CheckBox CHK_MoveOnDrag;
private System.Windows.Forms.ToolStripMenuItem B_SetAllRoadTiles;
private System.Windows.Forms.ToolStripMenuItem B_ClearPlacedDesigns;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;

View File

@@ -247,7 +247,7 @@ private void GetAcreCoordinates(MouseEventArgs e, out int x, out int y)
private void PB_Acre_MouseMove(object sender, MouseEventArgs e)
{
var l = Map.CurrentLayer;
if (e.Button == MouseButtons.Left)
if (e.Button == MouseButtons.Left && CHK_MoveOnDrag.Checked)
{
MoveDrag(e);
return;