From 6fb5a1f773be24e25e83f2d51cd0aa9f7bd0d660 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 01:13:40 +0300 Subject: [PATCH] TODO feature: Tooltips on main form --- McBitFont/Export.Designer.cs | 12 ++++++++++++ McBitFont/Export.resx | 6 ++++++ McBitFont/Form1.Designer.cs | 21 +++++++++++++++++++++ McBitFont/Form1.resx | 3 +++ 4 files changed, 42 insertions(+) diff --git a/McBitFont/Export.Designer.cs b/McBitFont/Export.Designer.cs index c53b8b5..6853331 100644 --- a/McBitFont/Export.Designer.cs +++ b/McBitFont/Export.Designer.cs @@ -23,6 +23,7 @@ /// the contents of this method with the code editor. /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.txtOutput = new System.Windows.Forms.RichTextBox(); this.gbScan = new System.Windows.Forms.GroupBox(); this.cbVDir = new System.Windows.Forms.ComboBox(); @@ -43,6 +44,7 @@ this.cbFormat = new System.Windows.Forms.ComboBox(); this.btnGenerate = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.gbScan.SuspendLayout(); this.gbOptions.SuspendLayout(); this.gbNumbers.SuspendLayout(); @@ -138,6 +140,7 @@ this.cbZeroes.Size = new System.Drawing.Size(98, 17); this.cbZeroes.TabIndex = 2; this.cbZeroes.Text = "Leading zeroes"; + this.toolTip1.SetToolTip(this.cbZeroes, "Add leading zeroes: 0x01 / 0x1"); this.cbZeroes.UseVisualStyleBackColor = true; // // cbHeader @@ -150,6 +153,7 @@ this.cbHeader.Size = new System.Drawing.Size(86, 17); this.cbHeader.TabIndex = 1; this.cbHeader.Text = "Meta header"; + this.toolTip1.SetToolTip(this.cbHeader, "Add meta header with meta data"); this.cbHeader.UseVisualStyleBackColor = true; this.cbHeader.CheckedChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged); // @@ -163,6 +167,7 @@ this.cbComments.Size = new System.Drawing.Size(75, 17); this.cbComments.TabIndex = 0; this.cbComments.Text = "Comments"; + this.toolTip1.SetToolTip(this.cbComments, "Add descriptive comments"); this.cbComments.UseVisualStyleBackColor = true; // // gbNumbers @@ -309,6 +314,12 @@ this.btnClose.Text = "Close"; this.btnClose.UseVisualStyleBackColor = true; // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // // Export // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -362,5 +373,6 @@ private System.Windows.Forms.Button btnGenerate; private System.Windows.Forms.Button btnClose; private System.Windows.Forms.CheckBox cbZeroes; + private System.Windows.Forms.ToolTip toolTip1; } } \ No newline at end of file diff --git a/McBitFont/Export.resx b/McBitFont/Export.resx index 1af7de1..d54ad1e 100644 --- a/McBitFont/Export.resx +++ b/McBitFont/Export.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 17, 17 + \ No newline at end of file diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index e97f839..2ec8806 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -75,6 +75,7 @@ this.dlgSave = new System.Windows.Forms.SaveFileDialog(); this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.btnBaseline = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -109,6 +110,7 @@ this.nudX.Name = "nudX"; this.nudX.Size = new System.Drawing.Size(55, 20); this.nudX.TabIndex = 1; + this.toolTip1.SetToolTip(this.nudX, "Symbol width"); this.nudX.Value = new decimal(new int[] { 32, 0, @@ -133,6 +135,7 @@ this.nudY.Name = "nudY"; this.nudY.Size = new System.Drawing.Size(55, 20); this.nudY.TabIndex = 2; + this.toolTip1.SetToolTip(this.nudY, "Symbol height"); this.nudY.Value = new decimal(new int[] { 32, 0, @@ -193,6 +196,7 @@ this.cbZoom.Size = new System.Drawing.Size(59, 21); this.cbZoom.TabIndex = 6; this.cbZoom.TabStop = false; + this.toolTip1.SetToolTip(this.cbZoom, "Canvas zoom level"); this.cbZoom.SelectedIndexChanged += new System.EventHandler(this.cbZoom_SelectedIndexChanged); // // label4 @@ -229,6 +233,7 @@ this.btnMirrorY.Size = new System.Drawing.Size(30, 30); this.btnMirrorY.TabIndex = 6; this.btnMirrorY.Text = "⩥"; + this.toolTip1.SetToolTip(this.btnMirrorY, "Mirror by Y axis (vertical)"); this.btnMirrorY.UseVisualStyleBackColor = true; this.btnMirrorY.Click += new System.EventHandler(this.btnMirrorY_Click); // @@ -240,6 +245,7 @@ this.btnMirrorX.Size = new System.Drawing.Size(30, 30); this.btnMirrorX.TabIndex = 5; this.btnMirrorX.Text = "◮"; + this.toolTip1.SetToolTip(this.btnMirrorX, "Mirror by X axis (horizontal)"); this.btnMirrorX.UseVisualStyleBackColor = true; this.btnMirrorX.Click += new System.EventHandler(this.btnMirrorX_Click); // @@ -251,6 +257,7 @@ this.btnInvert.Size = new System.Drawing.Size(30, 30); this.btnInvert.TabIndex = 4; this.btnInvert.Text = "◪"; + this.toolTip1.SetToolTip(this.btnInvert, "Invert pixel colors"); this.btnInvert.UseVisualStyleBackColor = true; this.btnInvert.Click += new System.EventHandler(this.btnInvert_Click); // @@ -262,6 +269,7 @@ this.btnShiftDown.Size = new System.Drawing.Size(30, 30); this.btnShiftDown.TabIndex = 3; this.btnShiftDown.Text = "▼"; + this.toolTip1.SetToolTip(this.btnShiftDown, "Shift pixels down"); this.btnShiftDown.UseVisualStyleBackColor = true; this.btnShiftDown.Click += new System.EventHandler(this.btnShiftDown_Click); // @@ -273,6 +281,7 @@ this.btnShiftUp.Size = new System.Drawing.Size(30, 30); this.btnShiftUp.TabIndex = 2; this.btnShiftUp.Text = "▲"; + this.toolTip1.SetToolTip(this.btnShiftUp, "Shift pixels up"); this.btnShiftUp.UseVisualStyleBackColor = true; this.btnShiftUp.Click += new System.EventHandler(this.btnShiftUp_Click); // @@ -284,6 +293,7 @@ this.btnShiftRight.Size = new System.Drawing.Size(30, 30); this.btnShiftRight.TabIndex = 1; this.btnShiftRight.Text = "▶"; + this.toolTip1.SetToolTip(this.btnShiftRight, "Shift pixels right"); this.btnShiftRight.UseVisualStyleBackColor = true; this.btnShiftRight.Click += new System.EventHandler(this.btnShiftRight_Click); // @@ -295,6 +305,7 @@ this.btnShiftLeft.Size = new System.Drawing.Size(30, 30); this.btnShiftLeft.TabIndex = 0; this.btnShiftLeft.Text = "◀"; + this.toolTip1.SetToolTip(this.btnShiftLeft, "Shift pixels left"); this.btnShiftLeft.UseVisualStyleBackColor = true; this.btnShiftLeft.Click += new System.EventHandler(this.btnShiftLeft_Click); // @@ -306,6 +317,7 @@ this.btnExport.Size = new System.Drawing.Size(75, 23); this.btnExport.TabIndex = 10; this.btnExport.Text = "Export"; + this.toolTip1.SetToolTip(this.btnExport, "Configure and export data"); this.btnExport.UseVisualStyleBackColor = true; this.btnExport.Click += new System.EventHandler(this.button1_Click); // @@ -345,6 +357,7 @@ this.btnApply.Size = new System.Drawing.Size(75, 23); this.btnApply.TabIndex = 13; this.btnApply.Text = "Apply"; + this.toolTip1.SetToolTip(this.btnApply, "Apply changes made to the symbol"); this.btnApply.UseVisualStyleBackColor = true; this.btnApply.Click += new System.EventHandler(this.button2_Click); // @@ -653,9 +666,16 @@ this.btnBaseline.Size = new System.Drawing.Size(75, 23); this.btnBaseline.TabIndex = 18; this.btnBaseline.Text = "Baseline"; + this.toolTip1.SetToolTip(this.btnBaseline, "Set irtual base line for the font"); this.btnBaseline.UseVisualStyleBackColor = true; this.btnBaseline.Click += new System.EventHandler(this.btnBaseline_Click); // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -748,6 +768,7 @@ private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; private System.Windows.Forms.Button btnBaseline; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolTip toolTip1; } } diff --git a/McBitFont/Form1.resx b/McBitFont/Form1.resx index 4266cbc..840ae1f 100644 --- a/McBitFont/Form1.resx +++ b/McBitFont/Form1.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 436, 17 + 17, 17