Version changed to 2.5; TODO feature: Straight line painting (hold Shift / Ctrl)
This commit is contained in:
@@ -416,10 +416,11 @@ namespace McBitFont {
|
|||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool mouseDown = false;
|
private bool mouseDown = false; // Used in canvas history tracking and rectangle selection logics
|
||||||
private bool fChanged = false;
|
private bool fChanged = false; // Used in canvas history (undo / redo) tracking
|
||||||
private bool mouseDownMiddle = false;
|
private bool mouseDownMiddle = false; // Used in middle mouse dragging logic
|
||||||
private int mouseX, mouseY;
|
private int mouseX, mouseY; // To remember last mouse X and Y (used in middle mouse dragging logic)
|
||||||
|
private int lastX = 0, lastY = 0; // Used for drawing straight lines
|
||||||
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
||||||
var rectSel = chkRectSelect.Checked;
|
var rectSel = chkRectSelect.Checked;
|
||||||
bool rectSelUpdated = false;
|
bool rectSelUpdated = false;
|
||||||
@@ -551,6 +552,15 @@ namespace McBitFont {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for Shift / Ctrl keys for straight lines
|
||||||
|
if (ModifierKeys.HasFlag(Keys.Shift)) {
|
||||||
|
j = lastY;
|
||||||
|
} else if (ModifierKeys.HasFlag(Keys.Control)) {
|
||||||
|
i = lastX;
|
||||||
|
}
|
||||||
|
lastX = i;
|
||||||
|
lastY = j;
|
||||||
|
|
||||||
// Paint black / white
|
// Paint black / white
|
||||||
if (e.Button == MouseButtons.Left && !f.data[i, j]) {
|
if (e.Button == MouseButtons.Left && !f.data[i, j]) {
|
||||||
f.data[i, j] = true;
|
f.data[i, j] = true;
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
||||||
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
<AssemblyVersion>2.5.0.0</AssemblyVersion>
|
||||||
<FileVersion>2.4.0.0</FileVersion>
|
<FileVersion>2.5.0.0</FileVersion>
|
||||||
<Version>$(VersionPrefix)2.4.0</Version>
|
<Version>$(VersionPrefix)2.5.0</Version>
|
||||||
<Copyright>Anton Mukhin</Copyright>
|
<Copyright>Anton Mukhin</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
2
TODO.txt
2
TODO.txt
@@ -4,7 +4,7 @@ Application:
|
|||||||
|
|
||||||
Functionality:
|
Functionality:
|
||||||
V Middle mouse - drag the canvas
|
V Middle mouse - drag the canvas
|
||||||
- Straight line painting
|
V Straight line painting (hold Shift / Ctrl)
|
||||||
V A button to Copy from Test font dialog to then paste into another frame
|
V A button to Copy from Test font dialog to then paste into another frame
|
||||||
|
|
||||||
Bugs:
|
Bugs:
|
||||||
|
Reference in New Issue
Block a user