thing dialog and bunch minor of fixes/changes

This commit is contained in:
codeimp 2008-05-17 17:43:57 +00:00
parent e2e9e17985
commit a5a6119190
24 changed files with 2444 additions and 318 deletions

View file

@ -7,6 +7,18 @@
[15:51] <SoM> I've been doing a lot of detailing that would be made a lot easier with a feature like this
[15:52] <CodeImp> i dont even think that should be an option, but normal behaviour
===========================================================================================
[20:55] <esselaptop> CodeImp_: i thought of another nice feature that i don't think DB has. in slade, you can middle-click (or bind it to something else) to select the nearest vertex. like, if you're drawing a line and you want to connect it to something that's off-grid, you can just put the mouse nearby the off-grid vertex and middle-click, and it'll snap to it.
===========================================================================================
Make Sector feature allows you to click somewhere and all surrounding lines will form a new sector. handy to split merged sectors.
===========================================================================================
typed linedef arguments
the possible types are also defined in the configuration
this allows a user to pick from a list instead of entering a number for the linedef args

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 709 B

View file

@ -131,6 +131,12 @@
<Compile Include="Interface\ActionSelectorControl.Designer.cs">
<DependentUpon>ActionSelectorControl.cs</DependentUpon>
</Compile>
<Compile Include="Interface\AngleControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\AngleControl.Designer.cs">
<DependentUpon>AngleControl.cs</DependentUpon>
</Compile>
<Compile Include="Interface\AutoSelectTextbox.cs">
<SubType>Component</SubType>
</Compile>
@ -140,6 +146,12 @@
<Compile Include="Interface\CheckboxArrayControl.Designer.cs">
<DependentUpon>CheckboxArrayControl.cs</DependentUpon>
</Compile>
<Compile Include="Interface\ClickableNumericTextbox.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\ClickableNumericTextbox.Designer.cs">
<DependentUpon>ClickableNumericTextbox.cs</DependentUpon>
</Compile>
<Compile Include="Interface\ColorControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -272,6 +284,12 @@
<Compile Include="Interface\TextureSelectorControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Interface\ThingEditForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\ThingEditForm.Designer.cs">
<DependentUpon>ThingEditForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\ThingInfoPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -514,6 +532,18 @@
</ItemGroup>
<ItemGroup>
<Content Include="Resources\DB2.ico" />
<EmbeddedResource Include="Interface\AngleControl.resx">
<SubType>Designer</SubType>
<DependentUpon>AngleControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\ClickableNumericTextbox.resx">
<SubType>Designer</SubType>
<DependentUpon>ClickableNumericTextbox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Interface\ThingEditForm.resx">
<SubType>Designer</SubType>
<DependentUpon>ThingEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Font.png" />
<EmbeddedResource Include="Resources\Thing2D_3.png" />
<EmbeddedResource Include="Resources\Thing2D_2.png" />

View file

@ -267,7 +267,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(selected.Count > 0)
{
// Show thing edit dialog
// TODO
General.Interface.ShowEditThings(selected);
// When a single thing was selected, deselect it now
if(selected.Count == 1) General.Map.Map.ClearSelectedThings();

View file

@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.Config
private IDictionary flatranges;
// Things
private Dictionary<int, string> thingflags;
private List<ThingCategory> thingcategories;
private Dictionary<int, ThingTypeInfo> things;
@ -108,6 +109,7 @@ namespace CodeImp.DoomBuilder.Config
public IDictionary FlatRanges { get { return flatranges; } }
// Things
public IDictionary<int, string> ThingFlags { get { return thingflags; } }
public List<ThingCategory> ThingCategories { get { return thingcategories; } }
public ICollection<ThingTypeInfo> Things { get { return things.Values; } }
@ -137,6 +139,7 @@ namespace CodeImp.DoomBuilder.Config
{
// Initialize
this.cfg = cfg;
this.thingflags = new Dictionary<int, string>();
this.thingcategories = new List<ThingCategory>();
this.things = new Dictionary<int, ThingTypeInfo>();
this.linedefflags = new Dictionary<int, string>();
@ -170,6 +173,7 @@ namespace CodeImp.DoomBuilder.Config
flatranges = cfg.ReadSetting("flats", new Hashtable());
// Things
LoadThingFlags();
LoadThingCategories();
// Linedefs
@ -238,8 +242,11 @@ namespace CodeImp.DoomBuilder.Config
// Make a category
thingcat = new ThingCategory(cfg, de.Key.ToString());
// Add all thing in category to the big list
// Add all things in category to the big list
foreach(ThingTypeInfo t in thingcat.Things) things.Add(t.Index, t);
// Add category to list
thingcategories.Add(thingcat);
}
}
@ -440,6 +447,38 @@ namespace CodeImp.DoomBuilder.Config
}
}
}
// Thing flags
private void LoadThingFlags()
{
IDictionary dic;
int bitflagscheck = 0;
int bitvalue;
// Get linedef flags
dic = cfg.ReadSetting("thingflags", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Try paring the bit value
if(int.TryParse(de.Key.ToString(),
NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
CultureInfo.InvariantCulture, out bitvalue))
{
// Check for conflict and add to list
if((bitvalue & bitflagscheck) == 0)
thingflags.Add(bitvalue, de.Value.ToString());
else
General.WriteLogLine("WARNING: Structure 'thingflags' contains conflicting bit flag keys. Make sure all keys are unique integers and powers of 2!");
// Update bit flags checking value
bitflagscheck |= bitvalue;
}
else
{
General.WriteLogLine("WARNING: Structure 'thingflags' contains invalid keys!");
}
}
}
#endregion
@ -470,6 +509,23 @@ namespace CodeImp.DoomBuilder.Config
return new ThingTypeInfo(thingtype);
}
}
// This gets thing information by index
// Returns null when thing type info could not be found
public ThingTypeInfo GetThingInfoEx(int thingtype)
{
// Index in config?
if(things.ContainsKey(thingtype))
{
// Return from config
return things[thingtype];
}
else
{
// No such thing type known
return null;
}
}
// This checks if an action is generalized or predefined
public static bool IsGeneralized(int action, List<GeneralizedCategory> categories)

View file

@ -35,6 +35,10 @@ namespace CodeImp.DoomBuilder.Config
{
#region ================== Constants
public const int THING_BLOCKING_NONE = 0;
public const int THING_BLOCKING_FULL = 1;
public const int THING_BLOCKING_HEIGHT = 2;
#endregion
#region ================== Variables

View file

@ -1087,7 +1087,7 @@ namespace CodeImp.DoomBuilder
[BeginAction("testaction")]
internal static void TestAction()
{
TextureBrowserForm t = new TextureBrowserForm();
ThingEditForm t = new ThingEditForm();
t.ShowDialog(mainwindow);
t.Dispose();
}

180
Source/Interface/AngleControl.Designer.cs generated Normal file
View file

@ -0,0 +1,180 @@
namespace CodeImp.DoomBuilder.Interface
{
partial class AngleControl
{
/// <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.button0 = new System.Windows.Forms.RadioButton();
this.button1 = new System.Windows.Forms.RadioButton();
this.button2 = new System.Windows.Forms.RadioButton();
this.button3 = new System.Windows.Forms.RadioButton();
this.button4 = new System.Windows.Forms.RadioButton();
this.button5 = new System.Windows.Forms.RadioButton();
this.button6 = new System.Windows.Forms.RadioButton();
this.button7 = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// button0
//
this.button0.AutoSize = true;
this.button0.BackColor = System.Drawing.Color.Transparent;
this.button0.Location = new System.Drawing.Point(60, 31);
this.button0.Name = "button0";
this.button0.Padding = new System.Windows.Forms.Padding(3);
this.button0.Size = new System.Drawing.Size(20, 19);
this.button0.TabIndex = 0;
this.button0.TabStop = true;
this.button0.UseVisualStyleBackColor = false;
this.button0.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button1
//
this.button1.AutoSize = true;
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.Location = new System.Drawing.Point(52, 9);
this.button1.Name = "button1";
this.button1.Padding = new System.Windows.Forms.Padding(3);
this.button1.Size = new System.Drawing.Size(20, 19);
this.button1.TabIndex = 1;
this.button1.TabStop = true;
this.button1.UseVisualStyleBackColor = false;
this.button1.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button2
//
this.button2.AutoSize = true;
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.Location = new System.Drawing.Point(31, 1);
this.button2.Name = "button2";
this.button2.Padding = new System.Windows.Forms.Padding(3);
this.button2.Size = new System.Drawing.Size(20, 19);
this.button2.TabIndex = 2;
this.button2.TabStop = true;
this.button2.UseVisualStyleBackColor = false;
this.button2.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button3
//
this.button3.AutoSize = true;
this.button3.BackColor = System.Drawing.Color.Transparent;
this.button3.Location = new System.Drawing.Point(9, 9);
this.button3.Name = "button3";
this.button3.Padding = new System.Windows.Forms.Padding(3);
this.button3.Size = new System.Drawing.Size(20, 19);
this.button3.TabIndex = 3;
this.button3.TabStop = true;
this.button3.UseVisualStyleBackColor = false;
this.button3.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button4
//
this.button4.AutoSize = true;
this.button4.BackColor = System.Drawing.Color.Transparent;
this.button4.Location = new System.Drawing.Point(1, 31);
this.button4.Name = "button4";
this.button4.Padding = new System.Windows.Forms.Padding(3);
this.button4.Size = new System.Drawing.Size(20, 19);
this.button4.TabIndex = 4;
this.button4.TabStop = true;
this.button4.UseVisualStyleBackColor = false;
this.button4.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button5
//
this.button5.AutoSize = true;
this.button5.BackColor = System.Drawing.Color.Transparent;
this.button5.Location = new System.Drawing.Point(9, 53);
this.button5.Name = "button5";
this.button5.Padding = new System.Windows.Forms.Padding(3);
this.button5.Size = new System.Drawing.Size(20, 19);
this.button5.TabIndex = 5;
this.button5.TabStop = true;
this.button5.UseVisualStyleBackColor = false;
this.button5.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button6
//
this.button6.AutoSize = true;
this.button6.BackColor = System.Drawing.Color.Transparent;
this.button6.Location = new System.Drawing.Point(31, 61);
this.button6.Name = "button6";
this.button6.Padding = new System.Windows.Forms.Padding(3);
this.button6.Size = new System.Drawing.Size(20, 19);
this.button6.TabIndex = 6;
this.button6.TabStop = true;
this.button6.UseVisualStyleBackColor = false;
this.button6.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// button7
//
this.button7.AutoSize = true;
this.button7.BackColor = System.Drawing.Color.Transparent;
this.button7.Location = new System.Drawing.Point(52, 53);
this.button7.Name = "button7";
this.button7.Padding = new System.Windows.Forms.Padding(3);
this.button7.Size = new System.Drawing.Size(20, 19);
this.button7.TabIndex = 7;
this.button7.TabStop = true;
this.button7.UseVisualStyleBackColor = false;
this.button7.CheckedChanged += new System.EventHandler(this.button_CheckedChanged);
//
// AngleControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.button0);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "AngleControl";
this.Size = new System.Drawing.Size(80, 80);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.AngleControl_Paint);
this.Layout += new System.Windows.Forms.LayoutEventHandler(this.AngleControl_Layout);
this.Resize += new System.EventHandler(this.AngleControl_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RadioButton button0;
private System.Windows.Forms.RadioButton button1;
private System.Windows.Forms.RadioButton button2;
private System.Windows.Forms.RadioButton button3;
private System.Windows.Forms.RadioButton button4;
private System.Windows.Forms.RadioButton button5;
private System.Windows.Forms.RadioButton button6;
private System.Windows.Forms.RadioButton button7;
}
}

View file

@ -0,0 +1,179 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Globalization;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Editing;
using System.Drawing.Drawing2D;
#endregion
namespace CodeImp.DoomBuilder.Interface
{
public partial class AngleControl : UserControl
{
#region ================== Constants
private const float LINE_THICKNESS = 3f;
private const float LINE_LENGTH = 22f;
#endregion
#region ================== Events
public event EventHandler ValueChanged;
public event EventHandler ButtonClicked;
#endregion
#region ================== Variables
// Buttons
private RadioButton[] buttons;
// Result
private int angle;
private bool settingangle;
#endregion
#region ================== Properties
public int Value { get { return angle; } set { SetAngle(value, true); } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public AngleControl()
{
// Initialize
InitializeComponent();
// Make array from buttons
buttons = new RadioButton[8];
buttons[0] = button0;
buttons[1] = button1;
buttons[2] = button2;
buttons[3] = button3;
buttons[4] = button4;
buttons[5] = button5;
buttons[6] = button6;
buttons[7] = button7;
}
#endregion
#region ================== Interface
// Size changed
protected override void OnClientSizeChanged(EventArgs e)
{
base.OnClientSizeChanged(e);
AngleControl_Resize(this, e);
}
// Layout changed
private void AngleControl_Layout(object sender, LayoutEventArgs e)
{
AngleControl_Resize(sender, e);
}
// Size changed
private void AngleControl_Resize(object sender, EventArgs e)
{
this.Size = new Size(80, 80);
}
// Redraw the control
private void AngleControl_Paint(object sender, PaintEventArgs e)
{
float rad = Angle2D.DegToRad((float)angle);
e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
e.Graphics.InterpolationMode = InterpolationMode.High;
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
e.Graphics.Clear(SystemColors.Control);
Pen linepen = new Pen(SystemColors.ControlText, LINE_THICKNESS);
PointF start = new PointF(40f, 40f);
if((rad >= 0) && (rad < 360))
{
PointF end = new PointF(start.X + (float)Math.Sin(rad + Angle2D.PIHALF) * LINE_LENGTH,
start.Y + (float)Math.Cos(rad + Angle2D.PIHALF) * LINE_LENGTH);
e.Graphics.DrawLine(linepen, start, end);
}
else
{
e.Graphics.DrawLine(linepen, start, start);
}
}
#endregion
#region ================== Control
// This sets an angle manually
private void SetAngle(int newangle, bool changebuttons)
{
bool changed;
// Normalize and apply angle
changed = (newangle != angle);
angle = newangle;
// Check if it matches an angle from the buttons
if(changebuttons)
{
settingangle = true;
for(int i = 0; i < 8; i++)
buttons[i].Checked = (angle == i * 45);
settingangle = false;
}
// Redraw
this.Invalidate();
// Raise event
if((ValueChanged != null) && changed) ValueChanged(this, EventArgs.Empty);
}
// When checked state of a button changes
private void button_CheckedChanged(object sender, EventArgs e)
{
if(!settingangle)
{
// Check if we can get the angle from one of the buttons
for(int i = 0; i < 8; i++)
if(buttons[i].Checked) SetAngle(i * 45, false);
// Raise event
if(ButtonClicked != null) ButtonClicked(this, EventArgs.Empty);
}
}
#endregion
}
}

View file

@ -0,0 +1,147 @@
<?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>
<metadata name="button0.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,78 @@
namespace CodeImp.DoomBuilder.Interface
{
partial class ClickableNumericTextbox
{
/// <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.buttons = new System.Windows.Forms.VScrollBar();
this.textbox = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.SuspendLayout();
//
// buttons
//
this.buttons.Location = new System.Drawing.Point(163, 0);
this.buttons.Maximum = 200;
this.buttons.Minimum = 1;
this.buttons.Name = "buttons";
this.buttons.Size = new System.Drawing.Size(18, 24);
this.buttons.TabIndex = 7;
this.buttons.Value = 1;
this.buttons.ValueChanged += new System.EventHandler(this.buttons_ValueChanged);
//
// textbox
//
this.textbox.AllowNegative = false;
this.textbox.AllowRelative = false;
this.textbox.ImeMode = System.Windows.Forms.ImeMode.Off;
this.textbox.Location = new System.Drawing.Point(0, 2);
this.textbox.Name = "textbox";
this.textbox.Size = new System.Drawing.Size(160, 20);
this.textbox.TabIndex = 0;
this.textbox.TextChanged += new System.EventHandler(this.textbox_TextChanged);
this.textbox.Leave += new System.EventHandler(this.textbox_Leave);
//
// ClickableNumericTextbox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.buttons);
this.Controls.Add(this.textbox);
this.Name = "ClickableNumericTextbox";
this.Size = new System.Drawing.Size(289, 68);
this.Layout += new System.Windows.Forms.LayoutEventHandler(this.ClickableNumericTextbox_Layout);
this.Resize += new System.EventHandler(this.ClickableNumericTextbox_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private NumericTextbox textbox;
private System.Windows.Forms.VScrollBar buttons;
}
}

View file

@ -0,0 +1,112 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Globalization;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Editing;
#endregion
namespace CodeImp.DoomBuilder.Interface
{
public partial class ClickableNumericTextbox : UserControl
{
#region ================== Events
public event EventHandler ValueChanged;
#endregion
#region ================== Properties
public int Minimum { get { return buttons.Minimum; } set { buttons.Minimum = value; } }
public int Maximum { get { return buttons.Maximum; } set { buttons.Maximum = value; } }
public bool AllowNegative { get { return textbox.AllowNegative; } set { textbox.AllowNegative = value; } }
public int Value { get { return buttons.Value; } set { buttons.Value = value; } }
#endregion
#region ================== Constructor / Disposer
// Constructor
public ClickableNumericTextbox()
{
InitializeComponent();
}
#endregion
#region ================== Interface
// Client size changes
protected override void OnClientSizeChanged(EventArgs e)
{
base.OnClientSizeChanged(e);
ClickableNumericTextbox_Resize(this, e);
}
// Layout changes
private void ClickableNumericTextbox_Layout(object sender, LayoutEventArgs e)
{
ClickableNumericTextbox_Resize(sender, e);
}
// Control resizes
private void ClickableNumericTextbox_Resize(object sender, EventArgs e)
{
buttons.Height = textbox.Height + 4;
textbox.Width = ClientRectangle.Width - buttons.Width - 2;
buttons.Left = textbox.Width + 2;
this.Height = buttons.Height;
}
#endregion
#region ================== Control
// Text in textbox changes
private void textbox_TextChanged(object sender, EventArgs e)
{
int result = textbox.GetResult(buttons.Value);
if((result >= buttons.Minimum) && (result <= buttons.Maximum)) buttons.Value = result;
}
// Textbox loses focus
private void textbox_Leave(object sender, EventArgs e)
{
textbox.Text = buttons.Value.ToString();
}
// Buttons changed
private void buttons_ValueChanged(object sender, EventArgs e)
{
textbox.Text = buttons.Value.ToString();
if(ValueChanged != null) ValueChanged(this, e);
}
#endregion
}
}

View file

@ -0,0 +1,129 @@
<?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>
<metadata name="buttons.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="textbox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.Interface
void RedrawDisplay();
void ShowEditLinedefs(ICollection<Linedef> lines);
void ShowEditSectors(ICollection<Sector> sectors);
void ShowEditThings(ICollection<Thing> things);
void ShowLinedefInfo(Linedef l);
void ShowSectorInfo(Sector s);
void ShowThingInfo(Thing t);

View file

@ -49,6 +49,8 @@ namespace CodeImp.DoomBuilder.Interface
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.actiongroup = new System.Windows.Forms.GroupBox();
this.action = new CodeImp.DoomBuilder.Interface.ActionSelectorControl();
this.browseaction = new System.Windows.Forms.Button();
this.hexenpanel = new System.Windows.Forms.Panel();
this.arg3 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg2 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
@ -56,8 +58,6 @@ namespace CodeImp.DoomBuilder.Interface
this.arg1 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg0 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.activation = new System.Windows.Forms.ComboBox();
this.action = new CodeImp.DoomBuilder.Interface.ActionSelectorControl();
this.browseaction = new System.Windows.Forms.Button();
this.doompanel = new System.Windows.Forms.Panel();
this.tag = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.newtag = new System.Windows.Forms.Button();
@ -85,6 +85,7 @@ namespace CodeImp.DoomBuilder.Interface
this.frontoffsetx = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.tabcustom = new System.Windows.Forms.TabPage();
this.fieldslist = new CodeImp.DoomBuilder.Interface.FieldsEditorControl();
this.groupBox1 = new System.Windows.Forms.GroupBox();
label2 = new System.Windows.Forms.Label();
taglabel = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
@ -100,7 +101,6 @@ namespace CodeImp.DoomBuilder.Interface
activationlabel = new System.Windows.Forms.Label();
this.actiongroup.SuspendLayout();
this.hexenpanel.SuspendLayout();
this.doompanel.SuspendLayout();
this.settingsgroup.SuspendLayout();
this.tabs.SuspendLayout();
this.tabproperties.SuspendLayout();
@ -108,6 +108,7 @@ namespace CodeImp.DoomBuilder.Interface
this.backgroup.SuspendLayout();
this.frontgroup.SuspendLayout();
this.tabcustom.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label2
@ -122,7 +123,7 @@ namespace CodeImp.DoomBuilder.Interface
// taglabel
//
taglabel.AutoSize = true;
taglabel.Location = new System.Drawing.Point(22, 22);
taglabel.Location = new System.Drawing.Point(28, 31);
taglabel.Name = "taglabel";
taglabel.Size = new System.Drawing.Size(28, 14);
taglabel.TabIndex = 6;
@ -281,7 +282,7 @@ namespace CodeImp.DoomBuilder.Interface
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(439, 435);
this.cancel.Location = new System.Drawing.Point(439, 493);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 17;
@ -292,7 +293,7 @@ namespace CodeImp.DoomBuilder.Interface
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(320, 435);
this.apply.Location = new System.Drawing.Point(320, 493);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 16;
@ -305,18 +306,44 @@ namespace CodeImp.DoomBuilder.Interface
this.actiongroup.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.actiongroup.Controls.Add(this.hexenpanel);
this.actiongroup.Controls.Add(label2);
this.actiongroup.Controls.Add(this.action);
this.actiongroup.Controls.Add(this.browseaction);
this.actiongroup.Controls.Add(this.hexenpanel);
this.actiongroup.Controls.Add(this.doompanel);
this.actiongroup.Location = new System.Drawing.Point(8, 169);
this.actiongroup.Location = new System.Drawing.Point(8, 238);
this.actiongroup.Name = "actiongroup";
this.actiongroup.Size = new System.Drawing.Size(517, 203);
this.actiongroup.Size = new System.Drawing.Size(517, 192);
this.actiongroup.TabIndex = 18;
this.actiongroup.TabStop = false;
this.actiongroup.Text = " Action ";
//
// action
//
this.action.BackColor = System.Drawing.SystemColors.Control;
this.action.Cursor = System.Windows.Forms.Cursors.Default;
this.action.Empty = false;
this.action.GeneralizedCategories = null;
this.action.Location = new System.Drawing.Point(62, 27);
this.action.Name = "action";
this.action.Size = new System.Drawing.Size(401, 21);
this.action.TabIndex = 5;
this.action.Value = 402;
this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges);
//
// browseaction
//
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseaction.Location = new System.Drawing.Point(469, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(30, 23);
this.browseaction.TabIndex = 3;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
//
// hexenpanel
//
this.hexenpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -334,9 +361,9 @@ namespace CodeImp.DoomBuilder.Interface
this.hexenpanel.Controls.Add(this.arg3label);
this.hexenpanel.Controls.Add(this.arg2label);
this.hexenpanel.Controls.Add(this.arg4label);
this.hexenpanel.Location = new System.Drawing.Point(6, 54);
this.hexenpanel.Location = new System.Drawing.Point(6, 52);
this.hexenpanel.Name = "hexenpanel";
this.hexenpanel.Size = new System.Drawing.Size(505, 143);
this.hexenpanel.Size = new System.Drawing.Size(505, 132);
this.hexenpanel.TabIndex = 13;
//
// arg3
@ -398,42 +425,14 @@ namespace CodeImp.DoomBuilder.Interface
this.activation.Size = new System.Drawing.Size(437, 22);
this.activation.TabIndex = 11;
//
// action
//
this.action.BackColor = System.Drawing.SystemColors.Control;
this.action.Cursor = System.Windows.Forms.Cursors.Default;
this.action.Empty = false;
this.action.Location = new System.Drawing.Point(62, 27);
this.action.Name = "action";
this.action.Size = new System.Drawing.Size(401, 21);
this.action.TabIndex = 5;
this.action.Value = 402;
this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges);
//
// browseaction
//
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseaction.Location = new System.Drawing.Point(469, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(30, 23);
this.browseaction.TabIndex = 3;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
//
// doompanel
//
this.doompanel.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.doompanel.Controls.Add(this.tag);
this.doompanel.Controls.Add(taglabel);
this.doompanel.Controls.Add(this.newtag);
this.doompanel.Location = new System.Drawing.Point(6, 54);
this.doompanel.Name = "doompanel";
this.doompanel.Size = new System.Drawing.Size(505, 143);
this.doompanel.Size = new System.Drawing.Size(505, 132);
this.doompanel.TabIndex = 12;
//
// tag
@ -441,14 +440,14 @@ namespace CodeImp.DoomBuilder.Interface
this.tag.AllowNegative = false;
this.tag.AllowRelative = true;
this.tag.ImeMode = System.Windows.Forms.ImeMode.Off;
this.tag.Location = new System.Drawing.Point(56, 19);
this.tag.Location = new System.Drawing.Point(62, 28);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(68, 20);
this.tag.TabIndex = 7;
//
// newtag
//
this.newtag.Location = new System.Drawing.Point(130, 18);
this.newtag.Location = new System.Drawing.Point(136, 27);
this.newtag.Name = "newtag";
this.newtag.Size = new System.Drawing.Size(76, 23);
this.newtag.TabIndex = 8;
@ -470,6 +469,9 @@ namespace CodeImp.DoomBuilder.Interface
//
// flags
//
this.flags.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.flags.AutoScroll = true;
this.flags.Columns = 3;
this.flags.Location = new System.Drawing.Point(18, 26);
@ -499,19 +501,20 @@ namespace CodeImp.DoomBuilder.Interface
this.tabs.Margin = new System.Windows.Forms.Padding(1);
this.tabs.Name = "tabs";
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(541, 408);
this.tabs.Size = new System.Drawing.Size(541, 466);
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.tabs.TabIndex = 20;
//
// tabproperties
//
this.tabproperties.Controls.Add(this.groupBox1);
this.tabproperties.Controls.Add(this.settingsgroup);
this.tabproperties.Controls.Add(this.actiongroup);
this.tabproperties.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabproperties.Location = new System.Drawing.Point(4, 23);
this.tabproperties.Name = "tabproperties";
this.tabproperties.Padding = new System.Windows.Forms.Padding(5);
this.tabproperties.Size = new System.Drawing.Size(533, 381);
this.tabproperties.Size = new System.Drawing.Size(533, 439);
this.tabproperties.TabIndex = 0;
this.tabproperties.Text = "Properties";
this.tabproperties.UseVisualStyleBackColor = true;
@ -526,7 +529,7 @@ namespace CodeImp.DoomBuilder.Interface
this.tabsidedefs.Location = new System.Drawing.Point(4, 23);
this.tabsidedefs.Name = "tabsidedefs";
this.tabsidedefs.Padding = new System.Windows.Forms.Padding(5);
this.tabsidedefs.Size = new System.Drawing.Size(533, 381);
this.tabsidedefs.Size = new System.Drawing.Size(533, 439);
this.tabsidedefs.TabIndex = 1;
this.tabsidedefs.Text = "Sidedefs";
this.tabsidedefs.UseVisualStyleBackColor = true;
@ -534,7 +537,7 @@ namespace CodeImp.DoomBuilder.Interface
// backside
//
this.backside.AutoSize = true;
this.backside.Location = new System.Drawing.Point(20, 188);
this.backside.Location = new System.Drawing.Point(20, 212);
this.backside.Name = "backside";
this.backside.Size = new System.Drawing.Size(74, 18);
this.backside.TabIndex = 2;
@ -556,9 +559,9 @@ namespace CodeImp.DoomBuilder.Interface
this.backgroup.Controls.Add(label9);
this.backgroup.Controls.Add(label10);
this.backgroup.Enabled = false;
this.backgroup.Location = new System.Drawing.Point(8, 191);
this.backgroup.Location = new System.Drawing.Point(8, 214);
this.backgroup.Name = "backgroup";
this.backgroup.Size = new System.Drawing.Size(517, 175);
this.backgroup.Size = new System.Drawing.Size(517, 208);
this.backgroup.TabIndex = 1;
this.backgroup.TabStop = false;
this.backgroup.Text = " ";
@ -650,7 +653,7 @@ namespace CodeImp.DoomBuilder.Interface
this.frontgroup.Enabled = false;
this.frontgroup.Location = new System.Drawing.Point(8, 8);
this.frontgroup.Name = "frontgroup";
this.frontgroup.Size = new System.Drawing.Size(517, 175);
this.frontgroup.Size = new System.Drawing.Size(517, 200);
this.frontgroup.TabIndex = 0;
this.frontgroup.TabStop = false;
this.frontgroup.Text = " ";
@ -722,7 +725,7 @@ namespace CodeImp.DoomBuilder.Interface
this.tabcustom.Location = new System.Drawing.Point(4, 23);
this.tabcustom.Name = "tabcustom";
this.tabcustom.Padding = new System.Windows.Forms.Padding(3);
this.tabcustom.Size = new System.Drawing.Size(533, 381);
this.tabcustom.Size = new System.Drawing.Size(533, 439);
this.tabcustom.TabIndex = 2;
this.tabcustom.Text = "Custom";
this.tabcustom.UseVisualStyleBackColor = true;
@ -735,15 +738,27 @@ namespace CodeImp.DoomBuilder.Interface
this.fieldslist.Location = new System.Drawing.Point(11, 11);
this.fieldslist.Margin = new System.Windows.Forms.Padding(8);
this.fieldslist.Name = "fieldslist";
this.fieldslist.Size = new System.Drawing.Size(511, 359);
this.fieldslist.Size = new System.Drawing.Size(511, 417);
this.fieldslist.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tag);
this.groupBox1.Controls.Add(taglabel);
this.groupBox1.Controls.Add(this.newtag);
this.groupBox1.Location = new System.Drawing.Point(8, 166);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(517, 66);
this.groupBox1.TabIndex = 20;
this.groupBox1.TabStop = false;
this.groupBox1.Text = " Identification ";
//
// LinedefEditForm
//
this.AcceptButton = this.apply;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(561, 470);
this.ClientSize = new System.Drawing.Size(561, 528);
this.Controls.Add(this.tabs);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@ -753,6 +768,7 @@ namespace CodeImp.DoomBuilder.Interface
this.MinimizeBox = false;
this.Name = "LinedefEditForm";
this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Linedef";
@ -760,8 +776,6 @@ namespace CodeImp.DoomBuilder.Interface
this.actiongroup.PerformLayout();
this.hexenpanel.ResumeLayout(false);
this.hexenpanel.PerformLayout();
this.doompanel.ResumeLayout(false);
this.doompanel.PerformLayout();
this.settingsgroup.ResumeLayout(false);
this.tabs.ResumeLayout(false);
this.tabproperties.ResumeLayout(false);
@ -772,6 +786,8 @@ namespace CodeImp.DoomBuilder.Interface
this.frontgroup.ResumeLayout(false);
this.frontgroup.PerformLayout();
this.tabcustom.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
@ -822,5 +838,6 @@ namespace CodeImp.DoomBuilder.Interface
private System.Windows.Forms.Label arg3label;
private System.Windows.Forms.TabPage tabcustom;
private FieldsEditorControl fieldslist;
private System.Windows.Forms.GroupBox groupBox1;
}
}

View file

@ -117,286 +117,43 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="taglabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="taglabel.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<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>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label8.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label8.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label9.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label10.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label10.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label11.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label11.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label12.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label12.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="activationlabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="activationlabel.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="arg0label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg1label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg4label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg2label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg3label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actiongroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="action.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="browseaction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="hexenpanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg0.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="activation.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="doompanel.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>
<metadata name="newtag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="arg0.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="activation.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>
<metadata name="newtag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="settingsgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="checkBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabsidedefs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backsector.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backsector.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontsector.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fronthigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontsector.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fronthigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -1374,13 +1374,23 @@ namespace CodeImp.DoomBuilder.Interface
// This shows the dialog to edit sectors
public void ShowEditSectors(ICollection<Sector> sectors)
{
// Show line edit dialog
// Show sector edit dialog
SectorEditForm f = new SectorEditForm();
f.Setup(sectors);
f.ShowDialog(this);
f.Dispose();
}
// This shows the dialog to edit things
public void ShowEditThings(ICollection<Thing> things)
{
// Show thing edit dialog
ThingEditForm f = new ThingEditForm();
f.Setup(things);
f.ShowDialog(this);
f.Dispose();
}
#endregion
#region ================== Processor

View file

@ -170,6 +170,7 @@ namespace CodeImp.DoomBuilder.Interface
public int GetResult(int original)
{
string textpart = this.Text;
int result = 0;
// Strip prefixes
textpart = textpart.Replace("+", "");
@ -182,18 +183,20 @@ namespace CodeImp.DoomBuilder.Interface
if(this.Text.StartsWith("++"))
{
// Add number to original
return original + int.Parse(textpart);
if(!int.TryParse(textpart, out result)) result = 0;
return original + result;
}
// Prefixed with --?
else if(this.Text.StartsWith("--"))
{
// Subtract number from original
return original - int.Parse(textpart);
if(!int.TryParse(textpart, out result)) result = 0;
return original - result;
}
else
{
// Return the new value
return int.Parse(this.Text);
if(int.TryParse(this.Text, out result)) return result; else return 0;
}
}
else

View file

@ -431,6 +431,7 @@ namespace CodeImp.DoomBuilder.Interface
this.MinimizeBox = false;
this.Name = "SectorEditForm";
this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Sector";

View file

@ -129,12 +129,12 @@
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupaction.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupaction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupaction.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -147,12 +147,12 @@
<metadata name="newtag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupeffect.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupeffect.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupeffect.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="browseeffect.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -174,12 +174,12 @@
<metadata name="label8.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupfloorceiling.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupfloorceiling.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupfloorceiling.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="sectorheight.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

727
Source/Interface/ThingEditForm.Designer.cs generated Normal file
View file

@ -0,0 +1,727 @@
namespace CodeImp.DoomBuilder.Interface
{
partial class ThingEditForm
{
/// <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 Windows Form 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.components = new System.ComponentModel.Container();
System.Windows.Forms.GroupBox groupBox1;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label3;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label1;
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Monsters");
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThingEditForm));
System.Windows.Forms.GroupBox groupBox2;
System.Windows.Forms.Label label6;
System.Windows.Forms.Label label5;
System.Windows.Forms.Label taglabel;
System.Windows.Forms.Label label7;
this.sizelabel = new System.Windows.Forms.Label();
this.blockinglabel = new System.Windows.Forms.Label();
this.positionlabel = new System.Windows.Forms.Label();
this.typeid = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.typelist = new System.Windows.Forms.TreeView();
this.thingimages = new System.Windows.Forms.ImageList(this.components);
this.height = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.angle = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.anglecontrol = new CodeImp.DoomBuilder.Interface.AngleControl();
this.tabs = new System.Windows.Forms.TabControl();
this.tabproperties = new System.Windows.Forms.TabPage();
this.spritetex = new System.Windows.Forms.Panel();
this.settingsgroup = new System.Windows.Forms.GroupBox();
this.flags = new CodeImp.DoomBuilder.Interface.CheckboxArrayControl();
this.tabeffects = new System.Windows.Forms.TabPage();
this.actiongroup = new System.Windows.Forms.GroupBox();
this.hexenpanel = new System.Windows.Forms.Panel();
this.arg3 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg2 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg4 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg1 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg0 = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.arg1label = new System.Windows.Forms.Label();
this.arg0label = new System.Windows.Forms.Label();
this.arg3label = new System.Windows.Forms.Label();
this.arg2label = new System.Windows.Forms.Label();
this.arg4label = new System.Windows.Forms.Label();
this.action = new CodeImp.DoomBuilder.Interface.ActionSelectorControl();
this.browseaction = new System.Windows.Forms.Button();
this.doompanel = new System.Windows.Forms.Panel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tag = new CodeImp.DoomBuilder.Interface.NumericTextbox();
this.newtag = new System.Windows.Forms.Button();
this.tabcustom = new System.Windows.Forms.TabPage();
this.fieldslist = new CodeImp.DoomBuilder.Interface.FieldsEditorControl();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
groupBox1 = new System.Windows.Forms.GroupBox();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
groupBox2 = new System.Windows.Forms.GroupBox();
label6 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
taglabel = new System.Windows.Forms.Label();
label7 = new System.Windows.Forms.Label();
groupBox1.SuspendLayout();
groupBox2.SuspendLayout();
this.tabs.SuspendLayout();
this.tabproperties.SuspendLayout();
this.settingsgroup.SuspendLayout();
this.tabeffects.SuspendLayout();
this.actiongroup.SuspendLayout();
this.hexenpanel.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabcustom.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
groupBox1.Controls.Add(this.sizelabel);
groupBox1.Controls.Add(label4);
groupBox1.Controls.Add(this.blockinglabel);
groupBox1.Controls.Add(label3);
groupBox1.Controls.Add(this.positionlabel);
groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(this.typeid);
groupBox1.Controls.Add(label1);
groupBox1.Controls.Add(this.typelist);
groupBox1.Location = new System.Drawing.Point(6, 6);
groupBox1.Name = "groupBox1";
groupBox1.Size = new System.Drawing.Size(269, 340);
groupBox1.TabIndex = 1;
groupBox1.TabStop = false;
groupBox1.Text = " Thing ";
//
// sizelabel
//
this.sizelabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.sizelabel.AutoSize = true;
this.sizelabel.Location = new System.Drawing.Point(191, 285);
this.sizelabel.Name = "sizelabel";
this.sizelabel.Size = new System.Drawing.Size(43, 14);
this.sizelabel.TabIndex = 8;
this.sizelabel.Text = "16 x 96";
//
// label4
//
label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(157, 285);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(31, 14);
label4.TabIndex = 7;
label4.Text = "Size:";
//
// blockinglabel
//
this.blockinglabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.blockinglabel.AutoSize = true;
this.blockinglabel.Location = new System.Drawing.Point(191, 314);
this.blockinglabel.Name = "blockinglabel";
this.blockinglabel.Size = new System.Drawing.Size(63, 14);
this.blockinglabel.TabIndex = 6;
this.blockinglabel.Text = "True-Height";
//
// label3
//
label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(138, 314);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(50, 14);
label3.TabIndex = 5;
label3.Text = "Blocking:";
//
// positionlabel
//
this.positionlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.positionlabel.AutoSize = true;
this.positionlabel.Location = new System.Drawing.Point(58, 314);
this.positionlabel.Name = "positionlabel";
this.positionlabel.Size = new System.Drawing.Size(38, 14);
this.positionlabel.TabIndex = 4;
this.positionlabel.Text = "Ceiling";
//
// label2
//
label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(8, 314);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(47, 14);
label2.TabIndex = 3;
label2.Text = "Position:";
//
// typeid
//
this.typeid.AllowNegative = false;
this.typeid.AllowRelative = false;
this.typeid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.typeid.ImeMode = System.Windows.Forms.ImeMode.Off;
this.typeid.Location = new System.Drawing.Point(51, 282);
this.typeid.Name = "typeid";
this.typeid.Size = new System.Drawing.Size(68, 20);
this.typeid.TabIndex = 2;
this.typeid.TextChanged += new System.EventHandler(this.typeid_TextChanged);
//
// label1
//
label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(8, 285);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(34, 14);
label1.TabIndex = 1;
label1.Text = "Type:";
//
// typelist
//
this.typelist.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.typelist.HideSelection = false;
this.typelist.ImageIndex = 0;
this.typelist.ImageList = this.thingimages;
this.typelist.Location = new System.Drawing.Point(11, 24);
this.typelist.Margin = new System.Windows.Forms.Padding(8, 8, 9, 8);
this.typelist.Name = "typelist";
treeNode2.Name = "Node0";
treeNode2.Text = "Monsters";
this.typelist.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode2});
this.typelist.SelectedImageIndex = 0;
this.typelist.Size = new System.Drawing.Size(246, 248);
this.typelist.TabIndex = 0;
this.typelist.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.typelist_AfterSelect);
//
// thingimages
//
this.thingimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("thingimages.ImageStream")));
this.thingimages.TransparentColor = System.Drawing.SystemColors.Window;
this.thingimages.Images.SetKeyName(0, "ThingsListIcon.png");
//
// groupBox2
//
groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
groupBox2.Controls.Add(this.height);
groupBox2.Controls.Add(label6);
groupBox2.Controls.Add(label5);
groupBox2.Controls.Add(this.angle);
groupBox2.Controls.Add(this.anglecontrol);
groupBox2.Location = new System.Drawing.Point(397, 241);
groupBox2.Name = "groupBox2";
groupBox2.Size = new System.Drawing.Size(230, 105);
groupBox2.TabIndex = 21;
groupBox2.TabStop = false;
groupBox2.Text = " Coordination ";
//
// height
//
this.height.AllowNegative = true;
this.height.AllowRelative = true;
this.height.ImeMode = System.Windows.Forms.ImeMode.Off;
this.height.Location = new System.Drawing.Point(68, 63);
this.height.Name = "height";
this.height.Size = new System.Drawing.Size(50, 20);
this.height.TabIndex = 10;
//
// label6
//
label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label6.AutoSize = true;
label6.Location = new System.Drawing.Point(12, 66);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(50, 14);
label6.TabIndex = 9;
label6.Text = "Z Height:";
//
// label5
//
label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(24, 31);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(38, 14);
label5.TabIndex = 8;
label5.Text = "Angle:";
//
// angle
//
this.angle.AllowNegative = true;
this.angle.AllowRelative = true;
this.angle.ImeMode = System.Windows.Forms.ImeMode.Off;
this.angle.Location = new System.Drawing.Point(68, 28);
this.angle.Name = "angle";
this.angle.Size = new System.Drawing.Size(50, 20);
this.angle.TabIndex = 1;
this.angle.TextChanged += new System.EventHandler(this.angle_TextChanged);
//
// anglecontrol
//
this.anglecontrol.BackColor = System.Drawing.SystemColors.Control;
this.anglecontrol.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.anglecontrol.Location = new System.Drawing.Point(141, 15);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(80, 80);
this.anglecontrol.TabIndex = 0;
this.anglecontrol.Value = 0;
this.anglecontrol.ButtonClicked += new System.EventHandler(this.anglecontrol_ButtonClicked);
//
// taglabel
//
taglabel.AutoSize = true;
taglabel.Location = new System.Drawing.Point(28, 31);
taglabel.Name = "taglabel";
taglabel.Size = new System.Drawing.Size(28, 14);
taglabel.TabIndex = 6;
taglabel.Text = "Tag:";
//
// label7
//
label7.AutoSize = true;
label7.Location = new System.Drawing.Point(15, 30);
label7.Name = "label7";
label7.Size = new System.Drawing.Size(41, 14);
label7.TabIndex = 9;
label7.Text = "Action:";
//
// tabs
//
this.tabs.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.tabs.Controls.Add(this.tabproperties);
this.tabs.Controls.Add(this.tabeffects);
this.tabs.Controls.Add(this.tabcustom);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.Location = new System.Drawing.Point(10, 10);
this.tabs.Margin = new System.Windows.Forms.Padding(1);
this.tabs.Name = "tabs";
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(641, 379);
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.tabs.TabIndex = 2;
//
// tabproperties
//
this.tabproperties.Controls.Add(this.spritetex);
this.tabproperties.Controls.Add(groupBox2);
this.tabproperties.Controls.Add(this.settingsgroup);
this.tabproperties.Controls.Add(groupBox1);
this.tabproperties.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabproperties.Location = new System.Drawing.Point(4, 23);
this.tabproperties.Name = "tabproperties";
this.tabproperties.Padding = new System.Windows.Forms.Padding(3);
this.tabproperties.Size = new System.Drawing.Size(633, 352);
this.tabproperties.TabIndex = 0;
this.tabproperties.Text = "Properties";
this.tabproperties.UseVisualStyleBackColor = true;
//
// spritetex
//
this.spritetex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.spritetex.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.spritetex.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.spritetex.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.spritetex.Location = new System.Drawing.Point(284, 246);
this.spritetex.Name = "spritetex";
this.spritetex.Size = new System.Drawing.Size(104, 100);
this.spritetex.TabIndex = 22;
//
// settingsgroup
//
this.settingsgroup.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.settingsgroup.Controls.Add(this.flags);
this.settingsgroup.Location = new System.Drawing.Point(284, 6);
this.settingsgroup.Name = "settingsgroup";
this.settingsgroup.Size = new System.Drawing.Size(343, 229);
this.settingsgroup.TabIndex = 0;
this.settingsgroup.TabStop = false;
this.settingsgroup.Text = " Settings ";
//
// flags
//
this.flags.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.flags.AutoScroll = true;
this.flags.Columns = 2;
this.flags.Location = new System.Drawing.Point(18, 26);
this.flags.Name = "flags";
this.flags.Size = new System.Drawing.Size(319, 196);
this.flags.TabIndex = 0;
//
// tabeffects
//
this.tabeffects.Controls.Add(this.actiongroup);
this.tabeffects.Controls.Add(this.groupBox3);
this.tabeffects.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabeffects.Location = new System.Drawing.Point(4, 23);
this.tabeffects.Name = "tabeffects";
this.tabeffects.Padding = new System.Windows.Forms.Padding(3);
this.tabeffects.Size = new System.Drawing.Size(633, 352);
this.tabeffects.TabIndex = 1;
this.tabeffects.Text = "Effects";
this.tabeffects.UseVisualStyleBackColor = true;
//
// actiongroup
//
this.actiongroup.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.actiongroup.Controls.Add(this.hexenpanel);
this.actiongroup.Controls.Add(label7);
this.actiongroup.Controls.Add(this.action);
this.actiongroup.Controls.Add(this.browseaction);
this.actiongroup.Controls.Add(this.doompanel);
this.actiongroup.Location = new System.Drawing.Point(6, 78);
this.actiongroup.Name = "actiongroup";
this.actiongroup.Size = new System.Drawing.Size(621, 268);
this.actiongroup.TabIndex = 22;
this.actiongroup.TabStop = false;
this.actiongroup.Text = " Action ";
//
// hexenpanel
//
this.hexenpanel.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.hexenpanel.Controls.Add(this.arg3);
this.hexenpanel.Controls.Add(this.arg2);
this.hexenpanel.Controls.Add(this.arg4);
this.hexenpanel.Controls.Add(this.arg1);
this.hexenpanel.Controls.Add(this.arg0);
this.hexenpanel.Controls.Add(this.arg1label);
this.hexenpanel.Controls.Add(this.arg0label);
this.hexenpanel.Controls.Add(this.arg3label);
this.hexenpanel.Controls.Add(this.arg2label);
this.hexenpanel.Controls.Add(this.arg4label);
this.hexenpanel.Location = new System.Drawing.Point(6, 53);
this.hexenpanel.Name = "hexenpanel";
this.hexenpanel.Size = new System.Drawing.Size(609, 208);
this.hexenpanel.TabIndex = 13;
//
// arg3
//
this.arg3.AllowNegative = false;
this.arg3.AllowRelative = true;
this.arg3.ImeMode = System.Windows.Forms.ImeMode.Off;
this.arg3.Location = new System.Drawing.Point(388, 13);
this.arg3.Name = "arg3";
this.arg3.Size = new System.Drawing.Size(50, 20);
this.arg3.TabIndex = 21;
//
// arg2
//
this.arg2.AllowNegative = false;
this.arg2.AllowRelative = true;
this.arg2.ImeMode = System.Windows.Forms.ImeMode.Off;
this.arg2.Location = new System.Drawing.Point(178, 65);
this.arg2.Name = "arg2";
this.arg2.Size = new System.Drawing.Size(50, 20);
this.arg2.TabIndex = 19;
//
// arg4
//
this.arg4.AllowNegative = false;
this.arg4.AllowRelative = true;
this.arg4.ImeMode = System.Windows.Forms.ImeMode.Off;
this.arg4.Location = new System.Drawing.Point(388, 39);
this.arg4.Name = "arg4";
this.arg4.Size = new System.Drawing.Size(50, 20);
this.arg4.TabIndex = 17;
//
// arg1
//
this.arg1.AllowNegative = false;
this.arg1.AllowRelative = true;
this.arg1.ImeMode = System.Windows.Forms.ImeMode.Off;
this.arg1.Location = new System.Drawing.Point(178, 39);
this.arg1.Name = "arg1";
this.arg1.Size = new System.Drawing.Size(50, 20);
this.arg1.TabIndex = 15;
//
// arg0
//
this.arg0.AllowNegative = false;
this.arg0.AllowRelative = true;
this.arg0.ImeMode = System.Windows.Forms.ImeMode.Off;
this.arg0.Location = new System.Drawing.Point(178, 13);
this.arg0.Name = "arg0";
this.arg0.Size = new System.Drawing.Size(50, 20);
this.arg0.TabIndex = 13;
//
// arg1label
//
this.arg1label.Location = new System.Drawing.Point(-7, 42);
this.arg1label.Name = "arg1label";
this.arg1label.Size = new System.Drawing.Size(179, 14);
this.arg1label.TabIndex = 14;
this.arg1label.Text = "Argument 2:";
this.arg1label.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.arg1label.UseMnemonic = false;
//
// arg0label
//
this.arg0label.Location = new System.Drawing.Point(-7, 16);
this.arg0label.Name = "arg0label";
this.arg0label.Size = new System.Drawing.Size(179, 14);
this.arg0label.TabIndex = 12;
this.arg0label.Text = "Argument 1:";
this.arg0label.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.arg0label.UseMnemonic = false;
//
// arg3label
//
this.arg3label.Location = new System.Drawing.Point(203, 16);
this.arg3label.Name = "arg3label";
this.arg3label.Size = new System.Drawing.Size(179, 14);
this.arg3label.TabIndex = 20;
this.arg3label.Text = "Argument 4:";
this.arg3label.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.arg3label.UseMnemonic = false;
//
// arg2label
//
this.arg2label.Location = new System.Drawing.Point(-7, 68);
this.arg2label.Name = "arg2label";
this.arg2label.Size = new System.Drawing.Size(179, 14);
this.arg2label.TabIndex = 18;
this.arg2label.Text = "Argument 3:";
this.arg2label.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.arg2label.UseMnemonic = false;
//
// arg4label
//
this.arg4label.Location = new System.Drawing.Point(203, 42);
this.arg4label.Name = "arg4label";
this.arg4label.Size = new System.Drawing.Size(179, 14);
this.arg4label.TabIndex = 16;
this.arg4label.Text = "Argument 5:";
this.arg4label.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.arg4label.UseMnemonic = false;
//
// action
//
this.action.BackColor = System.Drawing.SystemColors.Control;
this.action.Cursor = System.Windows.Forms.Cursors.Default;
this.action.Empty = false;
this.action.GeneralizedCategories = null;
this.action.Location = new System.Drawing.Point(62, 27);
this.action.Name = "action";
this.action.Size = new System.Drawing.Size(401, 21);
this.action.TabIndex = 5;
this.action.Value = 402;
this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges);
//
// browseaction
//
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseaction.Location = new System.Drawing.Point(469, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(30, 23);
this.browseaction.TabIndex = 3;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
//
// doompanel
//
this.doompanel.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.doompanel.Location = new System.Drawing.Point(6, 54);
this.doompanel.Name = "doompanel";
this.doompanel.Size = new System.Drawing.Size(609, 208);
this.doompanel.TabIndex = 12;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.tag);
this.groupBox3.Controls.Add(taglabel);
this.groupBox3.Controls.Add(this.newtag);
this.groupBox3.Location = new System.Drawing.Point(6, 6);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(621, 66);
this.groupBox3.TabIndex = 21;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Identification ";
//
// tag
//
this.tag.AllowNegative = false;
this.tag.AllowRelative = true;
this.tag.ImeMode = System.Windows.Forms.ImeMode.Off;
this.tag.Location = new System.Drawing.Point(62, 28);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(68, 20);
this.tag.TabIndex = 7;
//
// newtag
//
this.newtag.Location = new System.Drawing.Point(136, 27);
this.newtag.Name = "newtag";
this.newtag.Size = new System.Drawing.Size(76, 23);
this.newtag.TabIndex = 8;
this.newtag.Text = "New Tag";
this.newtag.UseVisualStyleBackColor = true;
this.newtag.Click += new System.EventHandler(this.newtag_Click);
//
// tabcustom
//
this.tabcustom.Controls.Add(this.fieldslist);
this.tabcustom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabcustom.Location = new System.Drawing.Point(4, 23);
this.tabcustom.Name = "tabcustom";
this.tabcustom.Size = new System.Drawing.Size(633, 352);
this.tabcustom.TabIndex = 2;
this.tabcustom.Text = "Custom";
this.tabcustom.UseVisualStyleBackColor = true;
//
// fieldslist
//
this.fieldslist.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.fieldslist.Location = new System.Drawing.Point(8, 9);
this.fieldslist.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
this.fieldslist.Name = "fieldslist";
this.fieldslist.Size = new System.Drawing.Size(617, 334);
this.fieldslist.TabIndex = 1;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(539, 406);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 19;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(420, 406);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 18;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// ThingEditForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(661, 441);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.tabs);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ThingEditForm";
this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Thing";
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
groupBox2.ResumeLayout(false);
groupBox2.PerformLayout();
this.tabs.ResumeLayout(false);
this.tabproperties.ResumeLayout(false);
this.settingsgroup.ResumeLayout(false);
this.tabeffects.ResumeLayout(false);
this.actiongroup.ResumeLayout(false);
this.actiongroup.PerformLayout();
this.hexenpanel.ResumeLayout(false);
this.hexenpanel.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.tabcustom.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabs;
private System.Windows.Forms.TabPage tabproperties;
private System.Windows.Forms.TabPage tabeffects;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.TreeView typelist;
private System.Windows.Forms.ImageList thingimages;
private System.Windows.Forms.TabPage tabcustom;
private System.Windows.Forms.Label positionlabel;
private NumericTextbox typeid;
private System.Windows.Forms.Label blockinglabel;
private System.Windows.Forms.Label sizelabel;
private System.Windows.Forms.GroupBox settingsgroup;
private CheckboxArrayControl flags;
private System.Windows.Forms.Panel spritetex;
private AngleControl anglecontrol;
private NumericTextbox height;
private NumericTextbox angle;
private System.Windows.Forms.GroupBox groupBox3;
private NumericTextbox tag;
private System.Windows.Forms.Button newtag;
private System.Windows.Forms.GroupBox actiongroup;
private System.Windows.Forms.Panel hexenpanel;
private NumericTextbox arg3;
private NumericTextbox arg2;
private NumericTextbox arg4;
private NumericTextbox arg1;
private NumericTextbox arg0;
private System.Windows.Forms.Label arg1label;
private System.Windows.Forms.Label arg0label;
private System.Windows.Forms.Label arg3label;
private System.Windows.Forms.Label arg2label;
private System.Windows.Forms.Label arg4label;
private ActionSelectorControl action;
private System.Windows.Forms.Button browseaction;
private System.Windows.Forms.Panel doompanel;
private FieldsEditorControl fieldslist;
}
}

View file

@ -0,0 +1,349 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.IO;
using System.IO;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
#endregion
namespace CodeImp.DoomBuilder.Interface
{
public partial class ThingEditForm : DelayedForm
{
#region ================== Variables
private ICollection<Thing> things;
private List<TreeNode> nodes;
#endregion
#region ================== Properties
#endregion
#region ================== Constructor
// Constructor
public ThingEditForm()
{
// Initialize
InitializeComponent();
// Fill flags list
foreach(KeyValuePair<int, string> tf in General.Map.Config.ThingFlags) flags.Add(tf.Value, tf.Key);
// Fill actions list
action.GeneralizedCategories = General.Map.Config.GenActionCategories;
action.AddInfo(General.Map.Config.SortedLinedefActions.ToArray());
// Go for all predefined categories
typelist.Nodes.Clear();
nodes = new List<TreeNode>();
foreach(ThingCategory tc in General.Map.Config.ThingCategories)
{
// Create category
TreeNode cn = typelist.Nodes.Add(tc.Name, tc.Title);
foreach(ThingTypeInfo ti in tc.Things)
{
// Create thing
TreeNode n = cn.Nodes.Add(ti.Title);
n.Tag = ti;
nodes.Add(n);
}
}
}
// This sets up the form to edit the given things
public void Setup(ICollection<Thing> things)
{
Thing ft;
int angledeg;
// Keep this list
this.things = things;
if(things.Count > 1) this.Text = "Edit Things (" + things.Count + ")";
////////////////////////////////////////////////////////////////////////
// Set all options to the first thing properties
////////////////////////////////////////////////////////////////////////
ft = General.GetByIndex<Thing>(things, 0);
// Set type index
typeid.Text = ft.Type.ToString();
// Select node
typelist.SelectedNode = null;
foreach(TreeNode n in nodes)
{
// Matching node?
if((n.Tag as ThingTypeInfo).Index == ft.Type)
{
// Select this
n.Parent.Expand();
typelist.SelectedNode = n;
n.EnsureVisible();
}
}
// Flags
foreach(CheckBox c in flags.Checkboxes)
c.Checked = (ft.Flags & (int)c.Tag) != 0;
// Coordination
angledeg = ft.AngleDeg - 90;
if(angledeg < 0) angledeg += 360;
if(angledeg >= 360) angledeg -= 360;
angle.Text = angledeg.ToString();
height.Text = ft.ZOffset.ToString();
// Action/tags
action.Value = ft.Action;
tag.Text = ft.Tag.ToString();
arg0.Text = ft.Args[0].ToString();
arg1.Text = ft.Args[1].ToString();
arg2.Text = ft.Args[2].ToString();
arg3.Text = ft.Args[3].ToString();
arg4.Text = ft.Args[4].ToString();
////////////////////////////////////////////////////////////////////////
// Now go for all lines and change the options when a setting is different
////////////////////////////////////////////////////////////////////////
// Go for all things
foreach(Thing t in things)
{
// Selected node does not match?
if((typelist.SelectedNode != null) &&
((typelist.SelectedNode.Tag as ThingTypeInfo).Index != t.Type))
typelist.SelectedNode = null;
// Type index
if(t.Type.ToString() != typeid.Text) typeid.Text = "";
// Flags
foreach(CheckBox c in flags.Checkboxes)
{
if(((t.Flags & (int)c.Tag) != 0) != c.Checked)
{
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
// Coordination
angledeg = t.AngleDeg - 90;
if(angledeg < 0) angledeg += 360;
if(angledeg >= 360) angledeg -= 360;
if(angledeg.ToString() != angle.Text) angle.Text = "";
if(t.ZOffset.ToString() != height.Text) height.Text = "";
// Action/tags
if(t.Action != action.Value) action.Empty = true;
if(t.Tag.ToString() != tag.Text) tag.Text = "";
if(t.Args[0].ToString() != arg0.Text) arg0.Text = "";
if(t.Args[1].ToString() != arg1.Text) arg1.Text = "";
if(t.Args[2].ToString() != arg2.Text) arg2.Text = "";
if(t.Args[3].ToString() != arg3.Text) arg3.Text = "";
if(t.Args[4].ToString() != arg4.Text) arg4.Text = "";
}
}
#endregion
#region ================== Interface
// This finds a new (unused) tag
private void newtag_Click(object sender, EventArgs e)
{
tag.Text = General.Map.Map.GetNewTag().ToString();
}
// Action changes
private void action_ValueChanges(object sender, EventArgs e)
{
int showaction = 0;
// Only when line type is known
if(General.Map.Config.LinedefActions.ContainsKey(action.Value)) showaction = action.Value;
// Change the argument descriptions
arg0label.Text = General.Map.Config.LinedefActions[showaction].ArgTitle[0] + ":";
arg1label.Text = General.Map.Config.LinedefActions[showaction].ArgTitle[1] + ":";
arg2label.Text = General.Map.Config.LinedefActions[showaction].ArgTitle[2] + ":";
arg3label.Text = General.Map.Config.LinedefActions[showaction].ArgTitle[3] + ":";
arg4label.Text = General.Map.Config.LinedefActions[showaction].ArgTitle[4] + ":";
arg0label.Enabled = General.Map.Config.LinedefActions[showaction].ArgUsed[0];
arg1label.Enabled = General.Map.Config.LinedefActions[showaction].ArgUsed[1];
arg2label.Enabled = General.Map.Config.LinedefActions[showaction].ArgUsed[2];
arg3label.Enabled = General.Map.Config.LinedefActions[showaction].ArgUsed[3];
arg4label.Enabled = General.Map.Config.LinedefActions[showaction].ArgUsed[4];
if(arg0label.Enabled) arg0.ForeColor = SystemColors.WindowText; else arg0.ForeColor = SystemColors.GrayText;
if(arg1label.Enabled) arg1.ForeColor = SystemColors.WindowText; else arg1.ForeColor = SystemColors.GrayText;
if(arg2label.Enabled) arg2.ForeColor = SystemColors.WindowText; else arg2.ForeColor = SystemColors.GrayText;
if(arg3label.Enabled) arg3.ForeColor = SystemColors.WindowText; else arg3.ForeColor = SystemColors.GrayText;
if(arg4label.Enabled) arg4.ForeColor = SystemColors.WindowText; else arg4.ForeColor = SystemColors.GrayText;
}
// Browse Action clicked
private void browseaction_Click(object sender, EventArgs e)
{
action.Value = ActionBrowserForm.BrowseAction(this, action.Value);
}
// Angle text changes
private void angle_TextChanged(object sender, EventArgs e)
{
anglecontrol.Value = angle.GetResult(int.MinValue);
}
// Angle control clicked
private void anglecontrol_ButtonClicked(object sender, EventArgs e)
{
angle.Text = anglecontrol.Value.ToString();
}
// Thing type selection changed
private void typelist_AfterSelect(object sender, TreeViewEventArgs e)
{
// Anything selected?
if(typelist.SelectedNode != null)
{
TreeNode n = typelist.SelectedNode;
// Node is a child node?
if((n.Nodes.Count == 0) && (n.Tag != null) && (n.Tag is ThingTypeInfo))
{
ThingTypeInfo ti = (n.Tag as ThingTypeInfo);
// Show info
typeid.Text = ti.Index.ToString();
}
}
}
// Thing type index changed
private void typeid_TextChanged(object sender, EventArgs e)
{
bool knownthing = false;
// Any text?
if(typeid.Text.Length > 0)
{
// Get the info
ThingTypeInfo ti = General.Map.Config.GetThingInfoEx(typeid.GetResult(0));
if(ti != null)
{
knownthing = true;
// Size
sizelabel.Text = ti.Width + " x " + ti.Height;
// Hangs from ceiling
if(ti.Hangs) positionlabel.Text = "Ceiling"; else positionlabel.Text = "Floor";
// Blocking
switch(ti.Blocking)
{
case ThingTypeInfo.THING_BLOCKING_NONE: blockinglabel.Text = "No"; break;
case ThingTypeInfo.THING_BLOCKING_FULL: blockinglabel.Text = "Completely"; break;
case ThingTypeInfo.THING_BLOCKING_HEIGHT: blockinglabel.Text = "True-Height"; break;
default: blockinglabel.Text = "Unknown"; break;
}
// Show image
General.DisplayZoomedImage(spritetex, General.Map.Data.GetSpriteBitmap(ti.Sprite));
}
}
// No known thing?
if(!knownthing)
{
sizelabel.Text = "-";
positionlabel.Text = "-";
blockinglabel.Text = "-";
General.DisplayZoomedImage(spritetex, null);
}
}
// Apply clicked
private void apply_Click(object sender, EventArgs e)
{
string undodesc = "thing";
// Make undo
if(things.Count > 1) undodesc = things.Count + " things";
General.Map.UndoRedo.CreateUndo("Edit " + undodesc, UndoGroup.None, 0);
// Go for all the things
foreach(Thing t in things)
{
// Thing type index
t.Type = typeid.GetResult(t.Type);
// Coordination
t.Rotate(Angle2D.DegToRad((float)(angle.GetResult(t.AngleDeg - 90) + 90)));
t.ZOffset = height.GetResult(t.ZOffset);
// Apply all flags
foreach(CheckBox c in flags.Checkboxes)
{
if(c.CheckState == CheckState.Checked) t.Flags |= (int)c.Tag;
else if(c.CheckState == CheckState.Unchecked) t.Flags &= ~(int)c.Tag;
}
// Action/tags
if(!action.Empty) t.Action = action.Value;
t.Tag = tag.GetResult(t.Tag);
t.Args[0] = (byte)arg0.GetResult(t.Args[0]);
t.Args[1] = (byte)arg1.GetResult(t.Args[1]);
t.Args[2] = (byte)arg2.GetResult(t.Args[2]);
t.Args[3] = (byte)arg3.GetResult(t.Args[3]);
t.Args[4] = (byte)arg4.GetResult(t.Args[4]);
// Update settings
t.UpdateConfiguration();
}
// Done
this.DialogResult = DialogResult.OK;
this.Close();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Be gone
this.DialogResult = DialogResult.Cancel;
this.Close();
}
#endregion
}
}

View file

@ -0,0 +1,334 @@
<?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>
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="sizelabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="blockinglabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="positionlabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typeid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typelist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sizelabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="blockinglabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="positionlabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typeid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typelist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="thingimages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="thingimages.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ
BAAAAk1TRnQBSQFMAwEBAAEEAQABBAEAARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAMA
ARADAAEBAQABIAYAARAqAAEEAgEBBAEUAgEBGQEUAgEBGQEUAgEBGQECAwHkAAEwAgEBSgOFAf8DfAH/
A3QB/wNyAf8DbgH/A2UB/wEwAgEBSgEUAgEBGdgAAW4CGwHnA5cB/wOXAf8DlQH/A5MB/wOSAf8DjQH/
A4EB/wN0Af8BYQIIAdsBFAIBARnQAAFnAg8B3AOsAf8DsgH/A7YB/wO1Af8DtAH/A7QB/wOxAf8DqwH/
A5YB/wN9Af8BYQIIAdsBFAIBARnIAAEwAgEBSgOuAf8DtgH/A70B/wO9Af8DvQH/A70B/wO3Af8DuQH/
A7EB/wOOAf8DkgH/A3sB/wEwAgEBSsgAA7YB/wO7Af8DvQH/A70B/wO9Af8DvAH/A7gB/wOeAf8DdwH/
AzwB/wMJAf8DkQH/A40B/wNwAf8BAgMBxAADvgH/A8cB/wO+Af8DvQH/A6QB/wOBAf8DSgH/Aw4B/wMJ
Af8DCQH/AzIB/wOvAf8DnwH/A4EB/wEUAgEBGcAAAQsCAQENA8UB/wPOAf8DwQH/A70B/wOJAf8DawH/
AyQB/wMJAf8DCQH/AwkB/wN7Af8DugH/A6oB/wOEAf8BFAIBARnAAAELAgEBDQPJAf8D0QH/A8EB/wO9
Af8DvAH/A7wB/wNZAf8DCQH/AwkB/wMVAf8DowH/A7UB/wOwAf8DhwH/ARQCAQEZxAADyAH/A9YB/wPI
Af8DugH/A7cB/wNkAf8DCQH/A3oB/wMXAf8DWQH/A7sB/wO9Af8DrQH/A4cB/wEJAgEBCsQAA8QB/wPZ
Af8D0wH/A74B/wNkAf8DCQH/A4YB/wO/Af8DVQH/A4kB/wO+Af8DvQH/A6wB/wONAf/IAAEwAgEBSgPa
Af8D3AH/A50B/wMOAf8DiAH/A74B/wO7Af8DnAH/A7EB/wO9Af8DvQH/A64B/wEwAgEBSswAAWACBQHK
A98B/wPBAf8DqQH/A8gB/wPBAf8DwAH/A70B/wO9Af8DvQH/A70B/wFwAiIB6NQAAWACBQHJA9wB/wPZ
Af8D1AH/A8wB/wPDAf8DvgH/A7oB/wO5Af8BZgIOAdvcAAEwAgEBSgPLAf8DzgH/A9EB/wPMAf8DxAH/
A7kB/wEwAgEBSuwAAQsCAQENAQsCAQEN3AABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGA
FwAD/wEAAfwBHwYAAfABBwYAAeABAwYAAcABAQYAAYABAQYAAYAHAAGAFwABgAcAAYABAQYAAYABAQYA
AcABAwYAAeABBwYAAfABDwYAAf4BfwYACw==
</value>
</data>
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="height.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<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>
<metadata name="angle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="anglecontrol.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="height.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<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>
<metadata name="angle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="anglecontrol.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="taglabel.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabeffects.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabproperties.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>
<metadata name="settingsgroup.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>
<metadata name="settingsgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabeffects.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -81,13 +81,13 @@ namespace CodeImp.DoomBuilder.Map
#region ================== Properties
public MapSet Map { get { return map; } }
public int Type { get { return type; } }
public int Type { get { return type; } set { type = value; } }
public Vector3D Position { get { return pos; } }
public bool IsDisposed { get { return isdisposed; } }
public float Angle { get { return angle; } }
public int AngleDeg { get { return (int)(angle * Angle2D.PIDEG); } }
public int Flags { get { return flags; } }
public int Action { get { return action; } }
public int AngleDeg { get { return (int)Angle2D.RadToDeg(angle); } }
public int Flags { get { return flags; } set { flags = value; } }
public int Action { get { return action; } set { action = value; } }
public byte[] Args { get { return args; } }
public bool Selected { get { return selected; } set { selected = value; } }
public bool Marked { get { return marked; } set { marked = value; } }
@ -96,7 +96,7 @@ namespace CodeImp.DoomBuilder.Map
public PixelColor Color { get { return color; } }
public int X { get { return x; } }
public int Y { get { return y; } }
public int ZOffset { get { return zoffset; } }
public int ZOffset { get { return zoffset; } set { zoffset = value; } }
public int Tag { get { return tag; } set { tag = value; if((tag < 0) || (tag > MapSet.HIGHEST_TAG)) throw new ArgumentOutOfRangeException("Tag", "Invalid tag number"); } }
public Sector Sector { get { return sector; } }
public SortedList<string, object> Fields { get { return fields; } }