TODO feature: When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
This commit is contained in:
3
McBitFont/Form1.Designer.cs
generated
3
McBitFont/Form1.Designer.cs
generated
@@ -1221,6 +1221,7 @@
|
|||||||
Controls.Add(dotPanel);
|
Controls.Add(dotPanel);
|
||||||
Controls.Add(menuStrip1);
|
Controls.Add(menuStrip1);
|
||||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||||
|
KeyPreview = true;
|
||||||
MainMenuStrip = menuStrip1;
|
MainMenuStrip = menuStrip1;
|
||||||
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
MinimumSize = new System.Drawing.Size(931, 686);
|
MinimumSize = new System.Drawing.Size(931, 686);
|
||||||
@@ -1229,6 +1230,8 @@
|
|||||||
Text = "McBitFont";
|
Text = "McBitFont";
|
||||||
FormClosing += MainForm_FormClosing;
|
FormClosing += MainForm_FormClosing;
|
||||||
Load += Form1_Load;
|
Load += Form1_Load;
|
||||||
|
KeyDown += MainForm_KeyDown;
|
||||||
|
KeyUp += MainForm_KeyUp;
|
||||||
((System.ComponentModel.ISupportInitialize)nudX).EndInit();
|
((System.ComponentModel.ISupportInitialize)nudX).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)nudY).EndInit();
|
((System.ComponentModel.ISupportInitialize)nudY).EndInit();
|
||||||
panel1.ResumeLayout(false);
|
panel1.ResumeLayout(false);
|
||||||
|
@@ -594,7 +594,7 @@ namespace McBitFont {
|
|||||||
// Check for Shift / Ctrl keys for straight lines
|
// Check for Shift / Ctrl keys for straight lines
|
||||||
if (ModifierKeys.HasFlag(Keys.Shift) && mouseDown) {
|
if (ModifierKeys.HasFlag(Keys.Shift) && mouseDown) {
|
||||||
j = lastY;
|
j = lastY;
|
||||||
} else if (ModifierKeys.HasFlag(Keys.Control) && mouseDown) {
|
} else if (ModifierKeys.HasFlag(Keys.Control) && mouseDown && !CAKeyDown) {
|
||||||
i = lastX;
|
i = lastX;
|
||||||
}
|
}
|
||||||
lastX = i;
|
lastX = i;
|
||||||
@@ -1715,5 +1715,24 @@ namespace McBitFont {
|
|||||||
SetModified();
|
SetModified();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool CAKeyDown = false;
|
||||||
|
private void MainForm_KeyDown(object sender, KeyEventArgs e) {
|
||||||
|
if (CAKeyDown) return;
|
||||||
|
if (chkRectSelect.Checked && e.Control && e.Alt) {
|
||||||
|
//MessageBox.Show("Down: Alt!");
|
||||||
|
chkRectSelect.Checked = false;
|
||||||
|
CAKeyDown = true;
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainForm_KeyUp(object sender, KeyEventArgs e) {
|
||||||
|
if (CAKeyDown && !e.Control && !e.Alt) {
|
||||||
|
chkRectSelect.Checked = true;
|
||||||
|
CAKeyDown = false;
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,7 @@ Some basic hints on the interface:
|
|||||||
- Shift + scroll to scroll left and right
|
- Shift + scroll to scroll left and right
|
||||||
- Crtl + scroll to zoom
|
- Crtl + scroll to zoom
|
||||||
- Alt + Scroll to change painting brush size
|
- Alt + Scroll to change painting brush size
|
||||||
|
- When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
|
||||||
|
|
||||||
Download in the [Releases](https://gitea.mcflyer.ru/McFLY/McBitFont/releases) section!
|
Download in the [Releases](https://gitea.mcflyer.ru/McFLY/McBitFont/releases) section!
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user