TODO features:
V Cursor for rectangular selection tool V Icons for tool buttons V Tooltips now has keyboard shortcuts info V Fix selection info: change comma to x
This commit is contained in:
46
McBitFont/Form1.Designer.cs
generated
46
McBitFont/Form1.Designer.cs
generated
@@ -214,7 +214,7 @@
|
|||||||
cbZoom.Size = new System.Drawing.Size(75, 23);
|
cbZoom.Size = new System.Drawing.Size(75, 23);
|
||||||
cbZoom.TabIndex = 6;
|
cbZoom.TabIndex = 6;
|
||||||
cbZoom.TabStop = false;
|
cbZoom.TabStop = false;
|
||||||
toolTip1.SetToolTip(cbZoom, "Canvas zoom level");
|
toolTip1.SetToolTip(cbZoom, "Canvas zoom level (Ctrl+Scroll)");
|
||||||
//
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
@@ -249,38 +249,38 @@
|
|||||||
// btnFill
|
// btnFill
|
||||||
//
|
//
|
||||||
btnFill.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnFill.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnFill.Image = Properties.Resources.Canvas_Fill;
|
||||||
btnFill.Location = new System.Drawing.Point(92, 9);
|
btnFill.Location = new System.Drawing.Point(92, 9);
|
||||||
btnFill.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnFill.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnFill.Name = "btnFill";
|
btnFill.Name = "btnFill";
|
||||||
btnFill.Size = new System.Drawing.Size(35, 35);
|
btnFill.Size = new System.Drawing.Size(35, 35);
|
||||||
btnFill.TabIndex = 8;
|
btnFill.TabIndex = 8;
|
||||||
btnFill.Text = "⬤";
|
toolTip1.SetToolTip(btnFill, "Paint canvas black (Ctrl+B)");
|
||||||
toolTip1.SetToolTip(btnFill, "Paint canvas black");
|
|
||||||
btnFill.UseVisualStyleBackColor = true;
|
btnFill.UseVisualStyleBackColor = true;
|
||||||
btnFill.Click += btnFill_Click;
|
btnFill.Click += btnFill_Click;
|
||||||
//
|
//
|
||||||
// btnClear
|
// btnClear
|
||||||
//
|
//
|
||||||
btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnClear.Image = Properties.Resources.Canvas_Clear;
|
||||||
btnClear.Location = new System.Drawing.Point(8, 9);
|
btnClear.Location = new System.Drawing.Point(8, 9);
|
||||||
btnClear.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnClear.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnClear.Name = "btnClear";
|
btnClear.Name = "btnClear";
|
||||||
btnClear.Size = new System.Drawing.Size(35, 35);
|
btnClear.Size = new System.Drawing.Size(35, 35);
|
||||||
btnClear.TabIndex = 7;
|
btnClear.TabIndex = 7;
|
||||||
btnClear.Text = "○";
|
toolTip1.SetToolTip(btnClear, "Paint canvas white (Ctrl+W)");
|
||||||
toolTip1.SetToolTip(btnClear, "Paint canvas white");
|
|
||||||
btnClear.UseVisualStyleBackColor = true;
|
btnClear.UseVisualStyleBackColor = true;
|
||||||
btnClear.Click += btnClear_Click;
|
btnClear.Click += btnClear_Click;
|
||||||
//
|
//
|
||||||
// btnMirrorY
|
// btnMirrorY
|
||||||
//
|
//
|
||||||
btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnMirrorY.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_vertical_16;
|
||||||
btnMirrorY.Location = new System.Drawing.Point(92, 92);
|
btnMirrorY.Location = new System.Drawing.Point(92, 92);
|
||||||
btnMirrorY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnMirrorY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnMirrorY.Name = "btnMirrorY";
|
btnMirrorY.Name = "btnMirrorY";
|
||||||
btnMirrorY.Size = new System.Drawing.Size(35, 35);
|
btnMirrorY.Size = new System.Drawing.Size(35, 35);
|
||||||
btnMirrorY.TabIndex = 6;
|
btnMirrorY.TabIndex = 6;
|
||||||
btnMirrorY.Text = "⩥";
|
|
||||||
toolTip1.SetToolTip(btnMirrorY, "Mirror by Y axis (vertical)");
|
toolTip1.SetToolTip(btnMirrorY, "Mirror by Y axis (vertical)");
|
||||||
btnMirrorY.UseVisualStyleBackColor = true;
|
btnMirrorY.UseVisualStyleBackColor = true;
|
||||||
btnMirrorY.Click += btnMirrorY_Click;
|
btnMirrorY.Click += btnMirrorY_Click;
|
||||||
@@ -288,12 +288,12 @@
|
|||||||
// btnMirrorX
|
// btnMirrorX
|
||||||
//
|
//
|
||||||
btnMirrorX.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnMirrorX.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnMirrorX.Image = Properties.Resources.Famfamfam_Silk_Shape_flip_horizontal_16;
|
||||||
btnMirrorX.Location = new System.Drawing.Point(50, 92);
|
btnMirrorX.Location = new System.Drawing.Point(50, 92);
|
||||||
btnMirrorX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnMirrorX.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnMirrorX.Name = "btnMirrorX";
|
btnMirrorX.Name = "btnMirrorX";
|
||||||
btnMirrorX.Size = new System.Drawing.Size(35, 35);
|
btnMirrorX.Size = new System.Drawing.Size(35, 35);
|
||||||
btnMirrorX.TabIndex = 5;
|
btnMirrorX.TabIndex = 5;
|
||||||
btnMirrorX.Text = "◮";
|
|
||||||
toolTip1.SetToolTip(btnMirrorX, "Mirror by X axis (horizontal)");
|
toolTip1.SetToolTip(btnMirrorX, "Mirror by X axis (horizontal)");
|
||||||
btnMirrorX.UseVisualStyleBackColor = true;
|
btnMirrorX.UseVisualStyleBackColor = true;
|
||||||
btnMirrorX.Click += btnMirrorX_Click;
|
btnMirrorX.Click += btnMirrorX_Click;
|
||||||
@@ -301,65 +301,65 @@
|
|||||||
// btnInvert
|
// btnInvert
|
||||||
//
|
//
|
||||||
btnInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnInvert.Image = Properties.Resources.z_contrast;
|
||||||
btnInvert.Location = new System.Drawing.Point(8, 92);
|
btnInvert.Location = new System.Drawing.Point(8, 92);
|
||||||
btnInvert.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnInvert.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnInvert.Name = "btnInvert";
|
btnInvert.Name = "btnInvert";
|
||||||
btnInvert.Size = new System.Drawing.Size(35, 35);
|
btnInvert.Size = new System.Drawing.Size(35, 35);
|
||||||
btnInvert.TabIndex = 4;
|
btnInvert.TabIndex = 4;
|
||||||
btnInvert.Text = "◪";
|
toolTip1.SetToolTip(btnInvert, "Invert pixel colors (Ctrl+I)");
|
||||||
toolTip1.SetToolTip(btnInvert, "Invert pixel colors");
|
|
||||||
btnInvert.UseVisualStyleBackColor = true;
|
btnInvert.UseVisualStyleBackColor = true;
|
||||||
btnInvert.Click += btnInvert_Click;
|
btnInvert.Click += btnInvert_Click;
|
||||||
//
|
//
|
||||||
// btnShiftDown
|
// btnShiftDown
|
||||||
//
|
//
|
||||||
btnShiftDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnShiftDown.Image = Properties.Resources.z_down;
|
||||||
btnShiftDown.Location = new System.Drawing.Point(50, 51);
|
btnShiftDown.Location = new System.Drawing.Point(50, 51);
|
||||||
btnShiftDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftDown.Name = "btnShiftDown";
|
btnShiftDown.Name = "btnShiftDown";
|
||||||
btnShiftDown.Size = new System.Drawing.Size(35, 35);
|
btnShiftDown.Size = new System.Drawing.Size(35, 35);
|
||||||
btnShiftDown.TabIndex = 3;
|
btnShiftDown.TabIndex = 3;
|
||||||
btnShiftDown.Text = "▼";
|
toolTip1.SetToolTip(btnShiftDown, "Shift pixels down (Ctrl+Down)");
|
||||||
toolTip1.SetToolTip(btnShiftDown, "Shift pixels down");
|
|
||||||
btnShiftDown.UseVisualStyleBackColor = true;
|
btnShiftDown.UseVisualStyleBackColor = true;
|
||||||
btnShiftDown.Click += btnShiftDown_Click;
|
btnShiftDown.Click += btnShiftDown_Click;
|
||||||
//
|
//
|
||||||
// btnShiftUp
|
// btnShiftUp
|
||||||
//
|
//
|
||||||
btnShiftUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnShiftUp.Image = Properties.Resources.z_uo;
|
||||||
btnShiftUp.Location = new System.Drawing.Point(50, 9);
|
btnShiftUp.Location = new System.Drawing.Point(50, 9);
|
||||||
btnShiftUp.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftUp.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftUp.Name = "btnShiftUp";
|
btnShiftUp.Name = "btnShiftUp";
|
||||||
btnShiftUp.Size = new System.Drawing.Size(35, 35);
|
btnShiftUp.Size = new System.Drawing.Size(35, 35);
|
||||||
btnShiftUp.TabIndex = 2;
|
btnShiftUp.TabIndex = 2;
|
||||||
btnShiftUp.Text = "▲";
|
toolTip1.SetToolTip(btnShiftUp, "Shift pixels up (Ctrl+Up)");
|
||||||
toolTip1.SetToolTip(btnShiftUp, "Shift pixels up");
|
|
||||||
btnShiftUp.UseVisualStyleBackColor = true;
|
btnShiftUp.UseVisualStyleBackColor = true;
|
||||||
btnShiftUp.Click += btnShiftUp_Click;
|
btnShiftUp.Click += btnShiftUp_Click;
|
||||||
//
|
//
|
||||||
// btnShiftRight
|
// btnShiftRight
|
||||||
//
|
//
|
||||||
btnShiftRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnShiftRight.Image = Properties.Resources.z_right;
|
||||||
btnShiftRight.Location = new System.Drawing.Point(92, 51);
|
btnShiftRight.Location = new System.Drawing.Point(92, 51);
|
||||||
btnShiftRight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftRight.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftRight.Name = "btnShiftRight";
|
btnShiftRight.Name = "btnShiftRight";
|
||||||
btnShiftRight.Size = new System.Drawing.Size(35, 35);
|
btnShiftRight.Size = new System.Drawing.Size(35, 35);
|
||||||
btnShiftRight.TabIndex = 1;
|
btnShiftRight.TabIndex = 1;
|
||||||
btnShiftRight.Text = "▶";
|
toolTip1.SetToolTip(btnShiftRight, "Shift pixels right (Ctrl+Right)");
|
||||||
toolTip1.SetToolTip(btnShiftRight, "Shift pixels right");
|
|
||||||
btnShiftRight.UseVisualStyleBackColor = true;
|
btnShiftRight.UseVisualStyleBackColor = true;
|
||||||
btnShiftRight.Click += btnShiftRight_Click;
|
btnShiftRight.Click += btnShiftRight_Click;
|
||||||
//
|
//
|
||||||
// btnShiftLeft
|
// btnShiftLeft
|
||||||
//
|
//
|
||||||
btnShiftLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
btnShiftLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
btnShiftLeft.Image = Properties.Resources.z_left;
|
||||||
btnShiftLeft.Location = new System.Drawing.Point(8, 51);
|
btnShiftLeft.Location = new System.Drawing.Point(8, 51);
|
||||||
btnShiftLeft.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
btnShiftLeft.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
btnShiftLeft.Name = "btnShiftLeft";
|
btnShiftLeft.Name = "btnShiftLeft";
|
||||||
btnShiftLeft.Size = new System.Drawing.Size(35, 35);
|
btnShiftLeft.Size = new System.Drawing.Size(35, 35);
|
||||||
btnShiftLeft.TabIndex = 0;
|
btnShiftLeft.TabIndex = 0;
|
||||||
btnShiftLeft.Text = "◀";
|
toolTip1.SetToolTip(btnShiftLeft, "Shift pixels left (Ctrl+Left)");
|
||||||
toolTip1.SetToolTip(btnShiftLeft, "Shift pixels left");
|
|
||||||
btnShiftLeft.UseVisualStyleBackColor = true;
|
btnShiftLeft.UseVisualStyleBackColor = true;
|
||||||
btnShiftLeft.Click += btnShiftLeft_Click;
|
btnShiftLeft.Click += btnShiftLeft_Click;
|
||||||
//
|
//
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
btnExport.Text = " Export";
|
btnExport.Text = " Export";
|
||||||
btnExport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
btnExport.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(btnExport, "Configure and export data");
|
toolTip1.SetToolTip(btnExport, "Configure and export data (Ctrl+E)");
|
||||||
btnExport.UseVisualStyleBackColor = true;
|
btnExport.UseVisualStyleBackColor = true;
|
||||||
btnExport.Click += Export_Click;
|
btnExport.Click += Export_Click;
|
||||||
//
|
//
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
btnApply.Text = " Apply";
|
btnApply.Text = " Apply";
|
||||||
btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
btnApply.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
btnApply.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(btnApply, "Apply changes made to the symbol");
|
toolTip1.SetToolTip(btnApply, "Apply changes made to the symbol (Ctrl+Space)");
|
||||||
btnApply.UseVisualStyleBackColor = true;
|
btnApply.UseVisualStyleBackColor = true;
|
||||||
btnApply.Click += button2_Click;
|
btnApply.Click += button2_Click;
|
||||||
//
|
//
|
||||||
@@ -1065,7 +1065,7 @@
|
|||||||
chkRectSelect.Text = " Select";
|
chkRectSelect.Text = " Select";
|
||||||
chkRectSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
chkRectSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
chkRectSelect.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
chkRectSelect.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
toolTip1.SetToolTip(chkRectSelect, "Turn on/off rectangle selection");
|
toolTip1.SetToolTip(chkRectSelect, "Turn on/off rectangle selection (Ctrl+R)");
|
||||||
chkRectSelect.UseVisualStyleBackColor = true;
|
chkRectSelect.UseVisualStyleBackColor = true;
|
||||||
chkRectSelect.CheckedChanged += chkRectSelect_CheckedChanged;
|
chkRectSelect.CheckedChanged += chkRectSelect_CheckedChanged;
|
||||||
//
|
//
|
||||||
@@ -1078,7 +1078,7 @@
|
|||||||
nudBrush.Name = "nudBrush";
|
nudBrush.Name = "nudBrush";
|
||||||
nudBrush.Size = new System.Drawing.Size(47, 23);
|
nudBrush.Size = new System.Drawing.Size(47, 23);
|
||||||
nudBrush.TabIndex = 24;
|
nudBrush.TabIndex = 24;
|
||||||
toolTip1.SetToolTip(nudBrush, "Symbol height");
|
toolTip1.SetToolTip(nudBrush, "Symbol height (Alt+Scroll)");
|
||||||
nudBrush.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
nudBrush.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
nudBrush.ValueChanged += nudBrush_ValueChanged;
|
nudBrush.ValueChanged += nudBrush_ValueChanged;
|
||||||
//
|
//
|
||||||
@@ -1110,9 +1110,9 @@
|
|||||||
lblSelection.Location = new System.Drawing.Point(5, 84);
|
lblSelection.Location = new System.Drawing.Point(5, 84);
|
||||||
lblSelection.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
lblSelection.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
lblSelection.Name = "lblSelection";
|
lblSelection.Name = "lblSelection";
|
||||||
lblSelection.Size = new System.Drawing.Size(30, 15);
|
lblSelection.Size = new System.Drawing.Size(32, 15);
|
||||||
lblSelection.TabIndex = 24;
|
lblSelection.TabIndex = 24;
|
||||||
lblSelection.Text = "W,H";
|
lblSelection.Text = "WxH";
|
||||||
lblSelection.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
lblSelection.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
lblSelection.Visible = false;
|
lblSelection.Visible = false;
|
||||||
//
|
//
|
||||||
|
@@ -59,7 +59,7 @@ namespace McBitFont {
|
|||||||
public bool monospaced = false;
|
public bool monospaced = false;
|
||||||
private bool modified = false;
|
private bool modified = false;
|
||||||
private bool prjModified = false;
|
private bool prjModified = false;
|
||||||
public const string version = "2.6";
|
public const string version = "2.7";
|
||||||
public string prjName = "Untitled";
|
public string prjName = "Untitled";
|
||||||
public string prjFileName = "";
|
public string prjFileName = "";
|
||||||
public int codepage = 1251;
|
public int codepage = 1251;
|
||||||
@@ -83,7 +83,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSelectionLabel(int width, int height) {
|
private void UpdateSelectionLabel(int width, int height) {
|
||||||
lblSelection.Text = width.ToString() + ',' + height.ToString();
|
lblSelection.Text = width.ToString() + 'x' + height.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetModified(bool modif = true, bool prj = false) {
|
public void SetModified(bool modif = true, bool prj = false) {
|
||||||
@@ -346,7 +346,7 @@ namespace McBitFont {
|
|||||||
vScroll.Enabled = true;
|
vScroll.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
if (!chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1394,6 +1394,10 @@ namespace McBitFont {
|
|||||||
private void chkRectSelect_CheckedChanged(object sender, EventArgs e) {
|
private void chkRectSelect_CheckedChanged(object sender, EventArgs e) {
|
||||||
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
lblSelection.Visible = lblSelectionLabel.Visible = chkRectSelect.Checked;
|
||||||
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
selectAllToolStripMenuItem.Enabled = chkRectSelect.Checked;
|
||||||
|
|
||||||
|
if (chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursorSelect();
|
||||||
|
else dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
||||||
|
|
||||||
dotPanel.Refresh();
|
dotPanel.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1688,7 +1692,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void nudBrush_ValueChanged(object sender, EventArgs e) {
|
private void nudBrush_ValueChanged(object sender, EventArgs e) {
|
||||||
dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
if (!chkRectSelect.Checked) dotPanel.Cursor = McCursor.GetCursor((int)nudBrush.Value, cellSize, gap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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.6.0.0</AssemblyVersion>
|
<AssemblyVersion>2.7.0.0</AssemblyVersion>
|
||||||
<FileVersion>2.6.0.0</FileVersion>
|
<FileVersion>2.7.0.0</FileVersion>
|
||||||
<Version>$(VersionPrefix)2.6.0</Version>
|
<Version>$(VersionPrefix)2.7.0</Version>
|
||||||
<Copyright>Anton Mukhin</Copyright>
|
<Copyright>Anton Mukhin</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
@@ -4,6 +4,7 @@ using System.Drawing;
|
|||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -101,5 +102,30 @@ namespace McBitFont {
|
|||||||
return CreateCursorNoResize(bmp, cellSize / 2, cellSize / 2);
|
return CreateCursorNoResize(bmp, cellSize / 2, cellSize / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorSelect() {
|
||||||
|
Point[] arrow = { new(1, 1), new(12, 12), new(11, 13), new(6, 13), new(2, 17), new(1, 16) };
|
||||||
|
Point[] corner1 = { new(13, 6), new(20, 6), new(20, 13), new(17, 13), new(17, 9), new(13, 9) };
|
||||||
|
Point[] corner2 = { new(17, 16), new(20, 16), new(20, 23), new(13, 23), new(13, 20), new(17, 20) };
|
||||||
|
Point[] corner3 = { new(3, 16), new(6, 16), new(6, 20), new(10, 20), new(10, 23), new(3, 23) };
|
||||||
|
Point[] corner4 = { new(6, 6), new(10, 6), new(10, 9), new(6, 9) };
|
||||||
|
|
||||||
|
Bitmap bmp = new(21, 24);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new (Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, corner1);
|
||||||
|
g.DrawPolygon(pb, corner1);
|
||||||
|
g.FillPolygon(bw, corner2);
|
||||||
|
g.DrawPolygon(pb, corner2);
|
||||||
|
g.FillPolygon(bw, corner3);
|
||||||
|
g.DrawPolygon(pb, corner3);
|
||||||
|
g.FillPolygon(bw, corner4);
|
||||||
|
g.DrawPolygon(pb, corner4);
|
||||||
|
g.FillPolygon(bw, arrow);
|
||||||
|
g.DrawPolygon(pb, arrow);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
TODO.txt
6
TODO.txt
@@ -1,8 +1,10 @@
|
|||||||
Application:
|
Application:
|
||||||
- Consider migrating to WPF in order to make DPI aware UI
|
- Consider migrating to WPF in order to make DPI aware UI
|
||||||
- Cursor for rectangular selection tool
|
V Cursor for rectangular selection tool
|
||||||
|
V Icons for tool buttons
|
||||||
|
V Tooltips now has keyboard shortcuts info
|
||||||
|
|
||||||
Functionality:
|
Functionality:
|
||||||
|
|
||||||
Bugs:
|
Bugs:
|
||||||
- Fix selection info: change comma to x
|
V Fix selection info: change comma to x
|
||||||
|
BIN
examples/SelectionCursor.mbfont
Normal file
BIN
examples/SelectionCursor.mbfont
Normal file
Binary file not shown.
Reference in New Issue
Block a user