diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 2ec8806..43838bf 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -76,6 +76,7 @@ this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.btnBaseline = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.btnClear = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -213,6 +214,7 @@ // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btnClear); this.panel1.Controls.Add(this.btnMirrorY); this.panel1.Controls.Add(this.btnMirrorX); this.panel1.Controls.Add(this.btnInvert); @@ -676,6 +678,18 @@ this.toolTip1.InitialDelay = 500; this.toolTip1.ReshowDelay = 100; // + // btnClear + // + this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.btnClear.Location = new System.Drawing.Point(7, 8); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(30, 30); + this.btnClear.TabIndex = 7; + this.btnClear.Text = "○"; + this.toolTip1.SetToolTip(this.btnClear, "Clear canvas"); + this.btnClear.UseVisualStyleBackColor = true; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -769,6 +783,7 @@ private System.Windows.Forms.Button btnBaseline; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Button btnClear; } } diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index f6e3901..3c2b151 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -816,6 +816,12 @@ namespace McBitFont { } + private void btnClear_Click(object sender, EventArgs e) { + Array.Clear(f.data, 0, f.data.Length); + modified = true; + dotPanel.Refresh(); + } + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (prjModified) { if (MessageBox.Show("The project is modified.\nAre you sure you want to quit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { diff --git a/TODO.txt b/TODO.txt index 8c64334..4c0d3db 100644 --- a/TODO.txt +++ b/TODO.txt @@ -9,8 +9,8 @@ Functionality: V "Only numbers" range in the New dialog V "Specify range" in the New dialog V "Single frame", "only numbers" and "specify range" as radio buttons -- Ability to make monospaced font variable width one -- Button to Clear/Fill a block +- Ability to make monospaced font a variable width one +V Button to Clear/Fill a block - Undo/Redo - Image import from a file - Import from a text array @@ -19,7 +19,7 @@ V Copy-paste to a symbol with different size - Change height of variable width fonts with ability to choose which side to add pixels to V Make it possible to have zero width chars in VarWidth fonts - "Packed" fonts export -- Tooltips on main form +V Tooltips on main form Bugs: V Every char changes its width to default on VarWidth font height change!