summaryrefslogtreecommitdiff
path: root/MainForm.cs
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-06-12 22:52:18 +0000
committerIan C <ianc@noddybox.co.uk>2005-06-12 22:52:18 +0000
commite34eee34067e5958f00764ff28d3ee17008e3b3a (patch)
treef92b9844e5fd2c9093faeeb31e2717b5df6f0695 /MainForm.cs
parentb8b5e5a5cc836a381b4861bc9fc18eb0b72cf0c9 (diff)
Added button for setting all character sizes
Diffstat (limited to 'MainForm.cs')
-rw-r--r--MainForm.cs79
1 files changed, 54 insertions, 25 deletions
diff --git a/MainForm.cs b/MainForm.cs
index a0f3238..ea68be1 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -36,7 +36,7 @@ namespace BitmapFontEd
private System.Windows.Forms.Label label1;
private System.Windows.Forms.MenuItem m_helpMenu;
private System.Windows.Forms.NumericUpDown m_codeSelect;
- private System.Windows.Forms.GroupBox m_globaladjustGroup;
+ private System.Windows.Forms.Label label5;
private System.Windows.Forms.GroupBox m_adjustGroup;
private System.Windows.Forms.Button m_scrollDown;
private System.Windows.Forms.Button m_scrollUp;
@@ -45,9 +45,11 @@ namespace BitmapFontEd
private System.Windows.Forms.Button m_mirrorVertical;
private System.Windows.Forms.Button m_autoheight;
private System.Windows.Forms.Button m_rotRight;
+ private System.Windows.Forms.Button m_setsize;
private System.Windows.Forms.Button m_topleft;
private System.Windows.Forms.Button m_revert;
private System.Windows.Forms.Button m_dropShadow;
+ private System.Windows.Forms.GroupBox m_globaladjustGroup;
private System.Windows.Forms.MenuItem m_about;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button m_scrollRight;
@@ -63,7 +65,6 @@ namespace BitmapFontEd
private System.Windows.Forms.Button m_edge;
private System.Windows.Forms.MenuItem m_quit;
private System.Windows.Forms.MenuItem m_save;
- private System.Windows.Forms.Label label5;
private System.Windows.Forms.MenuItem m_saveAs;
private System.Windows.Forms.Button m_scrollLeft;
private System.Windows.Forms.GroupBox m_editGroup;
@@ -147,7 +148,6 @@ namespace BitmapFontEd
this.m_editGroup = new System.Windows.Forms.GroupBox();
this.m_scrollLeft = new System.Windows.Forms.Button();
this.m_saveAs = new System.Windows.Forms.MenuItem();
- this.label5 = new System.Windows.Forms.Label();
this.m_save = new System.Windows.Forms.MenuItem();
this.m_quit = new System.Windows.Forms.MenuItem();
this.m_edge = new System.Windows.Forms.Button();
@@ -163,9 +163,11 @@ namespace BitmapFontEd
this.m_scrollRight = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.m_about = new System.Windows.Forms.MenuItem();
+ this.m_globaladjustGroup = new System.Windows.Forms.GroupBox();
this.m_dropShadow = new System.Windows.Forms.Button();
this.m_revert = new System.Windows.Forms.Button();
this.m_topleft = new System.Windows.Forms.Button();
+ this.m_setsize = new System.Windows.Forms.Button();
this.m_rotRight = new System.Windows.Forms.Button();
this.m_autoheight = new System.Windows.Forms.Button();
this.m_mirrorVertical = new System.Windows.Forms.Button();
@@ -174,15 +176,15 @@ namespace BitmapFontEd
this.m_scrollUp = new System.Windows.Forms.Button();
this.m_scrollDown = new System.Windows.Forms.Button();
this.m_adjustGroup = new System.Windows.Forms.GroupBox();
- this.m_globaladjustGroup = new System.Windows.Forms.GroupBox();
+ this.label5 = new System.Windows.Forms.Label();
this.m_codeSelect = new System.Windows.Forms.NumericUpDown();
this.m_helpMenu = new System.Windows.Forms.MenuItem();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.m_selectGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.m_charSelect)).BeginInit();
- this.m_adjustGroup.SuspendLayout();
this.m_globaladjustGroup.SuspendLayout();
+ this.m_adjustGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.m_codeSelect)).BeginInit();
this.SuspendLayout();
//
@@ -267,15 +269,6 @@ namespace BitmapFontEd
this.m_saveAs.Text = "S&ave as...";
this.m_saveAs.Click += new System.EventHandler(this.OnSaveAs);
//
- // label5
- //
- this.label5.Location = new System.Drawing.Point(8, 200);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(72, 16);
- this.label5.TabIndex = 11;
- this.label5.Text = "Rotate";
- this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// m_save
//
this.m_save.Index = 2;
@@ -401,6 +394,19 @@ namespace BitmapFontEd
this.m_about.Text = "&About";
this.m_about.Click += new System.EventHandler(this.OnAbout);
//
+ // m_globaladjustGroup
+ //
+ this.m_globaladjustGroup.Controls.Add(this.m_setsize);
+ this.m_globaladjustGroup.Controls.Add(this.m_autoheight);
+ this.m_globaladjustGroup.Controls.Add(this.m_topleft);
+ this.m_globaladjustGroup.Controls.Add(this.m_resize);
+ this.m_globaladjustGroup.Location = new System.Drawing.Point(424, 8);
+ this.m_globaladjustGroup.Name = "m_globaladjustGroup";
+ this.m_globaladjustGroup.Size = new System.Drawing.Size(216, 80);
+ this.m_globaladjustGroup.TabIndex = 2;
+ this.m_globaladjustGroup.TabStop = false;
+ this.m_globaladjustGroup.Text = "Global Adjustments";
+ //
// m_dropShadow
//
this.m_dropShadow.Location = new System.Drawing.Point(8, 272);
@@ -428,6 +434,15 @@ namespace BitmapFontEd
this.m_topleft.Text = "Align Top Left";
this.m_topleft.Click += new System.EventHandler(this.OnAlignTopLeft);
//
+ // m_setsize
+ //
+ this.m_setsize.Location = new System.Drawing.Point(112, 48);
+ this.m_setsize.Name = "m_setsize";
+ this.m_setsize.Size = new System.Drawing.Size(96, 24);
+ this.m_setsize.TabIndex = 4;
+ this.m_setsize.Text = "Set Size";
+ this.m_setsize.Click += new System.EventHandler(this.OnSetSize);
+ //
// m_rotRight
//
this.m_rotRight.Location = new System.Drawing.Point(112, 216);
@@ -517,17 +532,14 @@ namespace BitmapFontEd
this.m_adjustGroup.TabStop = false;
this.m_adjustGroup.Text = "Adjustments and Effects";
//
- // m_globaladjustGroup
+ // label5
//
- this.m_globaladjustGroup.Controls.Add(this.m_autoheight);
- this.m_globaladjustGroup.Controls.Add(this.m_topleft);
- this.m_globaladjustGroup.Controls.Add(this.m_resize);
- this.m_globaladjustGroup.Location = new System.Drawing.Point(424, 8);
- this.m_globaladjustGroup.Name = "m_globaladjustGroup";
- this.m_globaladjustGroup.Size = new System.Drawing.Size(216, 80);
- this.m_globaladjustGroup.TabIndex = 2;
- this.m_globaladjustGroup.TabStop = false;
- this.m_globaladjustGroup.Text = "Global Adjustments";
+ this.label5.Location = new System.Drawing.Point(8, 200);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(72, 16);
+ this.label5.TabIndex = 11;
+ this.label5.Text = "Rotate";
+ this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// m_codeSelect
//
@@ -595,8 +607,8 @@ namespace BitmapFontEd
this.Closing += new System.ComponentModel.CancelEventHandler(this.OnClosing);
this.m_selectGroup.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.m_charSelect)).EndInit();
- this.m_adjustGroup.ResumeLayout(false);
this.m_globaladjustGroup.ResumeLayout(false);
+ this.m_adjustGroup.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.m_codeSelect)).EndInit();
this.ResumeLayout(false);
}
@@ -1178,5 +1190,22 @@ namespace BitmapFontEd
m_edit.BitmapChar=new BitmapChar(m_chars[m_selected]);
}
+
+ void OnSetSize(object sender, System.EventArgs e)
+ {
+ SetSizeForm d=new SetSizeForm();
+
+ if (d.ShowDialog()==DialogResult.OK)
+ {
+ FetchEdit();
+
+ foreach (BitmapChar c in m_chars)
+ {
+ c.Resize(d.CharWidth,d.CharHeight);
+ }
+
+ m_edit.BitmapChar=new BitmapChar(m_chars[m_selected]);
+ }
+ }
}
}