Added a thing type browser to Insert Things Radially Mode

This commit is contained in:
MascaraSnake 2016-02-28 21:37:04 +01:00
parent 926c318f04
commit 4885e4d502
2 changed files with 22 additions and 3 deletions

View file

@ -37,6 +37,7 @@
this.snaptogrid = new CodeImp.DoomBuilder.Controls.ToolStripCheckBox(); this.snaptogrid = new CodeImp.DoomBuilder.Controls.ToolStripCheckBox();
this.typelabel = new System.Windows.Forms.ToolStripLabel(); this.typelabel = new System.Windows.Forms.ToolStripLabel();
this.type = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.type = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown();
this.browse = new System.Windows.Forms.ToolStripButton();
this.parameterlabel = new System.Windows.Forms.ToolStripLabel(); this.parameterlabel = new System.Windows.Forms.ToolStripLabel();
this.parameter = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.parameter = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
@ -53,11 +54,12 @@
this.snaptogrid, this.snaptogrid,
this.typelabel, this.typelabel,
this.type, this.type,
this.browse,
this.parameterlabel, this.parameterlabel,
this.parameter}); this.parameter});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(560, 26); this.toolStrip1.Size = new System.Drawing.Size(573, 26);
this.toolStrip1.TabIndex = 7; this.toolStrip1.TabIndex = 7;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
@ -158,7 +160,7 @@
0, 0,
0}); 0});
this.type.Name = "type"; this.type.Name = "type";
this.type.Size = new System.Drawing.Size(53, 23); this.type.Size = new System.Drawing.Size(47, 23);
this.type.Text = "1"; this.type.Text = "1";
this.type.Value = new decimal(new int[] { this.type.Value = new decimal(new int[] {
1, 1,
@ -166,6 +168,15 @@
0, 0,
0}); 0});
// //
// browse
//
this.browse.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.browse.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.List;
this.browse.Name = "browse";
this.browse.Size = new System.Drawing.Size(23, 23);
this.browse.Text = "browse";
this.browse.Click += new System.EventHandler(this.browse_Click);
//
// parameterlabel // parameterlabel
// //
this.parameterlabel.Name = "parameterlabel"; this.parameterlabel.Name = "parameterlabel";
@ -199,7 +210,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Name = "InsertThingsRadiallyOptionsPanel"; this.Name = "InsertThingsRadiallyOptionsPanel";
this.Size = new System.Drawing.Size(560, 60); this.Size = new System.Drawing.Size(573, 60);
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout(); this.toolStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
@ -220,5 +231,6 @@
private System.Windows.Forms.ToolStripLabel typelabel; private System.Windows.Forms.ToolStripLabel typelabel;
private System.Windows.Forms.ToolStripLabel parameterlabel; private System.Windows.Forms.ToolStripLabel parameterlabel;
private Controls.ToolStripNumericUpDown parameter; private Controls.ToolStripNumericUpDown parameter;
private System.Windows.Forms.ToolStripButton browse;
} }
} }

View file

@ -38,6 +38,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(snaptogrid); General.Interface.AddButton(snaptogrid);
General.Interface.AddButton(typelabel); General.Interface.AddButton(typelabel);
General.Interface.AddButton(type); General.Interface.AddButton(type);
General.Interface.AddButton(browse);
General.Interface.AddButton(parameterlabel); General.Interface.AddButton(parameterlabel);
General.Interface.AddButton(parameter); General.Interface.AddButton(parameter);
General.Interface.AddButton(reset); General.Interface.AddButton(reset);
@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(reset); General.Interface.RemoveButton(reset);
General.Interface.RemoveButton(parameter); General.Interface.RemoveButton(parameter);
General.Interface.RemoveButton(parameterlabel); General.Interface.RemoveButton(parameterlabel);
General.Interface.RemoveButton(browse);
General.Interface.RemoveButton(type); General.Interface.RemoveButton(type);
General.Interface.RemoveButton(typelabel); General.Interface.RemoveButton(typelabel);
General.Interface.RemoveButton(snaptogrid); General.Interface.RemoveButton(snaptogrid);
@ -72,5 +74,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
blockEvents = false; blockEvents = false;
number.Value = 4; number.Value = 4;
} }
private void browse_Click(object sender, EventArgs e)
{
type.Value = General.Interface.BrowseThingType(BuilderPlug.Me.MenusForm, (int)type.Value);
}
} }
} }