Added Draw Grid mode.

When Draw Rectangle or Draw Ellipse mode is enabled, it's settings are now shown in side panel.
Draw Ellipse mode: increased maximum number of sides to 512.
Changed the way tags are shown in Tag Selector controls. Tags without labels are now shown as a number (not "Tag N"), and tags with label are now shown as "N (label)", not "label (N)".
Tag labels are now shown in Thing, Sector and Linedef info panels.
Once again changed the way things are rendered while dragged.
Rearranged the label in PairedIntControl and PairedFieldControl (it is now behind numeric controls).
Optimized MapSet.GetSectorByCoordinates().
This commit is contained in:
MaxED 2014-01-16 09:32:05 +00:00
parent 75114595ed
commit e487a9c80a
46 changed files with 2276 additions and 777 deletions

View file

@ -0,0 +1,11 @@

namespace CodeImp.DoomBuilder.Actions
{
public class HintsManager
{
public static string GetRtfString(string text) {
text = text.Replace("<b>", "{\\b ").Replace("</b>", "}").Replace("<br>", "\\par\\par ");
return "{\\rtf1" + text + "}";
}
}
}

View file

@ -656,6 +656,7 @@
<None Include="Resources\Copy.png" />
<None Include="Resources\Cut.png" />
<None Include="Resources\Close.png" />
<Compile Include="Actions\HintsManager.cs" />
<Compile Include="Config\AllTexturesSet.cs" />
<Compile Include="Config\FlagTranslation.cs" />
<Compile Include="Config\PasteOptions.cs" />

View file

@ -137,8 +137,8 @@ namespace CodeImp.DoomBuilder.Controls
infopanel.Text = " Linedef " + l.Index + " ";
action.Text = act.ToString();
length.Text = l.Length.ToString("0.##");
angle.Text = l.AngleDeg.ToString() + "\u00B0";
tag.Text = l.Tag.ToString();
angle.Text = l.AngleDeg + "\u00B0";
tag.Text = l.Tag + (General.Map.Options.TagLabels.ContainsKey(l.Tag) ? " (" + General.Map.Options.TagLabels[l.Tag] + ")" : string.Empty);
unpegged.Text = peggedness;
//mxd

View file

@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.Controls
effect.Text = effectinfo;
ceiling.Text = s.CeilHeight.ToString();
floor.Text = s.FloorHeight.ToString();
tag.Text = s.Tag.ToString();
tag.Text = s.Tag + (General.Map.Options.TagLabels.ContainsKey(s.Tag) ? " (" + General.Map.Options.TagLabels[s.Tag] + ")" : string.Empty);
height.Text = sheight.ToString();
brightness.Text = s.Brightness.ToString();
floorname.Text = s.FloorTexture;

View file

@ -34,6 +34,7 @@ namespace CodeImp.DoomBuilder.Controls
System.Windows.Forms.Label label1;
this.labelaction = new System.Windows.Forms.Label();
this.infopanel = new System.Windows.Forms.GroupBox();
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
this.arg5 = new System.Windows.Forms.Label();
this.arglbl5 = new System.Windows.Forms.Label();
this.arglbl4 = new System.Windows.Forms.Label();
@ -54,7 +55,6 @@ namespace CodeImp.DoomBuilder.Controls
this.spritetex = new System.Windows.Forms.Panel();
this.flagsPanel = new System.Windows.Forms.GroupBox();
this.flags = new System.Windows.Forms.ListView();
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
label5 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.Controls
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(165, 77);
label5.Location = new System.Drawing.Point(165, 58);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(38, 14);
label5.TabIndex = 8;
@ -139,6 +139,14 @@ namespace CodeImp.DoomBuilder.Controls
this.infopanel.TabStop = false;
this.infopanel.Text = " Thing ";
//
// anglecontrol
//
this.anglecontrol.Angle = 0;
this.anglecontrol.Location = new System.Drawing.Point(232, 52);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(24, 24);
this.anglecontrol.TabIndex = 38;
//
// arg5
//
this.arg5.AutoEllipsis = true;
@ -242,7 +250,7 @@ namespace CodeImp.DoomBuilder.Controls
// angle
//
this.angle.AutoSize = true;
this.angle.Location = new System.Drawing.Point(206, 77);
this.angle.Location = new System.Drawing.Point(206, 58);
this.angle.Name = "angle";
this.angle.Size = new System.Drawing.Size(25, 14);
this.angle.TabIndex = 11;
@ -339,14 +347,6 @@ namespace CodeImp.DoomBuilder.Controls
this.flags.UseCompatibleStateImageBehavior = false;
this.flags.View = System.Windows.Forms.View.List;
//
// anglecontrol
//
this.anglecontrol.Angle = 0;
this.anglecontrol.Location = new System.Drawing.Point(234, 71);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(24, 24);
this.anglecontrol.TabIndex = 38;
//
// ThingInfoPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);

View file

@ -126,9 +126,9 @@ namespace CodeImp.DoomBuilder.Controls
infopanel.Text = " Thing " + t.Index + " ";
type.Text = t.Type + " - " + ti.Title;
action.Text = actioninfo;
position.Text = t.Position.x.ToString() + ", " + t.Position.y.ToString() + ", " + zinfo;
tag.Text = t.Tag.ToString();
angle.Text = t.AngleDoom.ToString() + "\u00B0";
position.Text = t.Position.x + ", " + t.Position.y + ", " + zinfo;
tag.Text = t.Tag + (General.Map.Options.TagLabels.ContainsKey(t.Tag) ? " (" + General.Map.Options.TagLabels[t.Tag] + ")" : string.Empty);
angle.Text = t.AngleDoom + "\u00B0";
anglecontrol.Angle = t.AngleDoom;
anglecontrol.Left = angle.Right + 1;

View file

@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
@ -177,9 +174,6 @@
<metadata name="arg1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="angle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -201,10 +195,4 @@
<metadata name="spritetex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spritename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="spritetex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -102,9 +102,9 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.bReset);
this.Controls.Add(this.bLink);
this.Controls.Add(this.label);
this.Controls.Add(this.value1);
this.Controls.Add(this.value2);
this.Controls.Add(this.label);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.Name = "PairedFieldsControl";
this.Size = new System.Drawing.Size(268, 26);

View file

@ -1,120 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -33,7 +33,7 @@
//
// label
//
this.label.Location = new System.Drawing.Point(0, 6);
this.label.Location = new System.Drawing.Point(3, 6);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(87, 14);
this.label.TabIndex = 40;
@ -47,6 +47,7 @@
this.value1.AllowRelative = true;
this.value1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.value1.ButtonStep = 1;
this.value1.ButtonStepFloat = 1F;
this.value1.Location = new System.Drawing.Point(89, 1);
this.value1.Name = "value1";
this.value1.Size = new System.Drawing.Size(62, 24);
@ -62,6 +63,7 @@
this.value2.AllowRelative = true;
this.value2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.value2.ButtonStep = 1;
this.value2.ButtonStepFloat = 1F;
this.value2.Location = new System.Drawing.Point(157, 1);
this.value2.Name = "value2";
this.value2.Size = new System.Drawing.Size(62, 24);
@ -87,9 +89,9 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.bReset);
this.Controls.Add(this.label);
this.Controls.Add(this.value1);
this.Controls.Add(this.value2);
this.Controls.Add(this.label);
this.Name = "PairedIntControl";
this.Size = new System.Drawing.Size(249, 26);
this.ResumeLayout(false);

View file

@ -1,120 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -9,24 +9,15 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
{
internal struct TagInfo
{
public string Label;
public int Tag;
public bool HasLabel;
public readonly string Label;
public readonly int Tag;
public TagInfo(int tag, string label) {
if(string.IsNullOrEmpty(label)) {
Label = "Tag " + tag;
HasLabel = false;
} else {
Label = label;
HasLabel = true;
}
Label = (string.IsNullOrEmpty(label) ? tag.ToString() : tag + " (" + label + ")");
Tag = tag;
}
public override string ToString() {
if(HasLabel) return Label + " (tag " + Tag + ")";
return Label;
}
}
@ -116,14 +107,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
return;
}
if(string.IsNullOrEmpty(cbTagPicker.Text)) {
//check text
string text = cbTagPicker.Text.Trim().ToLowerInvariant();
if(string.IsNullOrEmpty(text)) {
valid = false;
return;
}
//check text
string text = cbTagPicker.Text.Trim().ToLowerInvariant();
if(!int.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out tag)) {
//maybe it's user-pasted label?
foreach(TagInfo info in infos) {

View file

@ -25,12 +25,12 @@
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView = new System.Windows.Forms.DataGridView();
this.TagColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Label = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -39,7 +39,7 @@
this.Things = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.apply = new System.Windows.Forms.Button();
this.cancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout();
//
@ -55,21 +55,21 @@
this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.TagColumn,
this.Label,
this.Sectors,
this.Linedefs,
this.Things});
this.TagColumn,
this.Label,
this.Sectors,
this.Linedefs,
this.Things});
this.dataGridView.Location = new System.Drawing.Point(12, 12);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
@ -84,8 +84,8 @@
// TagColumn
//
this.TagColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.TagColumn.DefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.TagColumn.DefaultCellStyle = dataGridViewCellStyle14;
this.TagColumn.HeaderText = "Tag";
this.TagColumn.Name = "TagColumn";
this.TagColumn.ReadOnly = true;
@ -94,16 +94,16 @@
// Label
//
this.Label.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Label.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Label.DefaultCellStyle = dataGridViewCellStyle15;
this.Label.HeaderText = "Label";
this.Label.Name = "Label";
//
// Sectors
//
this.Sectors.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Sectors.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Sectors.DefaultCellStyle = dataGridViewCellStyle16;
this.Sectors.HeaderText = "Sectors";
this.Sectors.Name = "Sectors";
this.Sectors.ReadOnly = true;
@ -113,8 +113,8 @@
// Linedefs
//
this.Linedefs.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Linedefs.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Linedefs.DefaultCellStyle = dataGridViewCellStyle17;
this.Linedefs.HeaderText = "Linedefs";
this.Linedefs.Name = "Linedefs";
this.Linedefs.ReadOnly = true;
@ -124,8 +124,8 @@
// Things
//
this.Things.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Things.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.Things.DefaultCellStyle = dataGridViewCellStyle18;
this.Things.HeaderText = "Things";
this.Things.Name = "Things";
this.Things.ReadOnly = true;
@ -155,17 +155,20 @@
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// label1
// textBox1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 278);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(472, 26);
this.label1.TabIndex = 6;
this.label1.Text = "Double click on a cell in Sectors, Linedefs or Things column to select map elemen" +
"ts with given tag.\r\nRight click to open Properties form for map elements with gi" +
"ven tag.";
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.SystemColors.Control;
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.Location = new System.Drawing.Point(12, 274);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(477, 68);
this.textBox1.TabIndex = 7;
this.textBox1.Text = "Click on a cell in Sectors, Linedefs or Things column to select map elements with" +
" given tag.\r\nRight click to open Properties form for map elements with given tag" +
".";
//
// TagStatisticsForm
//
@ -174,9 +177,9 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(501, 348);
this.Controls.Add(this.label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.dataGridView);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MinimumSize = new System.Drawing.Size(120, 80);
@ -200,6 +203,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Sectors;
private System.Windows.Forms.DataGridViewTextBoxColumn Linedefs;
private System.Windows.Forms.DataGridViewTextBoxColumn Things;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
}
}

View file

@ -196,8 +196,77 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
}
private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
if(e.ColumnIndex < 2) return;
//select
if (e.Button == MouseButtons.Left) {
int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value;
if(e.ColumnIndex == 2) { //sectors
List<Sector> list = getSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value);
if(list.Count > 0) {
General.Map.Map.ClearSelectedSectors();
General.Map.Map.ClearSelectedLinedefs();
List<Vector2D> points = new List<Vector2D>();
General.Editing.ChangeMode("SectorsMode");
ClassicMode mode = (ClassicMode)General.Editing.Mode;
foreach(Sector s in list) {
//s.Selected = true;
mode.SelectMapElement(s);
foreach(Sidedef sd in s.Sidedefs) {
points.Add(sd.Line.Start.Position);
points.Add(sd.Line.End.Position);
}
}
//General.Map.Map.Update();
showSelection(points);
}
} else if(e.ColumnIndex == 3) { //linedefs
List<Linedef> list = getLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value);
if(list.Count > 0) {
General.Map.Map.ClearSelectedSectors();
General.Map.Map.ClearSelectedLinedefs();
List<Vector2D> points = new List<Vector2D>();
foreach(Linedef l in list) {
l.Selected = true;
points.Add(l.Start.Position);
points.Add(l.End.Position);
}
General.Map.Map.Update();
General.Editing.ChangeMode("LinedefsMode");
showSelection(points);
}
} else if(e.ColumnIndex == 4) { //things
List<Thing> list = getThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value);
if(list.Count > 0) {
General.Map.Map.ClearSelectedThings();
List<Vector2D> points = new List<Vector2D>();
foreach(Thing t in list) {
t.Selected = true;
Vector2D p = (Vector2D)t.Position;
points.Add(p);
points.Add(p + new Vector2D(t.Size * 2.0f, t.Size * 2.0f));
points.Add(p + new Vector2D(t.Size * 2.0f, -t.Size * 2.0f));
points.Add(p + new Vector2D(-t.Size * 2.0f, t.Size * 2.0f));
points.Add(p + new Vector2D(-t.Size * 2.0f, -t.Size * 2.0f));
}
General.Map.Map.Update();
General.Editing.ChangeMode("ThingsMode");
showSelection(points);
}
}
//open properties window
if(e.ColumnIndex > 1 && e.Button == MouseButtons.Right) {
} else if(e.Button == MouseButtons.Right) {
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true;
int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value;

View file

@ -1,135 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="TagColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
<metadata name="Label.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
<metadata name="Sectors.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
<metadata name="Linedefs.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
<metadata name="Things.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</root>

View file

@ -2922,21 +2922,25 @@ namespace CodeImp.DoomBuilder.Map
//mxd
/// <summary>This returns a sector if given coordinates are inside one.</summary>
public Sector GetSectorByCoordinates(Vector2D pos) {
Linedef nl;
Sector sector = null;
List<Linedef> lines = new List<Linedef>(10);
nl = NearestLinedef(pos);
if (nl != null) {
foreach (Sector s in sectors) {
if(pos.x < s.BBox.Left || pos.x > s.BBox.Right || pos.y < s.BBox.Top || pos.y > s.BBox.Bottom) continue;
foreach (Sidedef side in s.Sidedefs) lines.Add(side.Line);
}
Linedef nl = NearestLinedef(lines, pos);
if(nl != null) {
// Check what side of line we are at
if (nl.SideOfLine(pos) < 0f) {
if(nl.SideOfLine(pos) < 0f) {
// Front side
if (nl.Front != null) sector = nl.Front.Sector;
if(nl.Front != null) return nl.Front.Sector;
} else {
// Back side
if (nl.Back != null) sector = nl.Back.Sector;
if(nl.Back != null) return nl.Back.Sector;
}
}
return sector;
return null;
}
/// <summary>This finds the line closest to the specified position.</summary>

View file

@ -28,4 +28,4 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.14.0.1879")]
[assembly: AssemblyVersion("1.14.0.1880")]

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5466
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View file

@ -283,9 +283,6 @@
<data name="ErrorLarge" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -406,4 +403,7 @@
<data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -82,11 +82,12 @@ namespace CodeImp.DoomBuilder.Rendering
dragThings = new Presentation();
dragThings.layers.Add(new PresentLayer(RendererLayer.Background, BlendingMode.Mask, General.Settings.BackgroundAlpha));
dragThings.layers.Add(new PresentLayer(RendererLayer.Surface, BlendingMode.Mask));
dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1.0f, true));
dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 1f, false));
dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 1f));
dragThings.layers.Add(new PresentLayer(RendererLayer.Grid, BlendingMode.Mask));
dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 0.5f, true));
dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1f, true));
dragThings.layers.Add(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true));
dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 0.5f));
}
}
@ -147,7 +148,7 @@ namespace CodeImp.DoomBuilder.Rendering
}
// The different layers
public enum RendererLayer : int
public enum RendererLayer
{
Background,
Grid,
@ -158,7 +159,7 @@ namespace CodeImp.DoomBuilder.Rendering
}
// Blending modes
public enum BlendingMode : int
public enum BlendingMode
{
None,
Mask,

View file

@ -224,6 +224,7 @@
<Compile Include="ClassicModes\CeilingAlignMode.cs" />
<Compile Include="ClassicModes\DrawCurveMode.cs" />
<Compile Include="ClassicModes\DrawEllipseMode.cs" />
<Compile Include="ClassicModes\DrawGridMode.cs" />
<Compile Include="ClassicModes\DrawRectangleMode.cs" />
<Compile Include="ClassicModes\FlatAlignMode.cs" />
<Compile Include="ClassicModes\FloorAlignMode.cs" />
@ -275,6 +276,24 @@
<Compile Include="Interface\BridgeModeForm.Designer.cs">
<DependentUpon>BridgeModeForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\DrawEllipseOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\DrawEllipseOptionsPanel.Designer.cs">
<DependentUpon>DrawEllipseOptionsPanel.cs</DependentUpon>
</Compile>
<Compile Include="Interface\DrawGridOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\DrawGridOptionsPanel.Designer.cs">
<DependentUpon>DrawGridOptionsPanel.cs</DependentUpon>
</Compile>
<Compile Include="Interface\DrawRectangleOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\DrawRectangleOptionsPanel.Designer.cs">
<DependentUpon>DrawRectangleOptionsPanel.cs</DependentUpon>
</Compile>
<Compile Include="Interface\EditSelectionPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -397,6 +416,15 @@
<EmbeddedResource Include="Resources\FloorAlign.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Interface\DrawEllipseOptionsPanel.resx">
<DependentUpon>DrawEllipseOptionsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\DrawGridOptionsPanel.resx">
<DependentUpon>DrawGridOptionsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\DrawRectangleOptionsPanel.resx">
<DependentUpon>DrawRectangleOptionsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\SectorDrawingOptionsPanel.resx">
<DependentUpon>SectorDrawingOptionsPanel.cs</DependentUpon>
</EmbeddedResource>
@ -423,6 +451,15 @@
<ItemGroup>
<None Include="Resources\AnnotationsMode.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Lightbulb.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Reset.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\DrawGridMode.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

@ -9,7 +9,7 @@ using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Windows;
namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Draw Curve Mode",
SwitchAction = "drawcurvemode",

View file

@ -1,33 +1,68 @@
using System;
#region ================== Namespaces
using System;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
#endregion
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Draw Ellipse Mode",
SwitchAction = "drawellipsemode",
AllowCopyPaste = false,
Volatile = true,
Optional = false)]
public class DrawEllipseMode : DrawRectangleMode {
private static int storedSubdivisions;
public class DrawEllipseMode : DrawRectangleMode
{
#region ================== Variables
//interface
private Docker settingsdocker;
private DrawEllipseOptionsPanel panel;
#endregion
#region ================== Constructor
public DrawEllipseMode() : base() {
maxSubdivisions = 32;
minSubdivisions = 6;
undoName = "Ellipse draw";
shapeName = "ellipse";
if(storedSubdivisions == 0)
storedSubdivisions = minSubdivisions + 2;
subdivisions = storedSubdivisions;
}
public override void OnDisengage() {
base.OnDisengage();
storedSubdivisions = subdivisions;
#endregion
#region ================== Settings panel
override protected void setupInterface() {
maxSubdivisions = 512;
minSubdivisions = 6;
//Add options docker
panel = new DrawEllipseOptionsPanel();
panel.MaxSubdivisions = maxSubdivisions;
panel.MinSubdivisions = minSubdivisions;
panel.OnValueChanged += OptionsPanelOnValueChanged;
settingsdocker = new Docker("drawrectangle", "Draw Ellipse", panel);
}
override protected void addInterface() {
General.Interface.AddDocker(settingsdocker);
General.Interface.SelectDocker(settingsdocker);
bevelWidth = panel.Aquity;
subdivisions = panel.Subdivisions;
}
override protected void removeInterface() {
General.Interface.RemoveDocker(settingsdocker);
}
#endregion
#region ================== Methods
override protected Vector2D[] getShape(Vector2D pStart, Vector2D pEnd) {
//no shape
if (pEnd.x == pStart.x && pEnd.y == pStart.y)
@ -35,7 +70,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
//line
if(pEnd.x == pStart.x || pEnd.y == pStart.y)
return new Vector2D[] { pStart, pEnd };
return new[] { pStart, pEnd };
//got shape
int bevelSign = (bevelWidth > 0 ? 1 : -1);
@ -74,7 +109,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
}
//mxd. Setup hints for current editing mode
protected override void SetupHints() {
/*protected override void SetupHints() {
string selectKey = Actions.Action.GetShortcutKeyDesc("builder_classicselect");
string editKey = Actions.Action.GetShortcutKeyDesc("builder_classicedit");
string cancelKey = Actions.Action.GetShortcutKeyDesc("builder_cancelmode");
@ -89,12 +124,26 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
"Place second vertex to finish drawing",
"Press " + cancelKey + " or " + editKey + " to cancel"
};
}*/
#endregion
#region ================== Events
private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs) {
bevelWidth = panel.Aquity;
subdivisions = Math.Min(maxSubdivisions, panel.Subdivisions);
Update();
}
//ACTIONS
#endregion
#region ================== Actions
override protected void increaseSubdivLevel() {
if (subdivisions < maxSubdivisions) {
subdivisions += 2;
panel.Subdivisions = subdivisions;
Update();
}
}
@ -102,8 +151,27 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
override protected void decreaseSubdivLevel() {
if (subdivisions > minSubdivisions) {
subdivisions -= 2;
panel.Subdivisions = subdivisions;
Update();
}
}
protected override void increaseBevel() {
if(points.Count < 2 || currentBevelWidth == bevelWidth || bevelWidth < 0) {
bevelWidth += General.Map.Grid.GridSize;
panel.Aquity = bevelWidth;
Update();
}
}
protected override void decreaseBevel() {
if(currentBevelWidth == bevelWidth || bevelWidth > 0) {
bevelWidth -= General.Map.Grid.GridSize;
panel.Aquity = bevelWidth;
Update();
}
}
#endregion
}
}

View file

@ -107,7 +107,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Methods
// This checks if the view offset/zoom changed and updates the check
protected bool CheckViewChanged()
/*protected bool CheckViewChanged()
{
// View changed?
bool viewchanged = (renderer.OffsetX != lastoffsetx || renderer.OffsetY != lastoffsety || renderer.Scale != lastscale);
@ -119,7 +119,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Return result
return viewchanged;
}
}*/
// This updates the dragging
protected virtual void Update()

View file

@ -0,0 +1,379 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Actions;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Windows;
#endregion
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Draw Grid Mode",
SwitchAction = "drawgridmode",
AllowCopyPaste = false,
Volatile = true,
Optional = false)]
public class DrawGridMode : DrawGeometryMode
{
#region ================== Variables
private static int horizontalSlices = 3;
private static int verticalSlices = 3;
private bool triangulate = true;
private List<DrawnVertex[]> gridpoints;
private HintLabel hintLabel;
private int width;
private int height;
private Vector2D start;
private Vector2D end;
//interface
private Docker settingsdocker;
private DrawGridOptionsPanel panel;
#endregion
#region ================== Constructor
public DrawGridMode() {
snaptogrid = true;
//Options docker
panel = new DrawGridOptionsPanel();
panel.OnValueChanged += OptionsPanelOnValueChanged;
settingsdocker = new Docker("drawgrid", "Draw Grid Settings", panel);
}
#endregion
#region ================== Events
public override void OnEngage() {
base.OnEngage();
General.Interface.AddDocker(settingsdocker);
General.Interface.SelectDocker(settingsdocker);
panel.Triangulate = triangulate;
panel.HorizontalSlices = horizontalSlices - 1;
panel.VerticalSlices = verticalSlices - 1;
}
public override void OnDisengage() {
General.Interface.RemoveDocker(settingsdocker);
base.OnDisengage();
}
override public void OnAccept() {
Cursor.Current = Cursors.AppStarting;
General.Settings.FindDefaultDrawSettings();
// When we have a shape...
if(gridpoints.Count > 0) {
// Make undo for the draw
General.Map.UndoRedo.CreateUndo("Grid draw");
// Make an analysis and show info
string[] adjectives = new[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :)
string word = adjectives[new Random().Next(adjectives.Length - 1)];
string a = (word[0] == 'u' ? "an " : "a ");
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " grid.");
List<Sector> newsectors = new List<Sector>();
foreach (DrawnVertex[] shape in gridpoints) {
if(!Tools.DrawLines(shape, true, BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate)) {
// Drawing failed
// NOTE: I have to call this twice, because the first time only cancels this volatile mode
General.Map.UndoRedo.WithdrawUndo();
General.Map.UndoRedo.WithdrawUndo();
return;
}
// Update cached values after each step...
General.Map.Map.Update();
newsectors.AddRange(General.Map.Map.GetMarkedSectors(true));
}
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
// Clear selection
General.Map.Map.ClearAllSelected();
// Edit new sectors?
if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0))
General.Interface.ShowEditSectors(newsectors);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
// Map is changed
General.Map.IsChanged = true;
}
// Done
Cursor.Current = Cursors.Default;
// Return to original mode
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs) {
triangulate = panel.Triangulate;
horizontalSlices = panel.HorizontalSlices + 1;
verticalSlices = panel.VerticalSlices + 1;
Update();
}
#endregion
#region ================== Methods
override protected void Update() {
PixelColor stitchcolor = General.Colors.Highlight;
PixelColor losecolor = General.Colors.Selection;
snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge;
DrawnVertex curp = GetCurrentPosition();
float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale;
// Render drawing lines
if(renderer.StartOverlay(true)) {
PixelColor color = snaptonearest ? stitchcolor : losecolor;
if(points.Count == 1) {
updateReferencePoints(points[0], curp);
List<Vector2D[]> shapes = getShapes(start, end);
//render shape
foreach (Vector2D[] shape in shapes) {
for(int i = 1; i < shape.Length; i++)
renderer.RenderLine(shape[i - 1], shape[i], LINE_THICKNESS, color, true);
}
//vertices
foreach (Vector2D[] shape in shapes) {
for (int i = 0; i < shape.Length; i++)
renderer.RenderRectangleFilled(new RectangleF(shape[i].x - vsize, shape[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
}
//and labels
Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start };
for(int i = 1; i < 5; i++) {
labels[i - 1].Start = labelCoords[i - 1];
labels[i - 1].End = labelCoords[i];
renderer.RenderText(labels[i - 1].TextLabel);
}
//render hint
if (horizontalSlices > 1 || verticalSlices > 1) {
if(width > 64 * vsize && height > 16 * vsize) {
float vPos = start.y + height / 2.0f;
hintLabel.Start = new Vector2D(start.x, vPos);
hintLabel.End = new Vector2D(end.x, vPos);
hintLabel.Text = "H: " + (horizontalSlices - 1) + "; V: " + (verticalSlices - 1);
renderer.RenderText(hintLabel.TextLabel);
}
}
} else {
// Render vertex at cursor
renderer.RenderRectangleFilled(new RectangleF(curp.pos.x - vsize, curp.pos.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
}
// Done
renderer.Finish();
}
// Done
renderer.Present();
}
// This draws a point at a specific location
override public bool DrawPointAt(Vector2D pos, bool stitch, bool stitchline) {
if(pos.x < General.Map.Config.LeftBoundary || pos.x > General.Map.Config.RightBoundary ||
pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary)
return false;
DrawnVertex newpoint = new DrawnVertex();
newpoint.pos = pos;
newpoint.stitch = true;
newpoint.stitchline = stitchline;
points.Add(newpoint);
if(points.Count == 1) { //add point and labels
labels.AddRange(new[] { new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false), new LineLengthLabel(false) });
hintLabel = new HintLabel();
Update();
} else if(points[0].pos == points[1].pos) { //nothing is drawn
points = new List<DrawnVertex>();
FinishDraw();
} else {
//create vertices for final shape.
updateReferencePoints(points[0], newpoint);
gridpoints = new List<DrawnVertex[]>();
List<Vector2D[]> shapes = getShapes(start, end);
foreach (Vector2D[] shape in shapes) {
DrawnVertex[] verts = new DrawnVertex[shape.Length];
for(int i = 0; i < shape.Length; i++) {
newpoint = new DrawnVertex();
newpoint.pos = shape[i];
newpoint.stitch = true;
newpoint.stitchline = stitchline;
verts[i] = newpoint;
}
gridpoints.Add(verts);
}
FinishDraw();
}
return true;
}
protected List<Vector2D[]> getShapes(Vector2D s, Vector2D e) {
//no shape
if(s == e) return new List<Vector2D[]>();
//line
if (e.x == s.x || e.y == s.y) return new List<Vector2D[]>{ new[] {s, e} };
//rectangles
float rectWidth = Math.Max(1, (horizontalSlices > 0 ? (float)width / horizontalSlices : width));
float rectHeight = Math.Max(1, (verticalSlices > 0 ? (float)height / verticalSlices : height));
//create shape
List<Vector2D> rect = new List<Vector2D> { s, new Vector2D((int)e.x, (int)s.y), e, new Vector2D((int)s.x, (int)e.y), s };
if(horizontalSlices == 1 && verticalSlices == 1) {
if(triangulate) rect.AddRange(new[] { s, e });
return new List<Vector2D[]>{ rect.ToArray() };
}
//create blocks
List<Vector2D[]> shapes = new List<Vector2D[]>() { rect.ToArray() };
RectangleF[,] blocks = new RectangleF[horizontalSlices, verticalSlices];
for(int w = 0; w < horizontalSlices; w++) {
for(int h = 0; h < verticalSlices; h++) {
blocks[w, h] = RectangleF.FromLTRB((int)Math.Round(s.x + rectWidth * w), (int)Math.Round(s.y + rectHeight * h), (int)Math.Round(s.x + rectWidth * (w + 1)), (int)Math.Round(s.y + rectHeight * (h + 1)));
}
}
//add subdivisions
if (horizontalSlices > 1) {
for (int w = 1; w < horizontalSlices; w++) {
int px = (int) Math.Round(blocks[w, 0].X);
shapes.Add(new[] {new Vector2D(px, s.y), new Vector2D(px, e.y)});
}
}
if (verticalSlices > 1) {
for (int h = 1; h < verticalSlices; h++) {
int py = (int) Math.Round(blocks[0, h].Y);
shapes.Add(new[] { new Vector2D(s.x, py), new Vector2D(e.x, py) });
}
}
//triangulate?
if (triangulate) {
bool startflip = false;
bool flip = false;
for (int w = 0; w < horizontalSlices; w++) {
for (int h = 0; h < verticalSlices; h++) {
if (flip) {
shapes.Add(new[] { new Vector2D(blocks[w, h].X, blocks[w, h].Y), new Vector2D(blocks[w, h].Right, blocks[w, h].Bottom) });
} else {
shapes.Add(new[] { new Vector2D(blocks[w, h].Right, blocks[w, h].Y), new Vector2D(blocks[w, h].X, blocks[w, h].Bottom) });
}
flip = !flip;
}
startflip = !startflip;
flip = startflip;
}
}
return shapes;
}
//update top-left and bottom-right points, which define drawing shape
private void updateReferencePoints(DrawnVertex p1, DrawnVertex p2) {
if(p1.pos.x < p2.pos.x) {
start.x = p1.pos.x;
end.x = p2.pos.x;
} else {
start.x = p2.pos.x;
end.x = p1.pos.x;
}
if(p1.pos.y < p2.pos.y) {
start.y = p1.pos.y;
end.y = p2.pos.y;
} else {
start.y = p2.pos.y;
end.y = p1.pos.y;
}
width = (int)(end.x - start.x);
height = (int)(end.y - start.y);
}
#endregion
#region ================== Actions
[BeginAction("increasebevel")]
protected void increaseBevel() {
if(points.Count < 2 || horizontalSlices < width - 2) {
horizontalSlices++;
panel.HorizontalSlices = horizontalSlices - 1;
Update();
}
}
[BeginAction("decreasebevel")]
protected void decreaseBevel() {
if(horizontalSlices > 1) {
horizontalSlices--;
panel.HorizontalSlices = horizontalSlices - 1;
Update();
}
}
[BeginAction("increasesubdivlevel")]
protected void increaseSubdivLevel() {
if(points.Count < 2 || verticalSlices < height - 2) {
verticalSlices++;
panel.VerticalSlices = verticalSlices - 1;
Update();
}
}
[BeginAction("decreasesubdivlevel")]
protected void decreaseSubdivLevel() {
if(verticalSlices > 1) {
verticalSlices--;
panel.VerticalSlices = verticalSlices - 1;
Update();
}
}
#endregion
}
}

View file

@ -1,7 +1,10 @@
using System;
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
@ -9,7 +12,9 @@ using CodeImp.DoomBuilder.Actions;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Map;
namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
#endregion
namespace CodeImp.DoomBuilder.BuilderModes
{
[EditMode(DisplayName = "Draw Rectangle Mode",
SwitchAction = "drawrectanglemode",
@ -19,13 +24,15 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
public class DrawRectangleMode : DrawGeometryMode
{
private HintLabel hintLabel;
#region ================== Variables
protected HintLabel hintLabel;
protected int bevelWidth;
protected int currentBevelWidth;
protected int subdivisions;
protected int maxSubdivisions = 16;
protected int minSubdivisions = 0;
protected int maxSubdivisions;
protected int minSubdivisions;
protected string undoName = "Rectangle draw";
protected string shapeName = "rectangle";
@ -35,11 +42,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
protected int width;
protected int height;
protected PixelColor cornersColor;
//interface
private Docker settingsdocker;
private DrawRectangleOptionsPanel panel;
#endregion
#region ================== Constructor/Disposer
public DrawRectangleMode() {
snaptogrid = true;
cornersColor = General.Colors.BrightColors[new Random().Next(General.Colors.BrightColors.Length - 1)];
setupInterface();
}
public override void Dispose() {
@ -48,7 +61,36 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
base.Dispose();
}
#endregion
#region ================== Settings panel
protected virtual void setupInterface() {
maxSubdivisions = 16;
//Add options docker
panel = new DrawRectangleOptionsPanel();
panel.MaxSubdivisions = maxSubdivisions;
panel.OnValueChanged += OptionsPanelOnValueChanged;
settingsdocker = new Docker("drawrectangle", "Draw Rectangle", panel);
}
protected virtual void addInterface() {
General.Interface.AddDocker(settingsdocker);
General.Interface.SelectDocker(settingsdocker);
bevelWidth = panel.BevelWidth;
subdivisions = panel.Subdivisions;
}
protected virtual void removeInterface() {
General.Interface.RemoveDocker(settingsdocker);
}
#endregion
#region ================== Methods
override protected void Update() {
PixelColor stitchcolor = General.Colors.Highlight;
PixelColor losecolor = General.Colors.Selection;
@ -95,7 +137,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
//and shape corners
for (int i = 0; i < 4; i++)
renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), cornersColor, true);
renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
}
} else {
// Render vertex at cursor
@ -112,7 +154,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
protected virtual Vector2D[] getShape(Vector2D pStart, Vector2D pEnd) {
//no shape
if (pEnd.x == pStart.x && pEnd.y == pStart.y) {
if (pStart == pEnd) {
currentBevelWidth = 0;
return new Vector2D[0];
}
@ -138,26 +180,24 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
reverse = true;
}
List<Vector2D> l_points = new List<Vector2D>();
List<Vector2D> shape = new List<Vector2D>();
//top-left corner
l_points.AddRange(getCornerPoints(pStart, currentBevelWidth, currentBevelWidth, !reverse));
shape.AddRange(getCornerPoints(pStart, currentBevelWidth, currentBevelWidth, !reverse));
//top-right corner
l_points.AddRange(getCornerPoints(new Vector2D(pEnd.x, pStart.y), -currentBevelWidth, currentBevelWidth, reverse));
shape.AddRange(getCornerPoints(new Vector2D(pEnd.x, pStart.y), -currentBevelWidth, currentBevelWidth, reverse));
//bottom-right corner
l_points.AddRange(getCornerPoints(pEnd, -currentBevelWidth, -currentBevelWidth, !reverse));
shape.AddRange(getCornerPoints(pEnd, -currentBevelWidth, -currentBevelWidth, !reverse));
//bottom-left corner
l_points.AddRange(getCornerPoints(new Vector2D(pStart.x, pEnd.y), currentBevelWidth, -currentBevelWidth, reverse));
shape.AddRange(getCornerPoints(new Vector2D(pStart.x, pEnd.y), currentBevelWidth, -currentBevelWidth, reverse));
//closing point
l_points.Add(l_points[0]);
shape.Add(shape[0]);
Vector2D[] points = new Vector2D[l_points.Count];
l_points.CopyTo(points);
return points;
return shape.ToArray();
}
private Vector2D[] getCornerPoints(Vector2D startPoint, int bevel_width, int bevel_height, bool reverse) {
@ -183,17 +223,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
}
//mxd. Setup hints for current editing mode
protected override void SetupHints() {
/*protected override void SetupHints() {
hints = new[]{"Press <b>" + Actions.Action.GetShortcutKeyDesc("builder_classicselect") + "</b> to place a vertex",
"Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + "</b> to change corners bevel by current grid size",
"Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + "</b> to change bevel detail level",
"Place second vertex to finish drawing",
"Press <b>" + Actions.Action.GetShortcutKeyDesc("builder_cancelmode") + "</b> or <b>" + Actions.Action.GetShortcutKeyDesc("builder_classicedit") + "</b> to cancel"
};
}
}*/
//update top-left and bottom-right points, which define drawing shape
private void updateReferencePoints(DrawnVertex p1, DrawnVertex p2) {
protected void updateReferencePoints(DrawnVertex p1, DrawnVertex p2) {
if (p1.pos.x < p2.pos.x) {
start.x = p1.pos.x;
end.x = p2.pos.x;
@ -253,7 +293,20 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
Update();
}
//EVENTS
#endregion
#region ================== Events
public override void OnEngage() {
base.OnEngage();
addInterface();
}
public override void OnDisengage() {
removeInterface();
base.OnDisengage();
}
override public void OnAccept() {
Cursor.Current = Cursors.AppStarting;
General.Settings.FindDefaultDrawSettings();
@ -307,11 +360,21 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
}
//ACTIONS
private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs) {
bevelWidth = panel.BevelWidth;
subdivisions = panel.Subdivisions;
Update();
}
#endregion
#region ================== Actions
[BeginAction("increasesubdivlevel")]
protected virtual void increaseSubdivLevel() {
if (subdivisions < maxSubdivisions) {
subdivisions++;
panel.Subdivisions = subdivisions;
Update();
}
}
@ -320,14 +383,16 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
protected virtual void decreaseSubdivLevel() {
if (subdivisions > minSubdivisions) {
subdivisions--;
panel.Subdivisions = subdivisions;
Update();
}
}
[BeginAction("increasebevel")]
protected virtual void increaseBevel() {
if (currentBevelWidth == bevelWidth || bevelWidth < 0) {
if (points.Count < 2 || currentBevelWidth == bevelWidth || bevelWidth < 0) {
bevelWidth += General.Map.Grid.GridSize;
panel.BevelWidth = bevelWidth;
Update();
}
}
@ -336,8 +401,12 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
protected virtual void decreaseBevel() {
if (currentBevelWidth == bevelWidth || bevelWidth > 0) {
bevelWidth -= General.Map.Grid.GridSize;
panel.BevelWidth = bevelWidth;
Update();
}
}
#endregion
}
}

View file

@ -529,7 +529,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
string selectKey = Actions.Action.GetShortcutKeyDesc("builder_classicselect");
hints = new[]{ "Hold <b>" + Actions.Action.GetShortcutKeyDesc("builder_pan_view") + "</b> to pan the view",
"Press <b>" + selectKey + "</b> to select a sector. Hold <b>Alt<b> to (de)select things inside of a sector",
"Press <b>" + selectKey + "</b> to select a sector. Hold <b>Alt</b> to (de)select things inside of a sector",
"Hold <b>" + selectKey + "</b> and drag to use rectangular selection",
"Press <b>" + Actions.Action.GetShortcutKeyDesc("builder_clearselection") + "</b> to clear selection",
"Press <b>" + Actions.Action.GetShortcutKeyDesc("builder_deleteitem") + "</b> to delete selected sector(s)",
@ -551,7 +551,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
multiselectionHints = new[] { "Hold <b>Shift</b> to " + (BuilderPlug.Me.AdditiveSelect ? "disable" : "enable") + " additive selection",
"Hold <b>Ctrl</b> to enable subtractive selection",
"Hold <b>Ctrl-Shift</b> to intersect the new selection with already existing one",
"Hold <b>Alt<b> to select things inside of selected sectors"
"Hold <b>Alt</b> to select things inside of selected sectors"
};
}

View file

@ -17,7 +17,6 @@
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Forms;
@ -86,6 +85,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private ToolStripMenuItem drawRectModeMenuItem;
private ToolStripMenuItem drawEllipseModeMenuItem;
private ToolStripMenuItem drawCurveModeMenuItem;
private ToolStripMenuItem drawGridModeMenuItem;
// Settings
private int showvisualthings; // 0 = none, 1 = sprite only, 2 = sprite caged
@ -236,7 +236,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
snapModeMenuItem = new ToolStripMenuItem("Snap selected map elements to grid");
snapModeMenuItem.Tag = "snapvertstogrid";
snapModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
snapModeMenuItem.Image = CodeImp.DoomBuilder.BuilderModes.Properties.Resources.SnapVerts;
snapModeMenuItem.Image = Properties.Resources.SnapVerts;
snapModeMenuItem.Enabled = false;
General.Interface.AddMenu(snapModeMenuItem, MenuSection.EditGeometry);
@ -245,15 +245,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawEllipseModeMenuItem = new ToolStripMenuItem("Draw Ellipse");
drawEllipseModeMenuItem.Tag = "drawellipsemode";
drawEllipseModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
drawEllipseModeMenuItem.Image = CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawEllipseMode;
drawEllipseModeMenuItem.Image = Properties.Resources.DrawEllipseMode;
drawEllipseModeMenuItem.Enabled = false;
General.Interface.AddMenu(drawEllipseModeMenuItem, MenuSection.ModeDrawModes);
//draw grid
drawGridModeMenuItem = new ToolStripMenuItem("Draw Grid");
drawGridModeMenuItem.Tag = "drawgridmode";
drawGridModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
drawGridModeMenuItem.Image = Properties.Resources.DrawGridMode;
drawGridModeMenuItem.Enabled = false;
General.Interface.AddMenu(drawGridModeMenuItem, MenuSection.ModeDrawModes);
//draw rectangle
drawRectModeMenuItem = new ToolStripMenuItem("Draw Rectangle");
drawRectModeMenuItem.Tag = "drawrectanglemode";
drawRectModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
drawRectModeMenuItem.Image = CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawRectMode;
drawRectModeMenuItem.Image = Properties.Resources.DrawRectMode;
drawRectModeMenuItem.Enabled = false;
General.Interface.AddMenu(drawRectModeMenuItem, MenuSection.ModeDrawModes);
@ -261,7 +269,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawCurveModeMenuItem = new ToolStripMenuItem("Draw Curve");
drawCurveModeMenuItem.Tag = "drawcurvemode";
drawCurveModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
drawCurveModeMenuItem.Image = CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawCurveMode;
drawCurveModeMenuItem.Image = Properties.Resources.DrawCurveMode;
drawCurveModeMenuItem.Enabled = false;
General.Interface.AddMenu(drawCurveModeMenuItem, MenuSection.ModeDrawModes);
@ -269,7 +277,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawLinesModeMenuItem = new ToolStripMenuItem("Draw Lines");
drawLinesModeMenuItem.Tag = "drawlinesmode";
drawLinesModeMenuItem.Click += new EventHandler(InvokeTaggedAction);
drawLinesModeMenuItem.Image = CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawLinesMode;
drawLinesModeMenuItem.Image = Properties.Resources.DrawLinesMode;
drawLinesModeMenuItem.Enabled = false;
General.Interface.AddMenu(drawLinesModeMenuItem, MenuSection.ModeDrawModes);
@ -294,6 +302,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveMenu(drawCurveModeMenuItem);
General.Interface.RemoveMenu(drawRectModeMenuItem);
General.Interface.RemoveMenu(drawEllipseModeMenuItem);
General.Interface.RemoveMenu(drawGridModeMenuItem);
undoredopanel.Dispose();
menusform.Unregister();
@ -472,6 +481,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawCurveModeMenuItem.Enabled = true;
drawRectModeMenuItem.Enabled = true;
drawEllipseModeMenuItem.Enabled = true;
drawGridModeMenuItem.Enabled = true;
}
// Map opened
@ -492,6 +502,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawCurveModeMenuItem.Enabled = true;
drawRectModeMenuItem.Enabled = true;
drawEllipseModeMenuItem.Enabled = true;
drawGridModeMenuItem.Enabled = true;
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
}
@ -512,6 +523,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawCurveModeMenuItem.Enabled = false;
drawRectModeMenuItem.Enabled = false;
drawEllipseModeMenuItem.Enabled = false;
drawGridModeMenuItem.Enabled = false;
//mxd. Save settings
saveSettings();

View file

@ -6,9 +6,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
public class HintLabel : LineLengthLabel
{
private const int TEXT_CAPACITY = 32;
private const float TEXT_SCALE = 10f;
private string text = "";
public string Text {
get {
@ -21,12 +18,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
public HintLabel() : base(false) {
label.Color = General.Colors.BrightColors[new Random().Next(General.Colors.BrightColors.Length - 1)];
label.Color = General.Colors.InfoLine;
}
protected override void Update() {
Vector2D delta = end - start;
float length = delta.GetLength();
label.Text = text;
label.Rectangle = new RectangleF(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f, 0f, 0f);
}

View file

@ -0,0 +1,180 @@
namespace CodeImp.DoomBuilder.BuilderModes
{
partial class DrawEllipseOptionsPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.hints = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.subdivs = new System.Windows.Forms.NumericUpDown();
this.spikiness = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.reset = new System.Windows.Forms.Button();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.subdivs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spikiness)).BeginInit();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.hints);
this.groupBox2.Location = new System.Drawing.Point(3, 89);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(243, 150);
this.groupBox2.TabIndex = 6;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Quick Help:";
//
// hints
//
this.hints.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.hints.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.hints.Location = new System.Drawing.Point(9, 19);
this.hints.Name = "hints";
this.hints.ReadOnly = true;
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.hints.ShortcutsEnabled = false;
this.hints.Size = new System.Drawing.Size(228, 125);
this.hints.TabIndex = 0;
this.hints.Text = "";
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.reset);
this.groupBox1.Controls.Add(this.subdivs);
this.groupBox1.Controls.Add(this.spikiness);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 80);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Draw Options:";
//
// subdivs
//
this.subdivs.Location = new System.Drawing.Point(78, 23);
this.subdivs.Maximum = new decimal(new int[] {
512,
0,
0,
0});
this.subdivs.Minimum = new decimal(new int[] {
6,
0,
0,
0});
this.subdivs.Name = "subdivs";
this.subdivs.Size = new System.Drawing.Size(72, 20);
this.subdivs.TabIndex = 4;
this.subdivs.Value = new decimal(new int[] {
8,
0,
0,
0});
//
// spikiness
//
this.spikiness.Location = new System.Drawing.Point(78, 49);
this.spikiness.Maximum = new decimal(new int[] {
32767,
0,
0,
0});
this.spikiness.Minimum = new decimal(new int[] {
32768,
0,
0,
-2147483648});
this.spikiness.Name = "spikiness";
this.spikiness.Size = new System.Drawing.Size(72, 20);
this.spikiness.TabIndex = 3;
//
// label2
//
this.label2.Location = new System.Drawing.Point(7, 26);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 14);
this.label2.TabIndex = 2;
this.label2.Text = "Sides:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Location = new System.Drawing.Point(7, 52);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Spikiness:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// reset
//
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
this.reset.Location = new System.Drawing.Point(156, 21);
this.reset.Name = "reset";
this.reset.Size = new System.Drawing.Size(26, 49);
this.reset.TabIndex = 6;
this.reset.UseVisualStyleBackColor = true;
this.reset.Click += new System.EventHandler(this.reset_Click);
//
// DrawEllipseOptionsPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.Name = "DrawEllipseOptionsPanel";
this.Size = new System.Drawing.Size(249, 243);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.subdivs)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spikiness)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RichTextBox hints;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.NumericUpDown subdivs;
private System.Windows.Forms.NumericUpDown spikiness;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button reset;
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Actions;
namespace CodeImp.DoomBuilder.BuilderModes
{
public partial class DrawEllipseOptionsPanel : UserControl
{
public event EventHandler OnValueChanged;
private bool blockEvents;
private static int aquityValue;
private static int subdivsValue = 8;
public int Aquity { get { return (int)spikiness.Value; } set { blockEvents = true; spikiness.Value = value; blockEvents = false; } }
public int Subdivisions { get { return (int)subdivs.Value; } set { blockEvents = true; subdivs.Value = value; blockEvents = false; } }
public int MaxSubdivisions { set { subdivs.Maximum = value; } }
public int MinSubdivisions { set { subdivs.Minimum = value; } }
public DrawEllipseOptionsPanel() {
InitializeComponent();
spikiness.Value = aquityValue;
subdivs.Value = subdivsValue;
spikiness.ValueChanged += ValueChanged;
subdivs.ValueChanged += ValueChanged;
//set hints
string help = "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + "</b> to change ellipse spikiness<br>"
+ "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + "</b> to change the number of points in ellipse";
hints.SelectedRtf = HintsManager.GetRtfString(help);
}
private void ValueChanged(object sender, EventArgs e) {
aquityValue = (int)spikiness.Value;
subdivsValue = (int)subdivs.Value;
if(blockEvents) return;
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
}
private void reset_Click(object sender, EventArgs e) {
spikiness.Value = 0;
subdivs.Value = subdivs.Minimum;
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,169 @@
namespace CodeImp.DoomBuilder.BuilderModes
{
partial class DrawGridOptionsPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.slicesV = new System.Windows.Forms.NumericUpDown();
this.slicesH = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.triangulate = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.hints = new System.Windows.Forms.RichTextBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slicesV)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.slicesH)).BeginInit();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.slicesV);
this.groupBox1.Controls.Add(this.slicesH);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.triangulate);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 106);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Draw Options:";
//
// slicesV
//
this.slicesV.Location = new System.Drawing.Point(102, 50);
this.slicesV.Maximum = new decimal(new int[] {
128,
0,
0,
0});
this.slicesV.Name = "slicesV";
this.slicesV.Size = new System.Drawing.Size(72, 20);
this.slicesV.TabIndex = 4;
this.slicesV.ValueChanged += new System.EventHandler(this.ValueChanged);
//
// slicesH
//
this.slicesH.Location = new System.Drawing.Point(102, 23);
this.slicesH.Maximum = new decimal(new int[] {
128,
0,
0,
0});
this.slicesH.Name = "slicesH";
this.slicesH.Size = new System.Drawing.Size(72, 20);
this.slicesH.TabIndex = 3;
this.slicesH.ValueChanged += new System.EventHandler(this.ValueChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(6, 52);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(90, 14);
this.label2.TabIndex = 2;
this.label2.Text = "Vertical Slices:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Location = new System.Drawing.Point(6, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(90, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Horizontal Slices:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// triangulate
//
this.triangulate.AutoSize = true;
this.triangulate.Location = new System.Drawing.Point(9, 78);
this.triangulate.Name = "triangulate";
this.triangulate.Size = new System.Drawing.Size(79, 18);
this.triangulate.TabIndex = 0;
this.triangulate.Text = "Triangulate";
this.triangulate.UseVisualStyleBackColor = true;
this.triangulate.CheckedChanged += new System.EventHandler(this.ValueChanged);
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.hints);
this.groupBox2.Location = new System.Drawing.Point(3, 115);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(243, 115);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Quick Help:";
//
// hints
//
this.hints.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.hints.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.hints.Location = new System.Drawing.Point(9, 19);
this.hints.Name = "hints";
this.hints.ReadOnly = true;
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.hints.ShortcutsEnabled = false;
this.hints.Size = new System.Drawing.Size(228, 90);
this.hints.TabIndex = 0;
this.hints.Text = "";
//
// DrawGridOptionsPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.Name = "DrawGridOptionsPanel";
this.Size = new System.Drawing.Size(249, 240);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.slicesV)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.slicesH)).EndInit();
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox triangulate;
private System.Windows.Forms.NumericUpDown slicesV;
private System.Windows.Forms.NumericUpDown slicesH;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RichTextBox hints;
}
}

View file

@ -0,0 +1,31 @@
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Actions;
namespace CodeImp.DoomBuilder.BuilderModes
{
public partial class DrawGridOptionsPanel : UserControl
{
public event EventHandler OnValueChanged;
private bool blockEvents;
public bool Triangulate { get { return triangulate.Checked; } set { blockEvents = true; triangulate.Checked = value; blockEvents = false; } }
public int HorizontalSlices { get { return (int)slicesH.Value; } set { blockEvents = true; slicesH.Value = value; blockEvents = false; } }
public int VerticalSlices { get { return (int)slicesV.Value; } set { blockEvents = true; slicesV.Value = value; blockEvents = false; } }
public DrawGridOptionsPanel() {
InitializeComponent();
//set hints
string help = "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + "</b> to change the number of horizontal slices<br>"
+ "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + "</b> to change the number of vertical slices";
hints.SelectedRtf = HintsManager.GetRtfString(help);
}
private void ValueChanged(object sender, EventArgs e) {
if(blockEvents) return;
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,170 @@
namespace CodeImp.DoomBuilder.BuilderModes
{
partial class DrawRectangleOptionsPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.hints = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.subdivs = new System.Windows.Forms.NumericUpDown();
this.radius = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.reset = new System.Windows.Forms.Button();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.subdivs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radius)).BeginInit();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.hints);
this.groupBox2.Location = new System.Drawing.Point(3, 89);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(243, 115);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Quick Help:";
//
// hints
//
this.hints.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.hints.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.hints.Location = new System.Drawing.Point(9, 19);
this.hints.Name = "hints";
this.hints.ReadOnly = true;
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.hints.ShortcutsEnabled = false;
this.hints.Size = new System.Drawing.Size(228, 90);
this.hints.TabIndex = 0;
this.hints.Text = "";
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.reset);
this.groupBox1.Controls.Add(this.subdivs);
this.groupBox1.Controls.Add(this.radius);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 80);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Draw Options:";
//
// subdivs
//
this.subdivs.Location = new System.Drawing.Point(92, 50);
this.subdivs.Maximum = new decimal(new int[] {
128,
0,
0,
0});
this.subdivs.Name = "subdivs";
this.subdivs.Size = new System.Drawing.Size(72, 20);
this.subdivs.TabIndex = 4;
//
// radius
//
this.radius.Location = new System.Drawing.Point(92, 23);
this.radius.Maximum = new decimal(new int[] {
32767,
0,
0,
0});
this.radius.Minimum = new decimal(new int[] {
32768,
0,
0,
-2147483648});
this.radius.Name = "radius";
this.radius.Size = new System.Drawing.Size(72, 20);
this.radius.TabIndex = 3;
//
// label2
//
this.label2.Location = new System.Drawing.Point(6, 52);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 14);
this.label2.TabIndex = 2;
this.label2.Text = "Bevel Detail:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Location = new System.Drawing.Point(6, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Bevel Radius:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// reset
//
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
this.reset.Location = new System.Drawing.Point(170, 22);
this.reset.Name = "reset";
this.reset.Size = new System.Drawing.Size(26, 49);
this.reset.TabIndex = 5;
this.reset.UseVisualStyleBackColor = true;
this.reset.Click += new System.EventHandler(this.reset_Click);
//
// DrawRectangleOptionsPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.Name = "DrawRectangleOptionsPanel";
this.Size = new System.Drawing.Size(249, 240);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.subdivs)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radius)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RichTextBox hints;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.NumericUpDown subdivs;
private System.Windows.Forms.NumericUpDown radius;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button reset;
}
}

View file

@ -0,0 +1,47 @@
using System;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Actions;
namespace CodeImp.DoomBuilder.BuilderModes
{
public partial class DrawRectangleOptionsPanel : UserControl
{
public event EventHandler OnValueChanged;
private bool blockEvents;
private static int radiusValue;
private static int subdivsValue;
public int BevelWidth { get { return (int)radius.Value; } set { blockEvents = true; radius.Value = value; blockEvents = false; } }
public int Subdivisions { get { return (int)subdivs.Value; } set { blockEvents = true; subdivs.Value = value; blockEvents = false; } }
public int MaxSubdivisions { set { subdivs.Maximum = value; } }
public DrawRectangleOptionsPanel() {
InitializeComponent();
radius.Value = radiusValue;
subdivs.Value = subdivsValue;
radius.ValueChanged += ValueChanged;
subdivs.ValueChanged += ValueChanged;
//set hints
string help = "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + "</b> to change corners bevel by current grid size<br>"
+ "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + "</b> to change bevel detail level";
hints.SelectedRtf = HintsManager.GetRtfString(help);
}
private void ValueChanged(object sender, EventArgs e) {
radiusValue = (int)radius.Value;
subdivsValue = (int)subdivs.Value;
if(blockEvents) return;
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
}
private void reset_Click(object sender, EventArgs e) {
radius.Value = 0;
subdivs.Value = 0;
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -61,23 +61,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.absrot = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.orgCenterY = new System.Windows.Forms.Button();
this.orgCenterX = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.relCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.relCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.absCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.absCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label22 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
@ -96,7 +82,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox1.Controls.Add(this.absposx);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(3, 130);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 117);
this.groupBox1.TabIndex = 0;
@ -167,6 +153,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relposy.AllowNegative = true;
this.relposy.AllowRelative = true;
this.relposy.ButtonStep = 1;
this.relposy.ButtonStepFloat = 1F;
this.relposy.Location = new System.Drawing.Point(136, 83);
this.relposy.Name = "relposy";
this.relposy.Size = new System.Drawing.Size(72, 24);
@ -183,6 +170,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relposx.AllowNegative = true;
this.relposx.AllowRelative = true;
this.relposx.ButtonStep = 1;
this.relposx.ButtonStepFloat = 1F;
this.relposx.Location = new System.Drawing.Point(58, 83);
this.relposx.Name = "relposx";
this.relposx.Size = new System.Drawing.Size(72, 24);
@ -199,6 +187,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absposy.AllowNegative = true;
this.absposy.AllowRelative = true;
this.absposy.ButtonStep = 1;
this.absposy.ButtonStepFloat = 1F;
this.absposy.Location = new System.Drawing.Point(136, 53);
this.absposy.Name = "absposy";
this.absposy.Size = new System.Drawing.Size(72, 24);
@ -215,6 +204,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absposx.AllowNegative = true;
this.absposx.AllowRelative = true;
this.absposx.ButtonStep = 1;
this.absposx.ButtonStepFloat = 1F;
this.absposx.Location = new System.Drawing.Point(58, 53);
this.absposx.Name = "absposx";
this.absposx.Size = new System.Drawing.Size(72, 24);
@ -259,7 +249,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox2.Controls.Add(this.abssizey);
this.groupBox2.Controls.Add(this.abssizex);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Location = new System.Drawing.Point(3, 253);
this.groupBox2.Location = new System.Drawing.Point(3, 126);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(243, 117);
this.groupBox2.TabIndex = 1;
@ -330,6 +320,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relsizey.AllowNegative = true;
this.relsizey.AllowRelative = true;
this.relsizey.ButtonStep = 1;
this.relsizey.ButtonStepFloat = 1F;
this.relsizey.Location = new System.Drawing.Point(136, 83);
this.relsizey.Name = "relsizey";
this.relsizey.Size = new System.Drawing.Size(72, 24);
@ -346,6 +337,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relsizex.AllowNegative = true;
this.relsizex.AllowRelative = true;
this.relsizex.ButtonStep = 1;
this.relsizex.ButtonStepFloat = 1F;
this.relsizex.Location = new System.Drawing.Point(58, 83);
this.relsizex.Name = "relsizex";
this.relsizex.Size = new System.Drawing.Size(72, 24);
@ -371,6 +363,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.abssizey.AllowNegative = true;
this.abssizey.AllowRelative = true;
this.abssizey.ButtonStep = 1;
this.abssizey.ButtonStepFloat = 1F;
this.abssizey.Location = new System.Drawing.Point(136, 53);
this.abssizey.Name = "abssizey";
this.abssizey.Size = new System.Drawing.Size(72, 24);
@ -387,6 +380,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.abssizex.AllowNegative = true;
this.abssizex.AllowRelative = true;
this.abssizex.ButtonStep = 1;
this.abssizex.ButtonStepFloat = 1F;
this.abssizex.Location = new System.Drawing.Point(58, 53);
this.abssizex.Name = "abssizex";
this.abssizex.Size = new System.Drawing.Size(72, 24);
@ -416,7 +410,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Controls.Add(this.absrot);
this.groupBox3.Location = new System.Drawing.Point(3, 376);
this.groupBox3.Location = new System.Drawing.Point(3, 249);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(243, 91);
this.groupBox3.TabIndex = 2;
@ -478,6 +472,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absrot.AllowNegative = true;
this.absrot.AllowRelative = true;
this.absrot.ButtonStep = 1;
this.absrot.ButtonStepFloat = 1F;
this.absrot.Location = new System.Drawing.Point(58, 23);
this.absrot.Name = "absrot";
this.absrot.Size = new System.Drawing.Size(82, 24);
@ -488,156 +483,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absrot.WhenButtonsClicked += new System.EventHandler(this.absrot_Validated);
this.absrot.WhenTextChanged += new System.EventHandler(this.WhenTextChanged);
//
// groupBox5
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.orgCenterY);
this.groupBox5.Controls.Add(this.orgCenterX);
this.groupBox5.Controls.Add(this.label10);
this.groupBox5.Controls.Add(this.label18);
this.groupBox5.Controls.Add(this.label20);
this.groupBox5.Controls.Add(this.label21);
this.groupBox5.Controls.Add(this.relCenterY);
this.groupBox5.Controls.Add(this.relCenterX);
this.groupBox5.Controls.Add(this.absCenterY);
this.groupBox5.Controls.Add(this.absCenterX);
this.groupBox5.Controls.Add(this.label22);
this.groupBox5.Controls.Add(this.label23);
this.groupBox5.Location = new System.Drawing.Point(3, 7);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(243, 117);
this.groupBox5.TabIndex = 30;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Center:";
//
// orgCenterY
//
this.orgCenterY.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgCenterY.Location = new System.Drawing.Point(136, 23);
this.orgCenterY.Name = "orgCenterY";
this.orgCenterY.Size = new System.Drawing.Size(72, 24);
this.orgCenterY.TabIndex = 29;
this.orgCenterY.Text = "-2000";
this.orgCenterY.UseVisualStyleBackColor = true;
//
// orgCenterX
//
this.orgCenterX.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgCenterX.Location = new System.Drawing.Point(58, 23);
this.orgCenterX.Name = "orgCenterX";
this.orgCenterX.Size = new System.Drawing.Size(72, 24);
this.orgCenterX.TabIndex = 28;
this.orgCenterX.Text = "-2000";
this.orgCenterX.UseVisualStyleBackColor = true;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(214, 28);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(21, 14);
this.label10.TabIndex = 26;
this.label10.Text = "mp";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(9, 28);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(46, 14);
this.label18.TabIndex = 23;
this.label18.Text = "Original:";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(214, 88);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(21, 14);
this.label20.TabIndex = 13;
this.label20.Text = "mp";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(214, 58);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(21, 14);
this.label21.TabIndex = 12;
this.label21.Text = "mp";
//
// relCenterY
//
this.relCenterY.AllowDecimal = true;
this.relCenterY.AllowNegative = true;
this.relCenterY.AllowRelative = true;
this.relCenterY.ButtonStep = 1;
this.relCenterY.Location = new System.Drawing.Point(136, 83);
this.relCenterY.Name = "relCenterY";
this.relCenterY.Size = new System.Drawing.Size(72, 24);
this.relCenterY.StepValues = null;
this.relCenterY.TabIndex = 11;
//
// relCenterX
//
this.relCenterX.AllowDecimal = true;
this.relCenterX.AllowNegative = true;
this.relCenterX.AllowRelative = true;
this.relCenterX.ButtonStep = 1;
this.relCenterX.Location = new System.Drawing.Point(58, 83);
this.relCenterX.Name = "relCenterX";
this.relCenterX.Size = new System.Drawing.Size(72, 24);
this.relCenterX.StepValues = null;
this.relCenterX.TabIndex = 10;
//
// absCenterY
//
this.absCenterY.AllowDecimal = true;
this.absCenterY.AllowNegative = true;
this.absCenterY.AllowRelative = true;
this.absCenterY.ButtonStep = 1;
this.absCenterY.Location = new System.Drawing.Point(136, 53);
this.absCenterY.Name = "absCenterY";
this.absCenterY.Size = new System.Drawing.Size(72, 24);
this.absCenterY.StepValues = null;
this.absCenterY.TabIndex = 9;
//
// absCenterX
//
this.absCenterX.AllowDecimal = true;
this.absCenterX.AllowNegative = true;
this.absCenterX.AllowRelative = true;
this.absCenterX.ButtonStep = 1;
this.absCenterX.Location = new System.Drawing.Point(58, 53);
this.absCenterX.Name = "absCenterX";
this.absCenterX.Size = new System.Drawing.Size(72, 24);
this.absCenterX.StepValues = null;
this.absCenterX.TabIndex = 8;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(7, 88);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(48, 14);
this.label22.TabIndex = 1;
this.label22.Text = "Relative:";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(6, 58);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(53, 14);
this.label23.TabIndex = 0;
this.label23.Text = "Absolute:";
//
// EditSelectionPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@ -650,8 +499,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false);
}
@ -691,18 +538,5 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.Button orgposy;
private System.Windows.Forms.Button orgsizey;
private System.Windows.Forms.Button orgsizex;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button orgCenterY;
private System.Windows.Forms.Button orgCenterX;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterY;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterX;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterY;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterX;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
}
}

View file

@ -1,123 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</root>

View file

@ -28,4 +28,4 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.14.0.1879")]
[assembly: AssemblyVersion("1.14.0.1880")]

View file

@ -130,6 +130,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap DrawGridMode {
get {
object obj = ResourceManager.GetObject("DrawGridMode", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap DrawLinesMode {
get {
object obj = ResourceManager.GetObject("DrawLinesMode", resourceCulture);
@ -193,6 +200,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap Reset {
get {
object obj = ResourceManager.GetObject("Reset", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap SelectTouching {
get {
object obj = ResourceManager.GetObject("SelectTouching", resourceCulture);

View file

@ -118,8 +118,8 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="DrawEllipseMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawEllipseMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ViewSelectionEffects" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewSelectionEffects.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AlignThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlignThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -127,6 +127,9 @@
<data name="SelectTouching" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SelectTouching.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawEllipseMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawEllipseMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PasteProperties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PasteProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -172,6 +175,9 @@
<data name="VisualModeGZ" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VisualModeGZ.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TextureLock" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextureLock.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CopyProperties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CopyProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -196,10 +202,10 @@
<data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TextureLock" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextureLock.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Reset" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewSelectionEffects" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewSelectionEffects.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -124,6 +124,17 @@ drawcurvemode
default = 393284; //Ctrl-Alt-D
}
//mxd
drawgridmode
{
title = "Start Grid Drawing";
category = "drawing";
description = "Starts drawing a grid. Increase/Decrease Subdivision Level and Increase/Decrease Corners Bevel actions are avaliable in this mode.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
//mxd
increasesubdivlevel
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B