Added curve linedefs button on toolbar

This commit is contained in:
codeimp 2009-03-26 06:27:18 +00:00
parent 05aeea8005
commit 586cf7e295
8 changed files with 45 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 365 B

View file

@ -256,6 +256,9 @@
<ItemGroup>
<None Include="Resources\CeilsGradient.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CurveLines.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -199,6 +199,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.OnEngage();
renderer.SetPresentation(Presentation.Standard);
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CurveLinedefs);
// Convert geometry selection to linedefs selection
General.Map.Map.ClearAllMarks(false);
General.Map.Map.MarkSelectedVertices(true, true);
@ -213,6 +216,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
base.OnDisengage();
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CurveLinedefs);
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{

View file

@ -45,13 +45,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
this.buttonfloorgradient = new System.Windows.Forms.ToolStripButton();
this.buttonceilinggradient = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionh = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionv = new System.Windows.Forms.ToolStripButton();
this.buttoncurvelinedefs = new System.Windows.Forms.ToolStripButton();
this.menustrip.SuspendLayout();
this.manualstrip.SuspendLayout();
this.SuspendLayout();
@ -196,13 +197,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonfloorgradient,
this.buttonceilinggradient,
this.buttonflipselectionh,
this.buttonflipselectionv});
this.buttonflipselectionv,
this.buttoncurvelinedefs});
this.manualstrip.Location = new System.Drawing.Point(0, 49);
this.manualstrip.Name = "manualstrip";
this.manualstrip.Size = new System.Drawing.Size(423, 25);
this.manualstrip.TabIndex = 2;
this.manualstrip.Text = "toolStrip1";
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonselectionnumbers
//
this.buttonselectionnumbers.CheckOnClick = true;
@ -214,12 +222,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonselectionnumbers.Text = "View Selection Numbering";
this.buttonselectionnumbers.Click += new System.EventHandler(this.buttonselectionnumbers_Click);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonbrightnessgradient
//
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -276,6 +278,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonflipselectionv.Text = "Flip Selection Vertically";
this.buttonflipselectionv.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttoncurvelinedefs
//
this.buttoncurvelinedefs.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttoncurvelinedefs.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.CurveLines;
this.buttoncurvelinedefs.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttoncurvelinedefs.Name = "buttoncurvelinedefs";
this.buttoncurvelinedefs.Size = new System.Drawing.Size(23, 22);
this.buttoncurvelinedefs.Tag = "curvelinesmode";
this.buttoncurvelinedefs.Text = "Curve Linedefs";
this.buttoncurvelinedefs.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MenusForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -328,5 +341,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.ToolStripSeparator separatorsectors1;
private System.Windows.Forms.ToolStripButton buttonfloorgradient;
private System.Windows.Forms.ToolStripButton buttonceilinggradient;
private System.Windows.Forms.ToolStripButton buttoncurvelinedefs;
}
}

View file

@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public ToolStripButton MakeGradientCeilings { get { return buttonceilinggradient; } }
public ToolStripButton FlipSelectionV { get { return buttonflipselectionv; } }
public ToolStripButton FlipSelectionH { get { return buttonflipselectionh; } }
public ToolStripButton CurveLinedefs { get { return buttoncurvelinedefs; } }
#endregion

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -74,6 +74,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap CurveLines {
get {
object obj = ResourceManager.GetObject("CurveLines", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap FlipSelectionH {
get {
object obj = ResourceManager.GetObject("FlipSelectionH", resourceCulture);

View file

@ -124,6 +124,9 @@
<data name="ViewSelectionIndex" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewSelectionIndex.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CeilsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CeilsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -136,7 +139,7 @@
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CeilsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CeilsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="CurveLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CurveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B