diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj
index 437cbe2d562ab347e5f4eabec955a6d8c4d10654..946383728afce32a4e6bc65ff9873a9e42b30ab6 100644
--- a/Source/Core/Builder.csproj
+++ b/Source/Core/Builder.csproj
@@ -697,6 +697,18 @@
     <Compile Include="General\ErrorLogger.cs" />
     <Compile Include="General\SavePurpose.cs" />
     <Compile Include="Geometry\CurveTools.cs" />
+    <Compile Include="GZBuilder\Controls\AngleControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GZBuilder\Controls\AngleControl.Designer.cs">
+      <DependentUpon>AngleControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="GZBuilder\Controls\ColorFieldsControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GZBuilder\Controls\ColorFieldsControl.Designer.cs">
+      <DependentUpon>ColorFieldsControl.cs</DependentUpon>
+    </Compile>
     <Compile Include="GZBuilder\Controls\CustomLinedefColorProperties.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -709,12 +721,6 @@
     <Compile Include="GZBuilder\Controls\CustomLinedefColorsControl.designer.cs">
       <DependentUpon>CustomLinedefColorsControl.cs</DependentUpon>
     </Compile>
-    <Compile Include="GZBuilder\Controls\FloatFieldsSlider.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="GZBuilder\Controls\FloatFieldsSlider.designer.cs">
-      <DependentUpon>FloatFieldsSlider.cs</DependentUpon>
-    </Compile>
     <Compile Include="GZBuilder\Controls\IconListBox.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -724,6 +730,12 @@
     <Compile Include="GZBuilder\Controls\PairedFieldsControl.Designer.cs">
       <DependentUpon>PairedFieldsControl.cs</DependentUpon>
     </Compile>
+    <Compile Include="GZBuilder\Controls\PairedIntControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GZBuilder\Controls\PairedIntControl.Designer.cs">
+      <DependentUpon>PairedIntControl.cs</DependentUpon>
+    </Compile>
     <Compile Include="GZBuilder\Controls\TagSelector.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -804,6 +816,12 @@
     <Compile Include="Windows\ScriptFindReplaceForm.Designer.cs">
       <DependentUpon>ScriptFindReplaceForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Windows\SectorEditFormUDMF.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Windows\SectorEditFormUDMF.Designer.cs">
+      <DependentUpon>SectorEditFormUDMF.cs</DependentUpon>
+    </Compile>
     <Compile Include="Windows\SetDefaultTexturesForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -845,18 +863,24 @@
       <SubType>Designer</SubType>
       <DependentUpon>ThingBrowserControl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="GZBuilder\Controls\AngleControl.resx">
+      <DependentUpon>AngleControl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="GZBuilder\Controls\ColorFieldsControl.resx">
+      <DependentUpon>ColorFieldsControl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="GZBuilder\Controls\CustomLinedefColorProperties.resx">
       <DependentUpon>CustomLinedefColorProperties.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="GZBuilder\Controls\CustomLinedefColorsControl.resx">
       <DependentUpon>CustomLinedefColorsControl.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="GZBuilder\Controls\FloatFieldsSlider.resx">
-      <DependentUpon>FloatFieldsSlider.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="GZBuilder\Controls\PairedFieldsControl.resx">
       <DependentUpon>PairedFieldsControl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="GZBuilder\Controls\PairedIntControl.resx">
+      <DependentUpon>PairedIntControl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="GZBuilder\Controls\TagSelector.resx">
       <DependentUpon>TagSelector.cs</DependentUpon>
     </EmbeddedResource>
@@ -1022,6 +1046,9 @@
       <SubType>Designer</SubType>
       <DependentUpon>ScriptFindReplaceForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Windows\SectorEditFormUDMF.resx">
+      <DependentUpon>SectorEditFormUDMF.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Windows\SetDefaultTexturesForm.resx">
       <DependentUpon>SetDefaultTexturesForm.cs</DependentUpon>
     </EmbeddedResource>
diff --git a/Source/Core/GZBuilder/Controls/AngleControl.Designer.cs b/Source/Core/GZBuilder/Controls/AngleControl.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..b50e95da32854cc8527b368d6ef21996b69f1805
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/AngleControl.Designer.cs
@@ -0,0 +1,46 @@
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	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.SuspendLayout();
+			// 
+			// AngleControl
+			// 
+			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.Name = "AngleControl";
+			this.Size = new System.Drawing.Size(40, 40);
+			this.Load += new System.EventHandler(this.AngleSelector_Load);
+			this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseMove);
+			this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.AngleSelector_MouseDown);
+			this.SizeChanged += new System.EventHandler(this.AngleSelector_SizeChanged);
+			this.ResumeLayout(false);
+
+		}
+
+		#endregion
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/AngleControl.cs b/Source/Core/GZBuilder/Controls/AngleControl.cs
new file mode 100644
index 0000000000000000000000000000000000000000..e12f1359b943d561f90b61d1348aa7259b0a6da4
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/AngleControl.cs
@@ -0,0 +1,180 @@
+//Downloaded from
+//Visual C# Kicks - http://vckicks.110mb.com
+//The Code Project - http://www.codeproject.com
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	public partial class AngleControl : UserControl
+	{
+		private int angle;
+
+        private Rectangle drawRegion;
+        private Point origin;
+
+		public AngleControl()
+        {
+            InitializeComponent();
+            this.DoubleBuffered = true;
+        }
+
+        private void AngleSelector_Load(object sender, EventArgs e)
+        {
+            setDrawRegion();
+        }
+
+        private void AngleSelector_SizeChanged(object sender, EventArgs e)
+        {
+            this.Height = this.Width; //Keep it a square
+            setDrawRegion();
+        }
+
+        private void setDrawRegion()
+        {
+            drawRegion = new Rectangle(0, 0, this.Width, this.Height);
+            drawRegion.X += 2;
+            drawRegion.Y += 2;
+            drawRegion.Width -= 4;
+            drawRegion.Height -= 4;
+
+            int offset = 2;
+            origin = new Point(drawRegion.Width / 2 + offset, drawRegion.Height / 2 + offset);
+
+            this.Refresh();
+        }
+
+        public int Angle
+        {
+            get { return angle; }
+            set
+            {
+                angle = value;
+                this.Refresh();
+            }
+        }
+
+        public delegate void AngleChangedDelegate();
+        public event AngleChangedDelegate AngleChanged;
+
+        private PointF DegreesToXY(float degrees, float radius, Point origin)
+        {
+            PointF xy = new PointF();
+            double radians = degrees * Math.PI / 180.0;
+
+            xy.X = (float)Math.Cos(radians) * radius + origin.X;
+            xy.Y = (float)Math.Sin(-radians) * radius + origin.Y;
+
+            return xy;
+        }
+
+        private float XYToDegrees(Point xy, Point origin)
+        {
+            double angle = 0.0;
+
+            if (xy.Y < origin.Y)
+            {
+                if (xy.X > origin.X)
+                {
+                    angle = (double)(xy.X - origin.X) / (double)(origin.Y - xy.Y);
+                    angle = Math.Atan(angle);
+                    angle = 90.0 - angle * 180.0 / Math.PI;
+                }
+                else if (xy.X < origin.X)
+                {
+                    angle = (double)(origin.X - xy.X) / (double)(origin.Y - xy.Y);
+                    angle = Math.Atan(-angle);
+                    angle = 90.0 - angle * 180.0 / Math.PI;
+                }
+            }
+            else if (xy.Y > origin.Y)
+            {
+                if (xy.X > origin.X)
+                {
+                    angle = (double)(xy.X - origin.X) / (double)(xy.Y - origin.Y);
+                    angle = Math.Atan(-angle);
+                    angle = 270.0 - angle * 180.0 / Math.PI;
+                }
+                else if (xy.X < origin.X)
+                {
+                    angle = (double)(origin.X - xy.X) / (double)(xy.Y - origin.Y);
+                    angle = Math.Atan(angle);
+                    angle = 270.0 - angle * 180.0 / Math.PI;
+                }
+            }
+
+            if (angle > 180) angle -= 360; //Optional. Keeps values between -180 and 180
+            return (float)angle;
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            Graphics g = e.Graphics;
+
+            Pen outline = new Pen(Color.FromArgb(86, 103, 141), 2.0f);
+            SolidBrush fill = new SolidBrush(Color.FromArgb(90, 255, 255, 255));
+
+            PointF anglePoint = DegreesToXY(angle, origin.X - 2, origin);
+            Rectangle originSquare = new Rectangle(origin.X - 1, origin.Y - 1, 3, 3);
+
+            //Draw
+            g.SmoothingMode = SmoothingMode.AntiAlias;
+            g.DrawEllipse(outline, drawRegion);
+            g.FillEllipse(fill, drawRegion);
+            g.DrawLine(Pens.Black, origin, anglePoint);
+
+            g.SmoothingMode = SmoothingMode.HighSpeed; //Make the square edges sharp
+            g.FillRectangle(Brushes.Black, originSquare);
+
+            fill.Dispose();
+            outline.Dispose();
+
+            base.OnPaint(e);
+        }
+
+        private void AngleSelector_MouseDown(object sender, MouseEventArgs e)
+        {
+            int thisAngle = findNearestAngle(new Point(e.X, e.Y));
+
+            if (thisAngle != -1)
+            {
+                this.Angle = thisAngle;
+				if(!this.DesignMode && AngleChanged != null)
+					AngleChanged(); //Raise event
+                this.Refresh();
+            }
+        }
+
+        private void AngleSelector_MouseMove(object sender, MouseEventArgs e)
+        {
+            if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
+            {
+                int thisAngle = findNearestAngle(new Point(e.X, e.Y));
+
+                if (thisAngle != -1)
+                {
+                    this.Angle = thisAngle;
+					if(!this.DesignMode && AngleChanged != null)
+						AngleChanged(); //Raise event
+                    this.Refresh();
+                }
+            }
+        }
+
+        private int findNearestAngle(Point mouseXY)
+        {
+            int thisAngle = (int)XYToDegrees(mouseXY, origin);
+            if (thisAngle != 0)
+                return thisAngle;
+            else
+                return -1;
+        }
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/FloatFieldsSlider.resx b/Source/Core/GZBuilder/Controls/AngleControl.resx
similarity index 100%
rename from Source/Core/GZBuilder/Controls/FloatFieldsSlider.resx
rename to Source/Core/GZBuilder/Controls/AngleControl.resx
diff --git a/Source/Core/GZBuilder/Controls/ColorFieldsControl.Designer.cs b/Source/Core/GZBuilder/Controls/ColorFieldsControl.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..14a7786e978d9673833691b3a2127665d2ea5e00
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/ColorFieldsControl.Designer.cs
@@ -0,0 +1,85 @@
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	partial class ColorFieldsControl
+	{
+		/// <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.bReset = new System.Windows.Forms.Button();
+			this.tbColor = new System.Windows.Forms.TextBox();
+			this.cpColor = new CodeImp.DoomBuilder.Controls.ColorControl();
+			this.SuspendLayout();
+			// 
+			// bReset
+			// 
+			this.bReset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
+			this.bReset.Location = new System.Drawing.Point(179, 3);
+			this.bReset.Name = "bReset";
+			this.bReset.Size = new System.Drawing.Size(23, 23);
+			this.bReset.TabIndex = 43;
+			this.bReset.UseVisualStyleBackColor = true;
+			this.bReset.Visible = false;
+			this.bReset.Click += new System.EventHandler(this.bReset_Click);
+			// 
+			// tbColor
+			// 
+			this.tbColor.Location = new System.Drawing.Point(109, 5);
+			this.tbColor.Name = "tbColor";
+			this.tbColor.Size = new System.Drawing.Size(64, 20);
+			this.tbColor.TabIndex = 44;
+			this.tbColor.TextChanged += new System.EventHandler(this.tbColor_TextChanged);
+			// 
+			// cpColor
+			// 
+			this.cpColor.BackColor = System.Drawing.Color.Transparent;
+			this.cpColor.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.cpColor.Label = "Light:";
+			this.cpColor.Location = new System.Drawing.Point(3, 3);
+			this.cpColor.MaximumSize = new System.Drawing.Size(10000, 23);
+			this.cpColor.MinimumSize = new System.Drawing.Size(100, 23);
+			this.cpColor.Name = "cpColor";
+			this.cpColor.Size = new System.Drawing.Size(100, 23);
+			this.cpColor.TabIndex = 41;
+			this.cpColor.ColorChanged += new System.EventHandler(this.cpColor_ColorChanged);
+			// 
+			// ColorFieldsControl
+			// 
+			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.Controls.Add(this.tbColor);
+			this.Controls.Add(this.bReset);
+			this.Controls.Add(this.cpColor);
+			this.Name = "ColorFieldsControl";
+			this.Size = new System.Drawing.Size(207, 29);
+			this.ResumeLayout(false);
+			this.PerformLayout();
+
+		}
+
+		#endregion
+
+		private System.Windows.Forms.Button bReset;
+		private CodeImp.DoomBuilder.Controls.ColorControl cpColor;
+		private System.Windows.Forms.TextBox tbColor;
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs b/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs
new file mode 100644
index 0000000000000000000000000000000000000000..0a8f56a1808a3af248ad814500ed87a05a4c6413
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Globalization;
+using CodeImp.DoomBuilder.Rendering;
+using CodeImp.DoomBuilder.Map;
+using CodeImp.DoomBuilder.GZBuilder.Tools;
+
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	public partial class ColorFieldsControl : UserControl
+	{
+		private int defaultValue;
+		private string field;
+
+		public int DefaultValue { get { return defaultValue; } set { defaultValue = value; } }
+		public string Label { get { return cpColor.Label; } set { cpColor.Label = value; } }
+		public string Field { get { return field; } set { field = value; } }
+
+		private bool blockUpdate;
+		
+		public ColorFieldsControl() {
+			InitializeComponent();
+		}
+
+		public void SetValueFrom(UniFields fields) {
+			string newValue = String.Format("{0:X6}", UDMFTools.GetInteger(fields, field, defaultValue));
+			tbColor.Text = ((!string.IsNullOrEmpty(tbColor.Text) && tbColor.Text != newValue) ? "" : newValue);
+			checkColor();
+		}
+
+		public void ApplyTo(UniFields fields) {
+			if(string.IsNullOrEmpty(tbColor.Text)) return;
+			UDMFTools.SetInteger(fields, field, (cpColor.Color.ToInt() & 0x00ffffff), defaultValue, false);
+		}
+
+		private void checkColor() {
+			bool changed = (cpColor.Color.ToInt() & 0x00ffffff) != defaultValue;
+			bReset.Visible = changed;
+			tbColor.ForeColor = changed ? SystemColors.WindowText : SystemColors.GrayText;
+		}
+
+		private void bReset_Click(object sender, EventArgs e) {
+			cpColor.Color = PixelColor.FromInt(defaultValue).WithAlpha(255);
+			cpColor_ColorChanged(this, EventArgs.Empty);
+		}
+
+		private void cpColor_ColorChanged(object sender, EventArgs e) {
+			if(blockUpdate)	return;
+
+			blockUpdate = true;
+			tbColor.Text = String.Format("{0:X6}", (cpColor.Color.ToInt() & 0x00ffffff));
+			blockUpdate = false;
+
+			checkColor();
+		}
+
+		private void tbColor_TextChanged(object sender, EventArgs e) {
+			if(blockUpdate)	return;
+			int colorVal = defaultValue;
+
+			if(int.TryParse(tbColor.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out colorVal)){
+				colorVal = General.Clamp(colorVal, 0, 16777215);
+
+				blockUpdate = true;
+				cpColor.Color = PixelColor.FromInt(colorVal).WithAlpha(255);
+				blockUpdate = false;
+			}
+
+			checkColor();
+		}
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/ColorFieldsControl.resx b/Source/Core/GZBuilder/Controls/ColorFieldsControl.resx
new file mode 100644
index 0000000000000000000000000000000000000000..ff31a6db56e23b5a334f34387830ba5b4bd33eb8
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/ColorFieldsControl.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
diff --git a/Source/Core/GZBuilder/Controls/FloatFieldsSlider.cs b/Source/Core/GZBuilder/Controls/FloatFieldsSlider.cs
deleted file mode 100644
index 521a86986becffa4d7fc48588fb49c885b199b4f..0000000000000000000000000000000000000000
--- a/Source/Core/GZBuilder/Controls/FloatFieldsSlider.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.Windows.Forms;
-using CodeImp.DoomBuilder.Map;
-using CodeImp.DoomBuilder.GZBuilder.Tools;
-
-namespace CodeImp.DoomBuilder.GZBuilder.Controls
-{
-    public partial class FloatFieldsSlider : UserControl
-    {
-        private bool blockEvents;
-		private float defaultValue;
-		private string field;
-		private float min;
-		private float max;
-
-		public float DefaultValue { get { return defaultValue; } set { defaultValue = value; } }
-		public string Field { get { return field; } set { field = value; } }
-
-        public FloatFieldsSlider() {
-            InitializeComponent();
-        }
-
-        public void SetLimits(float min, float max) {
-            blockEvents = true;
-
-			this.min = min;
-			this.max = max;
-            trackBar1.Value = General.Clamp(trackBar1.Value, (int)(min * 10), (int)(max * 10));
-            trackBar1.Minimum = (int)(min * 10);
-            trackBar1.Maximum = (int)(max * 10);
-
-            blockEvents = false;
-        }
-
-		public void SetValueFrom(UniFields fields) {
-			float v1 = UDMFTools.GetFloat(fields, field, defaultValue);
-			string newValue = String.Format("{0:0.0}", v1);
-			nudValue.Text = ((!string.IsNullOrEmpty(nudValue.Text) && nudValue.Text != newValue) ? "" : newValue);
-		}
-
-		public void ApplyTo(UniFields fields) {
-			if(nudValue.Text != "")
-				UDMFTools.SetFloat(fields, field, General.Clamp(nudValue.GetResultFloat(defaultValue), min, max), defaultValue, false);
-		}
-
-        //events
-        private void trackBar1_ValueChanged(object sender, EventArgs e) {
-			if(!blockEvents) nudValue.Text = String.Format("{0:0.0}", (float)Math.Round(((float)trackBar1.Value / 10.0f), 2));
-        }
-
-		private void nudValue_WhenTextChanged(object sender, EventArgs e) {
-			float value = nudValue.GetResultFloat(0.0f);
-
-			if(value > max) {
-				value = max;
-				nudValue.Text = String.Format("{0:0.0}", value);
-			} else if(value < min) {
-				value = min;
-				nudValue.Text = String.Format("{0:0.0}", value);
-			}
-			
-			blockEvents = true;
-			trackBar1.Value = General.Clamp((int)(value * 10), trackBar1.Minimum, trackBar1.Maximum);
-			blockEvents = false;
-		}
-    }
-}
diff --git a/Source/Core/GZBuilder/Controls/FloatFieldsSlider.designer.cs b/Source/Core/GZBuilder/Controls/FloatFieldsSlider.designer.cs
deleted file mode 100644
index 29b310fae23b5266f911e86549f5c405e3c31023..0000000000000000000000000000000000000000
--- a/Source/Core/GZBuilder/Controls/FloatFieldsSlider.designer.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-namespace CodeImp.DoomBuilder.GZBuilder.Controls
-{
-    partial class FloatFieldsSlider
-    {
-        /// <summary> 
-        /// Требуется переменная конструктора.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary> 
-        /// Освободить все используемые ресурсы.
-        /// </summary>
-        /// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
-        protected override void Dispose(bool disposing) {
-            if (disposing && (components != null)) {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Код, автоматически созданный конструктором компонентов
-
-        /// <summary> 
-        /// Обязательный метод для поддержки конструктора - не изменяйте 
-        /// содержимое данного метода при помощи редактора кода.
-        /// </summary>
-        private void InitializeComponent() {
-			this.trackBar1 = new Dotnetrix.Controls.TrackBar();
-			this.nudValue = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
-			this.SuspendLayout();
-			// 
-			// trackBar1
-			// 
-			this.trackBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-						| System.Windows.Forms.AnchorStyles.Right)));
-			this.trackBar1.LargeChange = 10;
-			this.trackBar1.Location = new System.Drawing.Point(3, 3);
-			this.trackBar1.Maximum = 512;
-			this.trackBar1.Name = "trackBar1";
-			this.trackBar1.Size = new System.Drawing.Size(150, 45);
-			this.trackBar1.TabIndex = 4;
-			this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
-			// 
-			// nudValue
-			// 
-			this.nudValue.AllowDecimal = true;
-			this.nudValue.AllowNegative = false;
-			this.nudValue.AllowRelative = false;
-			this.nudValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-			this.nudValue.ButtonStep = 0.1F;
-			this.nudValue.Location = new System.Drawing.Point(151, 0);
-			this.nudValue.Name = "nudValue";
-			this.nudValue.Size = new System.Drawing.Size(59, 24);
-			this.nudValue.StepValues = null;
-			this.nudValue.TabIndex = 8;
-			this.nudValue.WhenTextChanged += new System.EventHandler(this.nudValue_WhenTextChanged);
-			// 
-			// FloatFieldsSlider
-			// 
-			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-			this.Controls.Add(this.nudValue);
-			this.Controls.Add(this.trackBar1);
-			this.Name = "FloatFieldsSlider";
-			this.Size = new System.Drawing.Size(213, 33);
-			((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
-			this.ResumeLayout(false);
-			this.PerformLayout();
-
-        }
-
-        #endregion
-
-		protected Dotnetrix.Controls.TrackBar trackBar1;
-		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox nudValue;
-    }
-}
diff --git a/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs b/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs
index 073a5b406f079829273c0d951b6c2c27534f3ba2..4c3ca072cf20023e2659f0361d58aee5627b418e 100644
--- a/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs
+++ b/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs
@@ -16,20 +16,29 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
 		public string Field1 { get { return field1; } set { field1 = value; } }
 		public string Field2 { get { return field2; } set { field2 = value; } }
 		public bool AllowDecimal { get { return value1.AllowDecimal; } set { value1.AllowDecimal = value; value2.AllowDecimal = value; } }
+		public float ButtonStep { get { return value1.ButtonStep; } set { value1.ButtonStep = value; value2.ButtonStep = value; } }
 		
 		public PairedFieldsControl() {
 			InitializeComponent();
 		}
 
 		public void SetValuesFrom(UniFields fields) {
-			float v1 = UDMFTools.GetFloat(fields, field1, defaultValue);
-			string newValue = (value1.AllowDecimal ? String.Format("{0:0.0}", v1) : v1.ToString());
-			value1.Text = ((!string.IsNullOrEmpty(value1.Text) && value1.Text != newValue) ? "" : newValue);
+			string newValue1;
+			string newValue2;
 
-			float v2 = UDMFTools.GetFloat(fields, field2, defaultValue);
-			newValue = (value2.AllowDecimal ? String.Format("{0:0.0}", v2) : v2.ToString());
-			value2.Text = ((!string.IsNullOrEmpty(value2.Text) && value2.Text != newValue) ? "" : newValue);
+			if(AllowDecimal) {
+				float val1 = UDMFTools.GetFloat(fields, field1, defaultValue);
+				newValue1 = (val1 == Math.Round(val1) ? val1.ToString("0.0") : val1.ToString());
 
+				float val2 = UDMFTools.GetFloat(fields, field2, defaultValue);
+				newValue2 = (val2 == Math.Round(val2) ? val2.ToString("0.0") : val2.ToString());
+			} else {
+				newValue1 = UDMFTools.GetFloat(fields, field1, defaultValue).ToString();
+				newValue2 = UDMFTools.GetFloat(fields, field2, defaultValue).ToString();
+			}
+
+			value1.Text = ((!string.IsNullOrEmpty(value1.Text) && value1.Text != newValue1) ? "" : newValue1);
+			value2.Text = ((!string.IsNullOrEmpty(value2.Text) && value2.Text != newValue2) ? "" : newValue2);
 			checkValues();
 		}
 
diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..0d01035c594e27b9fa328f4385e794c5da9bd72a
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs
@@ -0,0 +1,106 @@
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	partial class PairedIntControl
+	{
+		/// <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.label = new System.Windows.Forms.Label();
+			this.value1 = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.value2 = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.bReset = new System.Windows.Forms.Button();
+			this.SuspendLayout();
+			// 
+			// label
+			// 
+			this.label.Location = new System.Drawing.Point(0, 6);
+			this.label.Name = "label";
+			this.label.Size = new System.Drawing.Size(87, 14);
+			this.label.TabIndex = 40;
+			this.label.Text = "Upper Offset:";
+			this.label.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// value1
+			// 
+			this.value1.AllowDecimal = false;
+			this.value1.AllowNegative = true;
+			this.value1.AllowRelative = true;
+			this.value1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+			this.value1.ButtonStep = 1F;
+			this.value1.Location = new System.Drawing.Point(89, 1);
+			this.value1.Name = "value1";
+			this.value1.Size = new System.Drawing.Size(62, 24);
+			this.value1.StepValues = null;
+			this.value1.TabIndex = 41;
+			this.value1.Tag = "offsetx_top";
+			this.value1.WhenTextChanged += new System.EventHandler(this.value1_WhenTextChanged);
+			// 
+			// value2
+			// 
+			this.value2.AllowDecimal = false;
+			this.value2.AllowNegative = true;
+			this.value2.AllowRelative = true;
+			this.value2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+			this.value2.ButtonStep = 1F;
+			this.value2.Location = new System.Drawing.Point(157, 1);
+			this.value2.Name = "value2";
+			this.value2.Size = new System.Drawing.Size(62, 24);
+			this.value2.StepValues = null;
+			this.value2.TabIndex = 42;
+			this.value2.Tag = "offsety_top";
+			this.value2.WhenTextChanged += new System.EventHandler(this.value1_WhenTextChanged);
+			// 
+			// bReset
+			// 
+			this.bReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+			this.bReset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
+			this.bReset.Location = new System.Drawing.Point(222, 1);
+			this.bReset.Name = "bReset";
+			this.bReset.Size = new System.Drawing.Size(23, 23);
+			this.bReset.TabIndex = 43;
+			this.bReset.UseVisualStyleBackColor = true;
+			this.bReset.Visible = false;
+			this.bReset.Click += new System.EventHandler(this.bReset_Click);
+			// 
+			// PairedIntControl
+			// 
+			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.Controls.Add(this.bReset);
+			this.Controls.Add(this.label);
+			this.Controls.Add(this.value1);
+			this.Controls.Add(this.value2);
+			this.Name = "PairedIntControl";
+			this.Size = new System.Drawing.Size(249, 26);
+			this.ResumeLayout(false);
+
+		}
+
+		#endregion
+
+		private System.Windows.Forms.Button bReset;
+		private System.Windows.Forms.Label label;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox value1;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox value2;
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.cs b/Source/Core/GZBuilder/Controls/PairedIntControl.cs
new file mode 100644
index 0000000000000000000000000000000000000000..8df71dc5e1947f25c001fadb626189252455b728
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/PairedIntControl.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Windows.Forms;
+using CodeImp.DoomBuilder.Map;
+
+namespace CodeImp.DoomBuilder.GZBuilder.Controls
+{
+	public partial class PairedIntControl : UserControl
+	{
+		private int defaultValue;
+
+		public string Label { get { return label.Text; } set { label.Text = value; } }
+		public int DefaultValue { get { return defaultValue; } set { defaultValue = value; } }
+		public int ButtonStep { get { return (int)value1.ButtonStep; } set { value1.ButtonStep = value; value2.ButtonStep = value; } }
+
+		public PairedIntControl() {
+			InitializeComponent();
+		}
+
+		public void SetValues(int val1, int val2) {
+			if(!string.IsNullOrEmpty(value1.Text) && value1.Text != val1.ToString())
+				value1.Text = "";
+			else
+				value1.Text = val1.ToString();
+
+			if(!string.IsNullOrEmpty(value2.Text) && value2.Text != val2.ToString())
+				value2.Text = "";
+			else
+				value2.Text = val2.ToString();
+		}
+
+		public int GetValue1(int original) {
+			return value1.GetResult(original);
+		}
+
+		public int GetValue2(int original) {
+			return value2.GetResult(original);
+		}
+
+		private void checkValues() {
+			bool changed = (string.IsNullOrEmpty(value1.Text) || string.IsNullOrEmpty(value2.Text));
+
+			if(!changed)
+				changed = (value1.GetResult(defaultValue) != defaultValue || value2.GetResult(defaultValue) != defaultValue);
+
+			label.Enabled = changed;
+			bReset.Visible = changed;
+		}
+
+		private void bReset_Click(object sender, EventArgs e) {
+			value1.Text = defaultValue.ToString();
+			value2.Text = defaultValue.ToString();
+			checkValues();
+		}
+
+		private void value1_WhenTextChanged(object sender, EventArgs e) {
+			checkValues();
+		}
+	}
+}
diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.resx b/Source/Core/GZBuilder/Controls/PairedIntControl.resx
new file mode 100644
index 0000000000000000000000000000000000000000..ff31a6db56e23b5a334f34387830ba5b4bd33eb8
--- /dev/null
+++ b/Source/Core/GZBuilder/Controls/PairedIntControl.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
diff --git a/Source/Core/Resources/Pin.png b/Source/Core/Resources/Pin.png
new file mode 100644
index 0000000000000000000000000000000000000000..68dc1c20874fbb67bd78648076ec58f8f0713087
Binary files /dev/null and b/Source/Core/Resources/Pin.png differ
diff --git a/Source/Core/Resources/Unpin.png b/Source/Core/Resources/Unpin.png
new file mode 100644
index 0000000000000000000000000000000000000000..9d06b287306c93dd925b087bd46ed081526ceeb0
Binary files /dev/null and b/Source/Core/Resources/Unpin.png differ
diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs
index 163956be8c9930a68cbe31dd9e1c09b294b61634..8a6dc6c9b117ef9c97d02cfd90820b9cace49c0f 100644
--- a/Source/Core/Windows/LinedefEditForm.Designer.cs
+++ b/Source/Core/Windows/LinedefEditForm.Designer.cs
@@ -38,12 +38,10 @@ namespace CodeImp.DoomBuilder.Windows
 			System.Windows.Forms.Label label11;
 			System.Windows.Forms.Label label12;
 			System.Windows.Forms.Label activationlabel;
-			System.Windows.Forms.Label label668;
-			System.Windows.Forms.Label label667;
 			System.Windows.Forms.Label label1;
 			System.Windows.Forms.Label label7;
-			System.Windows.Forms.Label label13;
 			System.Windows.Forms.Label label14;
+			System.Windows.Forms.Label label6;
 			this.labelLightFront = new System.Windows.Forms.Label();
 			this.cancel = new System.Windows.Forms.Button();
 			this.apply = new System.Windows.Forms.Button();
@@ -73,18 +71,17 @@ namespace CodeImp.DoomBuilder.Windows
 			this.tabs = new System.Windows.Forms.TabControl();
 			this.tabproperties = new System.Windows.Forms.TabPage();
 			this.settingsGroup = new System.Windows.Forms.GroupBox();
+			this.alpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.lockNumber = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.cbRenderStyle = new System.Windows.Forms.ComboBox();
-			this.fsAlpha = new CodeImp.DoomBuilder.GZBuilder.Controls.FloatFieldsSlider();
 			this.idgroup = new System.Windows.Forms.GroupBox();
 			this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector();
 			this.tabsidedefs = new System.Windows.Forms.TabPage();
 			this.splitter = new System.Windows.Forms.SplitContainer();
 			this.frontside = new System.Windows.Forms.CheckBox();
 			this.frontgroup = new System.Windows.Forms.GroupBox();
+			this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl();
 			this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox();
-			this.frontoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.frontoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.customfrontbutton = new System.Windows.Forms.Button();
@@ -108,11 +105,10 @@ namespace CodeImp.DoomBuilder.Windows
 			this.cbClipMidtexFront = new System.Windows.Forms.CheckBox();
 			this.backside = new System.Windows.Forms.CheckBox();
 			this.backgroup = new System.Windows.Forms.GroupBox();
+			this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl();
 			this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox();
 			this.labelLightBack = new System.Windows.Forms.Label();
 			this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.backoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.backoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.custombackbutton = new System.Windows.Forms.Button();
 			this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
@@ -163,12 +159,10 @@ namespace CodeImp.DoomBuilder.Windows
 			label11 = new System.Windows.Forms.Label();
 			label12 = new System.Windows.Forms.Label();
 			activationlabel = new System.Windows.Forms.Label();
-			label668 = new System.Windows.Forms.Label();
-			label667 = new System.Windows.Forms.Label();
 			label1 = new System.Windows.Forms.Label();
 			label7 = new System.Windows.Forms.Label();
-			label13 = new System.Windows.Forms.Label();
 			label14 = new System.Windows.Forms.Label();
+			label6 = new System.Windows.Forms.Label();
 			this.actiongroup.SuspendLayout();
 			this.argspanel.SuspendLayout();
 			this.hexenpanel.SuspendLayout();
@@ -260,7 +254,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// label11
 			// 
-			label11.Location = new System.Drawing.Point(17, 42);
+			label11.Location = new System.Drawing.Point(8, 42);
 			label11.Name = "label11";
 			label11.Size = new System.Drawing.Size(80, 14);
 			label11.TabIndex = 13;
@@ -269,12 +263,12 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// label12
 			// 
-			label12.AutoSize = true;
-			label12.Location = new System.Drawing.Point(26, 40);
+			label12.Location = new System.Drawing.Point(8, 42);
 			label12.Name = "label12";
-			label12.Size = new System.Drawing.Size(71, 14);
+			label12.Size = new System.Drawing.Size(80, 14);
 			label12.TabIndex = 16;
 			label12.Text = "Sector Index:";
+			label12.TextAlign = System.Drawing.ContentAlignment.TopRight;
 			// 
 			// activationlabel
 			// 
@@ -285,25 +279,6 @@ namespace CodeImp.DoomBuilder.Windows
 			activationlabel.TabIndex = 10;
 			activationlabel.Text = "Trigger:";
 			// 
-			// label668
-			// 
-			label668.AutoSize = true;
-			label668.Location = new System.Drawing.Point(16, 70);
-			label668.Name = "label668";
-			label668.Size = new System.Drawing.Size(80, 14);
-			label668.TabIndex = 7;
-			label668.Text = "Texture Offset:";
-			label668.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
-			// label667
-			// 
-			label667.Location = new System.Drawing.Point(17, 69);
-			label667.Name = "label667";
-			label667.Size = new System.Drawing.Size(80, 14);
-			label667.TabIndex = 7;
-			label667.Text = "Texture Offset:";
-			label667.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
 			// label1
 			// 
 			label1.Location = new System.Drawing.Point(15, 18);
@@ -317,33 +292,33 @@ namespace CodeImp.DoomBuilder.Windows
 			// label7
 			// 
 			label7.AutoSize = true;
-			label7.Location = new System.Drawing.Point(6, 31);
+			label7.Location = new System.Drawing.Point(15, 30);
 			label7.Name = "label7";
 			label7.Size = new System.Drawing.Size(71, 14);
 			label7.TabIndex = 11;
 			label7.Text = "Render style:";
 			// 
-			// label13
-			// 
-			label13.AutoSize = true;
-			label13.Location = new System.Drawing.Point(182, 31);
-			label13.Name = "label13";
-			label13.Size = new System.Drawing.Size(38, 14);
-			label13.TabIndex = 13;
-			label13.Text = "Alpha:";
-			// 
 			// label14
 			// 
 			label14.AutoSize = true;
-			label14.Location = new System.Drawing.Point(383, 31);
+			label14.Location = new System.Drawing.Point(330, 30);
 			label14.Name = "label14";
 			label14.Size = new System.Drawing.Size(73, 14);
 			label14.TabIndex = 15;
 			label14.Text = "Lock Number:";
 			// 
+			// label6
+			// 
+			label6.AutoSize = true;
+			label6.Location = new System.Drawing.Point(199, 30);
+			label6.Name = "label6";
+			label6.Size = new System.Drawing.Size(38, 14);
+			label6.TabIndex = 17;
+			label6.Text = "Alpha:";
+			// 
 			// labelLightFront
 			// 
-			this.labelLightFront.Location = new System.Drawing.Point(17, 97);
+			this.labelLightFront.Location = new System.Drawing.Point(8, 101);
 			this.labelLightFront.Name = "labelLightFront";
 			this.labelLightFront.Size = new System.Drawing.Size(80, 14);
 			this.labelLightFront.TabIndex = 25;
@@ -657,12 +632,12 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			this.settingsGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 						| System.Windows.Forms.AnchorStyles.Right)));
+			this.settingsGroup.Controls.Add(this.alpha);
+			this.settingsGroup.Controls.Add(label6);
 			this.settingsGroup.Controls.Add(this.lockNumber);
 			this.settingsGroup.Controls.Add(label14);
-			this.settingsGroup.Controls.Add(label13);
 			this.settingsGroup.Controls.Add(this.cbRenderStyle);
 			this.settingsGroup.Controls.Add(label7);
-			this.settingsGroup.Controls.Add(this.fsAlpha);
 			this.settingsGroup.Location = new System.Drawing.Point(8, 183);
 			this.settingsGroup.Name = "settingsGroup";
 			this.settingsGroup.Size = new System.Drawing.Size(533, 66);
@@ -670,13 +645,25 @@ namespace CodeImp.DoomBuilder.Windows
 			this.settingsGroup.TabStop = false;
 			this.settingsGroup.Text = " Settings";
 			// 
+			// alpha
+			// 
+			this.alpha.AllowDecimal = true;
+			this.alpha.AllowNegative = false;
+			this.alpha.AllowRelative = false;
+			this.alpha.ButtonStep = 0.1F;
+			this.alpha.Location = new System.Drawing.Point(243, 25);
+			this.alpha.Name = "alpha";
+			this.alpha.Size = new System.Drawing.Size(65, 24);
+			this.alpha.StepValues = null;
+			this.alpha.TabIndex = 18;
+			// 
 			// lockNumber
 			// 
 			this.lockNumber.AllowDecimal = false;
 			this.lockNumber.AllowNegative = false;
 			this.lockNumber.AllowRelative = false;
 			this.lockNumber.ButtonStep = 1F;
-			this.lockNumber.Location = new System.Drawing.Point(462, 25);
+			this.lockNumber.Location = new System.Drawing.Point(405, 25);
 			this.lockNumber.Name = "lockNumber";
 			this.lockNumber.Size = new System.Drawing.Size(65, 24);
 			this.lockNumber.StepValues = null;
@@ -689,20 +676,11 @@ namespace CodeImp.DoomBuilder.Windows
 			this.cbRenderStyle.Items.AddRange(new object[] {
             "Translucent",
             "Additive"});
-			this.cbRenderStyle.Location = new System.Drawing.Point(83, 27);
+			this.cbRenderStyle.Location = new System.Drawing.Point(92, 26);
 			this.cbRenderStyle.Name = "cbRenderStyle";
 			this.cbRenderStyle.Size = new System.Drawing.Size(86, 22);
 			this.cbRenderStyle.TabIndex = 12;
 			// 
-			// fsAlpha
-			// 
-			this.fsAlpha.DefaultValue = 1F;
-			this.fsAlpha.Field = "alpha";
-			this.fsAlpha.Location = new System.Drawing.Point(210, 25);
-			this.fsAlpha.Name = "fsAlpha";
-			this.fsAlpha.Size = new System.Drawing.Size(169, 45);
-			this.fsAlpha.TabIndex = 14;
-			// 
 			// idgroup
 			// 
 			this.idgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -771,10 +749,9 @@ namespace CodeImp.DoomBuilder.Windows
 			this.frontgroup.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.frontgroup.Controls.Add(this.frontTextureOffset);
 			this.frontgroup.Controls.Add(this.cbLightAbsoluteFront);
-			this.frontgroup.Controls.Add(this.frontoffsety);
 			this.frontgroup.Controls.Add(this.labelLightFront);
-			this.frontgroup.Controls.Add(this.frontoffsetx);
 			this.frontgroup.Controls.Add(this.lightFront);
 			this.frontgroup.Controls.Add(this.frontsector);
 			this.frontgroup.Controls.Add(this.customfrontbutton);
@@ -783,7 +760,6 @@ namespace CodeImp.DoomBuilder.Windows
 			this.frontgroup.Controls.Add(this.frontmid);
 			this.frontgroup.Controls.Add(this.fronthigh);
 			this.frontgroup.Controls.Add(this.udmfPropertiesFront);
-			this.frontgroup.Controls.Add(label667);
 			this.frontgroup.Controls.Add(label5);
 			this.frontgroup.Controls.Add(label4);
 			this.frontgroup.Controls.Add(label3);
@@ -795,10 +771,20 @@ namespace CodeImp.DoomBuilder.Windows
 			this.frontgroup.TabStop = false;
 			this.frontgroup.Text = "     ";
 			// 
+			// frontTextureOffset
+			// 
+			this.frontTextureOffset.ButtonStep = 16;
+			this.frontTextureOffset.DefaultValue = 0;
+			this.frontTextureOffset.Label = "Texture Offset:";
+			this.frontTextureOffset.Location = new System.Drawing.Point(1, 65);
+			this.frontTextureOffset.Name = "frontTextureOffset";
+			this.frontTextureOffset.Size = new System.Drawing.Size(249, 26);
+			this.frontTextureOffset.TabIndex = 41;
+			// 
 			// cbLightAbsoluteFront
 			// 
 			this.cbLightAbsoluteFront.AutoSize = true;
-			this.cbLightAbsoluteFront.Location = new System.Drawing.Point(171, 96);
+			this.cbLightAbsoluteFront.Location = new System.Drawing.Point(158, 100);
 			this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront";
 			this.cbLightAbsoluteFront.Size = new System.Drawing.Size(69, 18);
 			this.cbLightAbsoluteFront.TabIndex = 27;
@@ -806,37 +792,13 @@ namespace CodeImp.DoomBuilder.Windows
 			this.cbLightAbsoluteFront.Text = "Absolute";
 			this.cbLightAbsoluteFront.UseVisualStyleBackColor = true;
 			// 
-			// frontoffsety
-			// 
-			this.frontoffsety.AllowDecimal = false;
-			this.frontoffsety.AllowNegative = true;
-			this.frontoffsety.AllowRelative = true;
-			this.frontoffsety.ButtonStep = 1F;
-			this.frontoffsety.Location = new System.Drawing.Point(171, 64);
-			this.frontoffsety.Name = "frontoffsety";
-			this.frontoffsety.Size = new System.Drawing.Size(62, 24);
-			this.frontoffsety.StepValues = null;
-			this.frontoffsety.TabIndex = 16;
-			// 
-			// frontoffsetx
-			// 
-			this.frontoffsetx.AllowDecimal = false;
-			this.frontoffsetx.AllowNegative = true;
-			this.frontoffsetx.AllowRelative = true;
-			this.frontoffsetx.ButtonStep = 1F;
-			this.frontoffsetx.Location = new System.Drawing.Point(103, 64);
-			this.frontoffsetx.Name = "frontoffsetx";
-			this.frontoffsetx.Size = new System.Drawing.Size(62, 24);
-			this.frontoffsetx.StepValues = null;
-			this.frontoffsetx.TabIndex = 15;
-			// 
 			// lightFront
 			// 
 			this.lightFront.AllowDecimal = false;
 			this.lightFront.AllowNegative = true;
 			this.lightFront.AllowRelative = true;
-			this.lightFront.ButtonStep = 1F;
-			this.lightFront.Location = new System.Drawing.Point(103, 92);
+			this.lightFront.ButtonStep = 16F;
+			this.lightFront.Location = new System.Drawing.Point(90, 96);
 			this.lightFront.Name = "lightFront";
 			this.lightFront.Size = new System.Drawing.Size(62, 24);
 			this.lightFront.StepValues = null;
@@ -849,7 +811,7 @@ namespace CodeImp.DoomBuilder.Windows
 			this.frontsector.AllowNegative = false;
 			this.frontsector.AllowRelative = false;
 			this.frontsector.ButtonStep = 1F;
-			this.frontsector.Location = new System.Drawing.Point(103, 37);
+			this.frontsector.Location = new System.Drawing.Point(90, 35);
 			this.frontsector.Name = "frontsector";
 			this.frontsector.Size = new System.Drawing.Size(130, 24);
 			this.frontsector.StepValues = null;
@@ -857,7 +819,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// customfrontbutton
 			// 
-			this.customfrontbutton.Location = new System.Drawing.Point(103, 126);
+			this.customfrontbutton.Location = new System.Drawing.Point(90, 126);
 			this.customfrontbutton.Name = "customfrontbutton";
 			this.customfrontbutton.Size = new System.Drawing.Size(130, 25);
 			this.customfrontbutton.TabIndex = 3;
@@ -924,6 +886,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontScaleBottom
 			// 
 			this.pfcFrontScaleBottom.AllowDecimal = true;
+			this.pfcFrontScaleBottom.ButtonStep = 1F;
 			this.pfcFrontScaleBottom.DefaultValue = 1F;
 			this.pfcFrontScaleBottom.Field1 = "scalex_bottom";
 			this.pfcFrontScaleBottom.Field2 = "scaley_bottom";
@@ -936,6 +899,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontScaleMid
 			// 
 			this.pfcFrontScaleMid.AllowDecimal = true;
+			this.pfcFrontScaleMid.ButtonStep = 1F;
 			this.pfcFrontScaleMid.DefaultValue = 1F;
 			this.pfcFrontScaleMid.Field1 = "scalex_mid";
 			this.pfcFrontScaleMid.Field2 = "scaley_mid";
@@ -948,6 +912,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontScaleTop
 			// 
 			this.pfcFrontScaleTop.AllowDecimal = true;
+			this.pfcFrontScaleTop.ButtonStep = 1F;
 			this.pfcFrontScaleTop.DefaultValue = 1F;
 			this.pfcFrontScaleTop.Field1 = "scalex_top";
 			this.pfcFrontScaleTop.Field2 = "scaley_top";
@@ -960,6 +925,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontOffsetBottom
 			// 
 			this.pfcFrontOffsetBottom.AllowDecimal = false;
+			this.pfcFrontOffsetBottom.ButtonStep = 16F;
 			this.pfcFrontOffsetBottom.DefaultValue = 0F;
 			this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom";
 			this.pfcFrontOffsetBottom.Field2 = "offsety_bottom";
@@ -972,6 +938,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontOffsetMid
 			// 
 			this.pfcFrontOffsetMid.AllowDecimal = false;
+			this.pfcFrontOffsetMid.ButtonStep = 16F;
 			this.pfcFrontOffsetMid.DefaultValue = 0F;
 			this.pfcFrontOffsetMid.Field1 = "offsetx_mid";
 			this.pfcFrontOffsetMid.Field2 = "offsety_mid";
@@ -984,6 +951,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcFrontOffsetTop
 			// 
 			this.pfcFrontOffsetTop.AllowDecimal = false;
+			this.pfcFrontOffsetTop.ButtonStep = 16F;
 			this.pfcFrontOffsetTop.DefaultValue = 0F;
 			this.pfcFrontOffsetTop.Field1 = "offsetx_top";
 			this.pfcFrontOffsetTop.Field2 = "offsety_top";
@@ -1091,18 +1059,16 @@ namespace CodeImp.DoomBuilder.Windows
 			this.backgroup.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.backgroup.Controls.Add(this.backTextureOffset);
 			this.backgroup.Controls.Add(this.cbLightAbsoluteBack);
 			this.backgroup.Controls.Add(this.labelLightBack);
 			this.backgroup.Controls.Add(this.lightBack);
-			this.backgroup.Controls.Add(this.backoffsety);
-			this.backgroup.Controls.Add(this.backoffsetx);
 			this.backgroup.Controls.Add(this.backsector);
 			this.backgroup.Controls.Add(this.custombackbutton);
 			this.backgroup.Controls.Add(label12);
 			this.backgroup.Controls.Add(this.backlow);
 			this.backgroup.Controls.Add(this.backmid);
 			this.backgroup.Controls.Add(this.backhigh);
-			this.backgroup.Controls.Add(label668);
 			this.backgroup.Controls.Add(label8);
 			this.backgroup.Controls.Add(label9);
 			this.backgroup.Controls.Add(label10);
@@ -1115,10 +1081,20 @@ namespace CodeImp.DoomBuilder.Windows
 			this.backgroup.TabStop = false;
 			this.backgroup.Text = "     ";
 			// 
+			// backTextureOffset
+			// 
+			this.backTextureOffset.ButtonStep = 16;
+			this.backTextureOffset.DefaultValue = 0;
+			this.backTextureOffset.Label = "Texture Offset:";
+			this.backTextureOffset.Location = new System.Drawing.Point(1, 65);
+			this.backTextureOffset.Name = "backTextureOffset";
+			this.backTextureOffset.Size = new System.Drawing.Size(249, 28);
+			this.backTextureOffset.TabIndex = 42;
+			// 
 			// cbLightAbsoluteBack
 			// 
 			this.cbLightAbsoluteBack.AutoSize = true;
-			this.cbLightAbsoluteBack.Location = new System.Drawing.Point(171, 99);
+			this.cbLightAbsoluteBack.Location = new System.Drawing.Point(158, 100);
 			this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack";
 			this.cbLightAbsoluteBack.Size = new System.Drawing.Size(69, 18);
 			this.cbLightAbsoluteBack.TabIndex = 30;
@@ -1128,7 +1104,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// labelLightBack
 			// 
-			this.labelLightBack.Location = new System.Drawing.Point(17, 100);
+			this.labelLightBack.Location = new System.Drawing.Point(8, 101);
 			this.labelLightBack.Name = "labelLightBack";
 			this.labelLightBack.Size = new System.Drawing.Size(80, 14);
 			this.labelLightBack.TabIndex = 28;
@@ -1141,45 +1117,21 @@ namespace CodeImp.DoomBuilder.Windows
 			this.lightBack.AllowDecimal = false;
 			this.lightBack.AllowNegative = true;
 			this.lightBack.AllowRelative = true;
-			this.lightBack.ButtonStep = 1F;
-			this.lightBack.Location = new System.Drawing.Point(103, 95);
+			this.lightBack.ButtonStep = 16F;
+			this.lightBack.Location = new System.Drawing.Point(90, 96);
 			this.lightBack.Name = "lightBack";
 			this.lightBack.Size = new System.Drawing.Size(62, 24);
 			this.lightBack.StepValues = null;
 			this.lightBack.TabIndex = 29;
 			this.lightBack.Tag = "light";
 			// 
-			// backoffsety
-			// 
-			this.backoffsety.AllowDecimal = false;
-			this.backoffsety.AllowNegative = true;
-			this.backoffsety.AllowRelative = true;
-			this.backoffsety.ButtonStep = 1F;
-			this.backoffsety.Location = new System.Drawing.Point(171, 65);
-			this.backoffsety.Name = "backoffsety";
-			this.backoffsety.Size = new System.Drawing.Size(62, 24);
-			this.backoffsety.StepValues = null;
-			this.backoffsety.TabIndex = 19;
-			// 
-			// backoffsetx
-			// 
-			this.backoffsetx.AllowDecimal = false;
-			this.backoffsetx.AllowNegative = true;
-			this.backoffsetx.AllowRelative = true;
-			this.backoffsetx.ButtonStep = 1F;
-			this.backoffsetx.Location = new System.Drawing.Point(103, 65);
-			this.backoffsetx.Name = "backoffsetx";
-			this.backoffsetx.Size = new System.Drawing.Size(62, 24);
-			this.backoffsetx.StepValues = null;
-			this.backoffsetx.TabIndex = 18;
-			// 
 			// backsector
 			// 
 			this.backsector.AllowDecimal = false;
 			this.backsector.AllowNegative = false;
 			this.backsector.AllowRelative = false;
 			this.backsector.ButtonStep = 1F;
-			this.backsector.Location = new System.Drawing.Point(103, 35);
+			this.backsector.Location = new System.Drawing.Point(90, 35);
 			this.backsector.Name = "backsector";
 			this.backsector.Size = new System.Drawing.Size(130, 24);
 			this.backsector.StepValues = null;
@@ -1187,7 +1139,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// custombackbutton
 			// 
-			this.custombackbutton.Location = new System.Drawing.Point(103, 126);
+			this.custombackbutton.Location = new System.Drawing.Point(90, 126);
 			this.custombackbutton.Name = "custombackbutton";
 			this.custombackbutton.Size = new System.Drawing.Size(130, 25);
 			this.custombackbutton.TabIndex = 3;
@@ -1254,6 +1206,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackScaleBottom
 			// 
 			this.pfcBackScaleBottom.AllowDecimal = true;
+			this.pfcBackScaleBottom.ButtonStep = 1F;
 			this.pfcBackScaleBottom.DefaultValue = 1F;
 			this.pfcBackScaleBottom.Field1 = "scalex_bottom";
 			this.pfcBackScaleBottom.Field2 = "scaley_bottom";
@@ -1266,6 +1219,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackScaleMid
 			// 
 			this.pfcBackScaleMid.AllowDecimal = true;
+			this.pfcBackScaleMid.ButtonStep = 1F;
 			this.pfcBackScaleMid.DefaultValue = 1F;
 			this.pfcBackScaleMid.Field1 = "scalex_mid";
 			this.pfcBackScaleMid.Field2 = "scaley_mid";
@@ -1278,6 +1232,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackScaleTop
 			// 
 			this.pfcBackScaleTop.AllowDecimal = true;
+			this.pfcBackScaleTop.ButtonStep = 1F;
 			this.pfcBackScaleTop.DefaultValue = 1F;
 			this.pfcBackScaleTop.Field1 = "scalex_top";
 			this.pfcBackScaleTop.Field2 = "scaley_top";
@@ -1290,6 +1245,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackOffsetBottom
 			// 
 			this.pfcBackOffsetBottom.AllowDecimal = false;
+			this.pfcBackOffsetBottom.ButtonStep = 16F;
 			this.pfcBackOffsetBottom.DefaultValue = 0F;
 			this.pfcBackOffsetBottom.Field1 = "offsetx_bottom";
 			this.pfcBackOffsetBottom.Field2 = "offsety_bottom";
@@ -1302,6 +1258,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackOffsetMid
 			// 
 			this.pfcBackOffsetMid.AllowDecimal = false;
+			this.pfcBackOffsetMid.ButtonStep = 16F;
 			this.pfcBackOffsetMid.DefaultValue = 0F;
 			this.pfcBackOffsetMid.Field1 = "offsetx_mid";
 			this.pfcBackOffsetMid.Field2 = "offsety_mid";
@@ -1314,6 +1271,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pfcBackOffsetTop
 			// 
 			this.pfcBackOffsetTop.AllowDecimal = false;
+			this.pfcBackOffsetTop.ButtonStep = 16F;
 			this.pfcBackOffsetTop.DefaultValue = 0F;
 			this.pfcBackOffsetTop.Field1 = "offsetx_top";
 			this.pfcBackOffsetTop.Field2 = "offsety_top";
@@ -1476,6 +1434,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl1
 			// 
 			this.pairedFieldsControl1.AllowDecimal = true;
+			this.pairedFieldsControl1.ButtonStep = 1F;
 			this.pairedFieldsControl1.DefaultValue = 1F;
 			this.pairedFieldsControl1.Field1 = "scalex_bottom";
 			this.pairedFieldsControl1.Field2 = "scaley_bottom";
@@ -1488,6 +1447,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl2
 			// 
 			this.pairedFieldsControl2.AllowDecimal = true;
+			this.pairedFieldsControl2.ButtonStep = 1F;
 			this.pairedFieldsControl2.DefaultValue = 1F;
 			this.pairedFieldsControl2.Field1 = "scalex_mid";
 			this.pairedFieldsControl2.Field2 = "scaley_mid";
@@ -1500,6 +1460,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl3
 			// 
 			this.pairedFieldsControl3.AllowDecimal = true;
+			this.pairedFieldsControl3.ButtonStep = 1F;
 			this.pairedFieldsControl3.DefaultValue = 1F;
 			this.pairedFieldsControl3.Field1 = "scalex_top";
 			this.pairedFieldsControl3.Field2 = "scaley_top";
@@ -1512,6 +1473,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl4
 			// 
 			this.pairedFieldsControl4.AllowDecimal = false;
+			this.pairedFieldsControl4.ButtonStep = 1F;
 			this.pairedFieldsControl4.DefaultValue = 0F;
 			this.pairedFieldsControl4.Field1 = "offsetx_bottom";
 			this.pairedFieldsControl4.Field2 = "offsety_bottom";
@@ -1524,6 +1486,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl5
 			// 
 			this.pairedFieldsControl5.AllowDecimal = false;
+			this.pairedFieldsControl5.ButtonStep = 1F;
 			this.pairedFieldsControl5.DefaultValue = 0F;
 			this.pairedFieldsControl5.Field1 = "offsetx_mid";
 			this.pairedFieldsControl5.Field2 = "offsety_mid";
@@ -1536,6 +1499,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// pairedFieldsControl6
 			// 
 			this.pairedFieldsControl6.AllowDecimal = false;
+			this.pairedFieldsControl6.ButtonStep = 1F;
 			this.pairedFieldsControl6.DefaultValue = 0F;
 			this.pairedFieldsControl6.Field1 = "offsetx_top";
 			this.pairedFieldsControl6.Field2 = "offsety_top";
@@ -1761,11 +1725,7 @@ namespace CodeImp.DoomBuilder.Windows
 		private System.Windows.Forms.Button custombackbutton;
 		private System.Windows.Forms.Panel heightpanel1;
 		private System.Windows.Forms.Panel heightpanel2;
-		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontoffsetx;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontsector;
-		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontoffsety;
-		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backoffsety;
-		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backoffsetx;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backsector;
         private System.Windows.Forms.CheckBox cbArgStr;
 		private System.Windows.Forms.ComboBox arg0str;
@@ -1820,11 +1780,13 @@ namespace CodeImp.DoomBuilder.Windows
 		private System.Windows.Forms.CheckBox checkBox8;
 		private System.Windows.Forms.GroupBox settingsGroup;
 		private System.Windows.Forms.ComboBox cbRenderStyle;
-		private CodeImp.DoomBuilder.GZBuilder.Controls.FloatFieldsSlider fsAlpha;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lockNumber;
 		private System.Windows.Forms.Label labelLightFront;
 		private System.Windows.Forms.CheckBox cbLightAbsoluteBack;
 		private System.Windows.Forms.Label labelLightBack;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightBack;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox alpha;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl frontTextureOffset;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl backTextureOffset;
 	}
 }
\ No newline at end of file
diff --git a/Source/Core/Windows/LinedefEditForm.cs b/Source/Core/Windows/LinedefEditForm.cs
index 321e2e44cbd33cd4512d2c620874b25bad6cbe02..c4e2df2dfa5962a25c071d6255ba35be9a689bd2 100644
--- a/Source/Core/Windows/LinedefEditForm.cs
+++ b/Source/Core/Windows/LinedefEditForm.cs
@@ -118,7 +118,6 @@ namespace CodeImp.DoomBuilder.Windows
 				frontUdmfFlags = new List<CheckBox>() { cbLightAbsoluteFront, cblightfogFront, cbnodecalsFront, cbnofakecontrastFront, cbWrapMidtexFront, cbsmoothlightingFront, cbClipMidtexFront };
 				backUdmfControls = new List<PairedFieldsControl>() { pfcBackOffsetTop, pfcBackOffsetMid, pfcBackOffsetBottom, pfcBackScaleTop, pfcBackScaleMid, pfcBackScaleBottom };
 				backUdmfFlags = new List<CheckBox>() { cbLightAbsoluteBack, cblightfogBack, cbnodecalsBack, cbnofakecontrastBack, cbWrapMidtexBack, cbsmoothlightingBack, cbClipMidtexBack };
-				fsAlpha.SetLimits(0f, 1f);
 			} else {
 				tabs.TabPages.Remove(tabcustom);
 				settingsGroup.Visible = false;
@@ -179,7 +178,8 @@ namespace CodeImp.DoomBuilder.Windows
 			if(General.Map.FormatInterface.HasCustomFields) {
 				string renderStyle = fl.Fields.GetValue("renderstyle", "");
 				cbRenderStyle.SelectedIndex = (renderStyle == "add" ? 1 : 0);
-				fsAlpha.SetValueFrom(fl.Fields);
+				//fsAlpha.SetValueFrom(fl.Fields);
+				alpha.Text = General.Clamp(fl.Fields.GetValue("alpha", 1.0f), 0f, 1f).ToString();
 				lockNumber.Text = fl.Fields.GetValue("locknumber", 0).ToString();
 			}
 
@@ -227,8 +227,7 @@ namespace CodeImp.DoomBuilder.Windows
 					}
                 }
 
-                frontoffsetx.Text = fl.Front.OffsetX.ToString();
-                frontoffsety.Text = fl.Front.OffsetY.ToString();
+				frontTextureOffset.SetValues(fl.Front.OffsetX, fl.Front.OffsetY); //mxd
 			}
 
 			// Back settings
@@ -257,8 +256,7 @@ namespace CodeImp.DoomBuilder.Windows
 					}
                 }
  
-                backoffsetx.Text = fl.Back.OffsetX.ToString();
-                backoffsety.Text = fl.Back.OffsetY.ToString();
+				backTextureOffset.SetValues(fl.Back.OffsetX, fl.Back.OffsetY); //mxd
 			}
 
 			////////////////////////////////////////////////////////////////////////
@@ -311,8 +309,10 @@ namespace CodeImp.DoomBuilder.Windows
 					if(cbRenderStyle.SelectedIndex != -1 && i != cbRenderStyle.SelectedIndex)
 						cbRenderStyle.SelectedIndex = -1;
 
-					fsAlpha.SetValueFrom(l.Fields);
-					if(!string.IsNullOrEmpty(lockNumber.Text) && lockNumber.GetResult(0) != fl.Fields.GetValue("locknumber", 0))
+					if(!string.IsNullOrEmpty(alpha.Text) && General.Clamp(alpha.GetResultFloat(1.0f), 0f, 1f) != l.Fields.GetValue("alpha", 1.0f))
+						alpha.Text = "";
+
+					if(!string.IsNullOrEmpty(lockNumber.Text) && lockNumber.GetResult(0) != l.Fields.GetValue("locknumber", 0))
 						lockNumber.Text = "";
 				}
 
@@ -379,8 +379,7 @@ namespace CodeImp.DoomBuilder.Windows
 						}
                     }
  
-                    if (frontoffsetx.Text != l.Front.OffsetX.ToString()) frontoffsetx.Text = "";
-                    if (frontoffsety.Text != l.Front.OffsetY.ToString()) frontoffsety.Text = "";
+					frontTextureOffset.SetValues(l.Front.OffsetX, l.Front.OffsetY); //mxd
 				}
 
 				// Back settings
@@ -416,8 +415,7 @@ namespace CodeImp.DoomBuilder.Windows
 						}
                     }
  
-                    if (backoffsetx.Text != l.Back.OffsetX.ToString()) backoffsetx.Text = "";
-                    if (backoffsety.Text != l.Back.OffsetY.ToString()) backoffsety.Text = "";
+					backTextureOffset.SetValues(l.Back.OffsetX, l.Back.OffsetY); //mxd
 				}
 				
 				// Custom fields
@@ -534,6 +532,7 @@ namespace CodeImp.DoomBuilder.Windows
             bool hasAcs = !action.Empty && Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1;
             bool hasArg0str = General.Map.UDMF && hasAcs && !string.IsNullOrEmpty(arg0str.Text);
 			int lockNum = lockNumber.GetResult(0);
+			float alphaVal = General.Clamp(alpha.GetResultFloat(1.0f), 0f, 1.0f);
 			
 			// Go for all the lines
 			foreach(Linedef l in lines)
@@ -628,8 +627,8 @@ namespace CodeImp.DoomBuilder.Windows
 									}
                                 }
  
-                                l.Front.OffsetX = General.Clamp(frontoffsetx.GetResult(l.Front.OffsetX), min, max);
-								l.Front.OffsetY = General.Clamp(frontoffsety.GetResult(l.Front.OffsetY), min, max);
+								l.Front.OffsetX = General.Clamp(frontTextureOffset.GetValue1(l.Front.OffsetX), min, max); //mxd
+								l.Front.OffsetY = General.Clamp(frontTextureOffset.GetValue2(l.Front.OffsetY), min, max); //mxd
 
 								l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture));
 								l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture));
@@ -693,8 +692,8 @@ namespace CodeImp.DoomBuilder.Windows
 									}
 								}
 
-                                l.Back.OffsetX = General.Clamp(backoffsetx.GetResult(l.Back.OffsetX), min, max);
-								l.Back.OffsetY = General.Clamp(backoffsety.GetResult(l.Back.OffsetY), min, max);
+								l.Back.OffsetX = General.Clamp(backTextureOffset.GetValue1(l.Back.OffsetX), min, max); //mxd
+								l.Back.OffsetY = General.Clamp(backTextureOffset.GetValue2(l.Back.OffsetY), min, max); //mxd
 
 								l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture));
 								l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture));
@@ -716,12 +715,8 @@ namespace CodeImp.DoomBuilder.Windows
 						l.Fields.Remove("renderstyle");
 					}
 
-					fsAlpha.ApplyTo(l.Fields);
-
-					if(lockNum > 0)
-						l.Fields["locknumber"] = new UniValue(UniversalType.Integer, lockNum);
-					else if(l.Fields.ContainsKey("locknumber"))
-						l.Fields.Remove("locknumber");
+					UDMFTools.SetFloat(l.Fields, "alpha", alphaVal, 1.0f, false);
+					UDMFTools.SetInteger(l.Fields, "locknumber", lockNum, 0, false);
 				}
 
                 //mxd. apply arg0str
diff --git a/Source/Core/Windows/LinedefEditForm.resx b/Source/Core/Windows/LinedefEditForm.resx
index 093eaf24a6fe8c65c8df0c2d1b69429ead9a5c37..bdbfc28310f55a2dbe0294db71b31db4f133ca46 100644
--- a/Source/Core/Windows/LinedefEditForm.resx
+++ b/Source/Core/Windows/LinedefEditForm.resx
@@ -162,9 +162,6 @@
   <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>
@@ -174,22 +171,16 @@
   <metadata name="activationlabel.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
   </metadata>
-  <metadata name="label668.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </metadata>
-  <metadata name="label667.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</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="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
   </metadata>
-  <metadata name="label13.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="label14.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
   </metadata>
-  <metadata name="label14.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
   </metadata>
   <metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -234,9 +225,6 @@
   <metadata name="backside.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>
diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs
index 76dbafee916d6f306a32bbaf91689265e762fec7..e9508a0b68a3b198f040c567f18cf3a52755f6ac 100644
--- a/Source/Core/Windows/MainForm.cs
+++ b/Source/Core/Windows/MainForm.cs
@@ -2986,10 +2986,17 @@ namespace CodeImp.DoomBuilder.Windows
 			DialogResult result;
 
 			// Show sector edit dialog
-			SectorEditForm f = new SectorEditForm();
-			f.Setup(sectors);
-			result = f.ShowDialog(this);
-			f.Dispose();
+			if(General.Map.UDMF){ //mxd
+				SectorEditFormUDMF f = new SectorEditFormUDMF();
+				f.Setup(sectors);
+				result = f.ShowDialog(this);
+				f.Dispose();
+			}else{
+				SectorEditForm f = new SectorEditForm();
+				f.Setup(sectors);
+				result = f.ShowDialog(this);
+				f.Dispose();
+			}
 
 			return result;
 		}
diff --git a/Source/Core/Windows/SectorEditForm.Designer.cs b/Source/Core/Windows/SectorEditForm.Designer.cs
index 2ac21075462762ca432acb841afe27786865fe34..b8a3134db520b47d3618f6aaf6a9ac81dc937a6d 100644
--- a/Source/Core/Windows/SectorEditForm.Designer.cs
+++ b/Source/Core/Windows/SectorEditForm.Designer.cs
@@ -30,7 +30,6 @@ namespace CodeImp.DoomBuilder.Windows
 		{
 			System.Windows.Forms.Label label1;
 			System.Windows.Forms.Label label3;
-			System.Windows.Forms.GroupBox groupaction;
 			System.Windows.Forms.GroupBox groupeffect;
 			System.Windows.Forms.Label label9;
 			System.Windows.Forms.Label label8;
@@ -43,31 +42,19 @@ namespace CodeImp.DoomBuilder.Windows
 			this.brightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.browseeffect = new System.Windows.Forms.Button();
 			this.effect = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
-			this.panelTextureOffsets = new System.Windows.Forms.Panel();
-			this.ceilOffsetX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.lTexOffset = new System.Windows.Forms.Label();
-			this.floorOffsetY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.ceilOffsetY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.floorOffsetX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
-			this.label7 = new System.Windows.Forms.Label();
-			this.panelHeights = new System.Windows.Forms.Panel();
 			this.ceilingheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.sectorheightlabel = new System.Windows.Forms.Label();
 			this.sectorheight = new System.Windows.Forms.Label();
-			this.floorheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.floortex = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
+			this.floorheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
 			this.ceilingtex = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
 			this.cancel = new System.Windows.Forms.Button();
 			this.apply = new System.Windows.Forms.Button();
-			this.tabs = new System.Windows.Forms.TabControl();
-			this.tabproperties = new System.Windows.Forms.TabPage();
-			this.tabcustom = new System.Windows.Forms.TabPage();
-			this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
 			this.flatSelectorControl2 = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
 			this.flatSelectorControl1 = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
+			this.panel1 = new System.Windows.Forms.Panel();
 			label1 = new System.Windows.Forms.Label();
 			label3 = new System.Windows.Forms.Label();
-			groupaction = new System.Windows.Forms.GroupBox();
 			groupeffect = new System.Windows.Forms.GroupBox();
 			label9 = new System.Windows.Forms.Label();
 			label8 = new System.Windows.Forms.Label();
@@ -76,14 +63,9 @@ namespace CodeImp.DoomBuilder.Windows
 			label5 = new System.Windows.Forms.Label();
 			label2 = new System.Windows.Forms.Label();
 			label4 = new System.Windows.Forms.Label();
-			groupaction.SuspendLayout();
 			groupeffect.SuspendLayout();
 			groupfloorceiling.SuspendLayout();
-			this.panelTextureOffsets.SuspendLayout();
-			this.panelHeights.SuspendLayout();
-			this.tabs.SuspendLayout();
-			this.tabproperties.SuspendLayout();
-			this.tabcustom.SuspendLayout();
+			this.panel1.SuspendLayout();
 			this.SuspendLayout();
 			// 
 			// label1
@@ -104,40 +86,25 @@ namespace CodeImp.DoomBuilder.Windows
 			label3.Text = "Ceiling";
 			label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
 			// 
-			// groupaction
-			// 
-			groupaction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-						| System.Windows.Forms.AnchorStyles.Right)));
-			groupaction.Controls.Add(this.tagSelector);
-			groupaction.Location = new System.Drawing.Point(7, 290);
-			groupaction.Name = "groupaction";
-			groupaction.Size = new System.Drawing.Size(436, 71);
-			groupaction.TabIndex = 2;
-			groupaction.TabStop = false;
-			groupaction.Text = " Identification ";
-			// 
 			// tagSelector
 			// 
-			this.tagSelector.Location = new System.Drawing.Point(6, 21);
+			this.tagSelector.Location = new System.Drawing.Point(47, 52);
 			this.tagSelector.Name = "tagSelector";
-			this.tagSelector.Size = new System.Drawing.Size(369, 35);
+			this.tagSelector.Size = new System.Drawing.Size(384, 34);
 			this.tagSelector.TabIndex = 0;
 			// 
 			// groupeffect
 			// 
-			groupeffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-						| System.Windows.Forms.AnchorStyles.Right)));
-			groupeffect.Controls.Add(this.brightness);
 			groupeffect.Controls.Add(this.browseeffect);
-			groupeffect.Controls.Add(label9);
 			groupeffect.Controls.Add(this.effect);
 			groupeffect.Controls.Add(label8);
-			groupeffect.Location = new System.Drawing.Point(7, 176);
+			groupeffect.Controls.Add(this.tagSelector);
+			groupeffect.Location = new System.Drawing.Point(3, 165);
 			groupeffect.Name = "groupeffect";
-			groupeffect.Size = new System.Drawing.Size(436, 105);
+			groupeffect.Size = new System.Drawing.Size(436, 92);
 			groupeffect.TabIndex = 1;
 			groupeffect.TabStop = false;
-			groupeffect.Text = " Effects ";
+			groupeffect.Text = "Effect and Identification";
 			// 
 			// brightness
 			// 
@@ -145,7 +112,7 @@ namespace CodeImp.DoomBuilder.Windows
 			this.brightness.AllowNegative = false;
 			this.brightness.AllowRelative = true;
 			this.brightness.ButtonStep = 8F;
-			this.brightness.Location = new System.Drawing.Point(89, 61);
+			this.brightness.Location = new System.Drawing.Point(99, 124);
 			this.brightness.Name = "brightness";
 			this.brightness.Size = new System.Drawing.Size(73, 24);
 			this.brightness.StepValues = null;
@@ -155,7 +122,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			this.browseeffect.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
 			this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
-			this.browseeffect.Location = new System.Drawing.Point(385, 26);
+			this.browseeffect.Location = new System.Drawing.Point(402, 26);
 			this.browseeffect.Name = "browseeffect";
 			this.browseeffect.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
 			this.browseeffect.Size = new System.Drawing.Size(28, 25);
@@ -167,7 +134,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// label9
 			// 
 			label9.AutoSize = true;
-			label9.Location = new System.Drawing.Point(21, 66);
+			label9.Location = new System.Drawing.Point(31, 129);
 			label9.Name = "label9";
 			label9.Size = new System.Drawing.Size(62, 14);
 			label9.TabIndex = 2;
@@ -181,7 +148,7 @@ namespace CodeImp.DoomBuilder.Windows
 			this.effect.GeneralizedCategories = null;
 			this.effect.Location = new System.Drawing.Point(89, 28);
 			this.effect.Name = "effect";
-			this.effect.Size = new System.Drawing.Size(290, 21);
+			this.effect.Size = new System.Drawing.Size(307, 21);
 			this.effect.TabIndex = 0;
 			this.effect.Value = 402;
 			// 
@@ -196,120 +163,32 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			// groupfloorceiling
 			// 
-			groupfloorceiling.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-						| System.Windows.Forms.AnchorStyles.Right)));
-			groupfloorceiling.Controls.Add(this.panelTextureOffsets);
-			groupfloorceiling.Controls.Add(this.panelHeights);
+			groupfloorceiling.Controls.Add(this.brightness);
+			groupfloorceiling.Controls.Add(this.ceilingheight);
+			groupfloorceiling.Controls.Add(label6);
+			groupfloorceiling.Controls.Add(label9);
+			groupfloorceiling.Controls.Add(label5);
 			groupfloorceiling.Controls.Add(label2);
+			groupfloorceiling.Controls.Add(this.sectorheightlabel);
 			groupfloorceiling.Controls.Add(label4);
+			groupfloorceiling.Controls.Add(this.sectorheight);
 			groupfloorceiling.Controls.Add(this.floortex);
+			groupfloorceiling.Controls.Add(this.floorheight);
 			groupfloorceiling.Controls.Add(this.ceilingtex);
-			groupfloorceiling.Location = new System.Drawing.Point(7, 6);
+			groupfloorceiling.Location = new System.Drawing.Point(3, 3);
 			groupfloorceiling.Name = "groupfloorceiling";
-			groupfloorceiling.Size = new System.Drawing.Size(436, 161);
+			groupfloorceiling.Size = new System.Drawing.Size(436, 156);
 			groupfloorceiling.TabIndex = 0;
 			groupfloorceiling.TabStop = false;
 			groupfloorceiling.Text = "Floor and Ceiling ";
 			// 
-			// panelTextureOffsets
-			// 
-			this.panelTextureOffsets.Controls.Add(this.ceilOffsetX);
-			this.panelTextureOffsets.Controls.Add(this.lTexOffset);
-			this.panelTextureOffsets.Controls.Add(this.floorOffsetY);
-			this.panelTextureOffsets.Controls.Add(this.ceilOffsetY);
-			this.panelTextureOffsets.Controls.Add(this.floorOffsetX);
-			this.panelTextureOffsets.Controls.Add(this.label7);
-			this.panelTextureOffsets.Location = new System.Drawing.Point(6, 102);
-			this.panelTextureOffsets.Name = "panelTextureOffsets";
-			this.panelTextureOffsets.Size = new System.Drawing.Size(230, 58);
-			this.panelTextureOffsets.TabIndex = 31;
-			// 
-			// ceilOffsetX
-			// 
-			this.ceilOffsetX.AllowDecimal = false;
-			this.ceilOffsetX.AllowNegative = true;
-			this.ceilOffsetX.AllowRelative = true;
-			this.ceilOffsetX.ButtonStep = 1F;
-			this.ceilOffsetX.Location = new System.Drawing.Point(108, 3);
-			this.ceilOffsetX.Name = "ceilOffsetX";
-			this.ceilOffsetX.Size = new System.Drawing.Size(56, 24);
-			this.ceilOffsetX.StepValues = null;
-			this.ceilOffsetX.TabIndex = 25;
-			// 
-			// lTexOffset
-			// 
-			this.lTexOffset.AutoSize = true;
-			this.lTexOffset.Location = new System.Drawing.Point(4, 8);
-			this.lTexOffset.Name = "lTexOffset";
-			this.lTexOffset.Size = new System.Drawing.Size(99, 14);
-			this.lTexOffset.TabIndex = 24;
-			this.lTexOffset.Text = "Ceil. texture offset:";
-			// 
-			// floorOffsetY
-			// 
-			this.floorOffsetY.AllowDecimal = false;
-			this.floorOffsetY.AllowNegative = true;
-			this.floorOffsetY.AllowRelative = true;
-			this.floorOffsetY.ButtonStep = 1F;
-			this.floorOffsetY.Location = new System.Drawing.Point(170, 31);
-			this.floorOffsetY.Name = "floorOffsetY";
-			this.floorOffsetY.Size = new System.Drawing.Size(56, 24);
-			this.floorOffsetY.StepValues = null;
-			this.floorOffsetY.TabIndex = 29;
-			// 
-			// ceilOffsetY
-			// 
-			this.ceilOffsetY.AllowDecimal = false;
-			this.ceilOffsetY.AllowNegative = true;
-			this.ceilOffsetY.AllowRelative = true;
-			this.ceilOffsetY.ButtonStep = 1F;
-			this.ceilOffsetY.Location = new System.Drawing.Point(170, 3);
-			this.ceilOffsetY.Name = "ceilOffsetY";
-			this.ceilOffsetY.Size = new System.Drawing.Size(56, 24);
-			this.ceilOffsetY.StepValues = null;
-			this.ceilOffsetY.TabIndex = 26;
-			// 
-			// floorOffsetX
-			// 
-			this.floorOffsetX.AllowDecimal = false;
-			this.floorOffsetX.AllowNegative = true;
-			this.floorOffsetX.AllowRelative = true;
-			this.floorOffsetX.ButtonStep = 1F;
-			this.floorOffsetX.Location = new System.Drawing.Point(108, 31);
-			this.floorOffsetX.Name = "floorOffsetX";
-			this.floorOffsetX.Size = new System.Drawing.Size(56, 24);
-			this.floorOffsetX.StepValues = null;
-			this.floorOffsetX.TabIndex = 28;
-			// 
-			// label7
-			// 
-			this.label7.AutoSize = true;
-			this.label7.Location = new System.Drawing.Point(-1, 36);
-			this.label7.Name = "label7";
-			this.label7.Size = new System.Drawing.Size(103, 14);
-			this.label7.TabIndex = 27;
-			this.label7.Text = "Floor texture offset:";
-			// 
-			// panelHeights
-			// 
-			this.panelHeights.Controls.Add(this.ceilingheight);
-			this.panelHeights.Controls.Add(label6);
-			this.panelHeights.Controls.Add(label5);
-			this.panelHeights.Controls.Add(this.sectorheightlabel);
-			this.panelHeights.Controls.Add(this.sectorheight);
-			this.panelHeights.Controls.Add(this.floorheight);
-			this.panelHeights.Location = new System.Drawing.Point(6, 16);
-			this.panelHeights.Name = "panelHeights";
-			this.panelHeights.Size = new System.Drawing.Size(230, 85);
-			this.panelHeights.TabIndex = 30;
-			// 
 			// ceilingheight
 			// 
 			this.ceilingheight.AllowDecimal = false;
 			this.ceilingheight.AllowNegative = true;
 			this.ceilingheight.AllowRelative = true;
 			this.ceilingheight.ButtonStep = 8F;
-			this.ceilingheight.Location = new System.Drawing.Point(108, 4);
+			this.ceilingheight.Location = new System.Drawing.Point(99, 35);
 			this.ceilingheight.Name = "ceilingheight";
 			this.ceilingheight.Size = new System.Drawing.Size(88, 24);
 			this.ceilingheight.StepValues = null;
@@ -319,7 +198,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// label6
 			// 
 			label6.AutoSize = true;
-			label6.Location = new System.Drawing.Point(29, 9);
+			label6.Location = new System.Drawing.Point(20, 40);
 			label6.Name = "label6";
 			label6.Size = new System.Drawing.Size(73, 14);
 			label6.TabIndex = 19;
@@ -328,69 +207,69 @@ namespace CodeImp.DoomBuilder.Windows
 			// label5
 			// 
 			label5.AutoSize = true;
-			label5.Location = new System.Drawing.Point(36, 39);
+			label5.Location = new System.Drawing.Point(27, 70);
 			label5.Name = "label5";
 			label5.Size = new System.Drawing.Size(66, 14);
 			label5.TabIndex = 17;
 			label5.Text = "Floor height:";
 			// 
+			// label2
+			// 
+			label2.Location = new System.Drawing.Point(242, 16);
+			label2.Name = "label2";
+			label2.Size = new System.Drawing.Size(83, 16);
+			label2.TabIndex = 15;
+			label2.Text = "Floor";
+			label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+			// 
 			// sectorheightlabel
 			// 
 			this.sectorheightlabel.AutoSize = true;
-			this.sectorheightlabel.Location = new System.Drawing.Point(28, 65);
+			this.sectorheightlabel.Location = new System.Drawing.Point(19, 100);
 			this.sectorheightlabel.Name = "sectorheightlabel";
 			this.sectorheightlabel.Size = new System.Drawing.Size(74, 14);
 			this.sectorheightlabel.TabIndex = 20;
 			this.sectorheightlabel.Text = "Sector height:";
 			// 
+			// label4
+			// 
+			label4.Location = new System.Drawing.Point(337, 16);
+			label4.Name = "label4";
+			label4.Size = new System.Drawing.Size(83, 16);
+			label4.TabIndex = 14;
+			label4.Text = "Ceiling";
+			label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+			// 
 			// sectorheight
 			// 
 			this.sectorheight.AutoSize = true;
-			this.sectorheight.Location = new System.Drawing.Point(109, 65);
+			this.sectorheight.Location = new System.Drawing.Point(100, 100);
 			this.sectorheight.Name = "sectorheight";
 			this.sectorheight.Size = new System.Drawing.Size(13, 14);
 			this.sectorheight.TabIndex = 21;
 			this.sectorheight.Text = "0";
 			// 
+			// floortex
+			// 
+			this.floortex.Location = new System.Drawing.Point(242, 35);
+			this.floortex.Name = "floortex";
+			this.floortex.Size = new System.Drawing.Size(83, 105);
+			this.floortex.TabIndex = 2;
+			this.floortex.TextureName = "";
+			// 
 			// floorheight
 			// 
 			this.floorheight.AllowDecimal = false;
 			this.floorheight.AllowNegative = true;
 			this.floorheight.AllowRelative = true;
 			this.floorheight.ButtonStep = 8F;
-			this.floorheight.Location = new System.Drawing.Point(108, 34);
+			this.floorheight.Location = new System.Drawing.Point(99, 65);
 			this.floorheight.Name = "floorheight";
 			this.floorheight.Size = new System.Drawing.Size(88, 24);
 			this.floorheight.StepValues = null;
 			this.floorheight.TabIndex = 23;
 			this.floorheight.WhenTextChanged += new System.EventHandler(this.floorheight_TextChanged);
 			// 
-			// label2
-			// 
-			label2.Location = new System.Drawing.Point(242, 16);
-			label2.Name = "label2";
-			label2.Size = new System.Drawing.Size(83, 16);
-			label2.TabIndex = 15;
-			label2.Text = "Floor";
-			label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
-			// 
-			// label4
-			// 
-			label4.Location = new System.Drawing.Point(337, 16);
-			label4.Name = "label4";
-			label4.Size = new System.Drawing.Size(83, 16);
-			label4.TabIndex = 14;
-			label4.Text = "Ceiling";
-			label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
-			// 
-			// floortex
-			// 
-			this.floortex.Location = new System.Drawing.Point(242, 35);
-			this.floortex.Name = "floortex";
-			this.floortex.Size = new System.Drawing.Size(83, 105);
-			this.floortex.TabIndex = 2;
-			this.floortex.TextureName = "";
-			// 
 			// ceilingtex
 			// 
 			this.ceilingtex.Location = new System.Drawing.Point(337, 35);
@@ -403,7 +282,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 
 			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(355, 423);
+			this.cancel.Location = new System.Drawing.Point(346, 278);
 			this.cancel.Name = "cancel";
 			this.cancel.Size = new System.Drawing.Size(112, 25);
 			this.cancel.TabIndex = 2;
@@ -414,7 +293,7 @@ namespace CodeImp.DoomBuilder.Windows
 			// 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(236, 423);
+			this.apply.Location = new System.Drawing.Point(227, 278);
 			this.apply.Name = "apply";
 			this.apply.Size = new System.Drawing.Size(112, 25);
 			this.apply.TabIndex = 1;
@@ -422,69 +301,6 @@ namespace CodeImp.DoomBuilder.Windows
 			this.apply.UseVisualStyleBackColor = true;
 			this.apply.Click += new System.EventHandler(this.apply_Click);
 			// 
-			// 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.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(457, 396);
-			this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
-			this.tabs.TabIndex = 0;
-			// 
-			// tabproperties
-			// 
-			this.tabproperties.Controls.Add(groupaction);
-			this.tabproperties.Controls.Add(groupeffect);
-			this.tabproperties.Controls.Add(groupfloorceiling);
-			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(449, 369);
-			this.tabproperties.TabIndex = 0;
-			this.tabproperties.Text = "Properties";
-			this.tabproperties.UseVisualStyleBackColor = true;
-			// 
-			// 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.Padding = new System.Windows.Forms.Padding(3);
-			this.tabcustom.Size = new System.Drawing.Size(449, 369);
-			this.tabcustom.TabIndex = 1;
-			this.tabcustom.Text = "Custom";
-			this.tabcustom.UseVisualStyleBackColor = true;
-			this.tabcustom.MouseEnter += new System.EventHandler(this.tabcustom_MouseEnter);
-			// 
-			// fieldslist
-			// 
-			this.fieldslist.AllowInsert = true;
-			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.AutoInsertUserPrefix = true;
-			this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-			this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-			this.fieldslist.Location = new System.Drawing.Point(11, 11);
-			this.fieldslist.Margin = new System.Windows.Forms.Padding(8);
-			this.fieldslist.Name = "fieldslist";
-			this.fieldslist.PropertyColumnVisible = true;
-			this.fieldslist.PropertyColumnWidth = 150;
-			this.fieldslist.Size = new System.Drawing.Size(427, 347);
-			this.fieldslist.TabIndex = 1;
-			this.fieldslist.TypeColumnVisible = true;
-			this.fieldslist.TypeColumnWidth = 100;
-			this.fieldslist.ValueColumnVisible = true;
-			// 
 			// flatSelectorControl2
 			// 
 			this.flatSelectorControl2.Location = new System.Drawing.Point(271, 37);
@@ -501,14 +317,24 @@ namespace CodeImp.DoomBuilder.Windows
 			this.flatSelectorControl1.TabIndex = 12;
 			this.flatSelectorControl1.TextureName = "";
 			// 
+			// panel1
+			// 
+			this.panel1.BackColor = System.Drawing.SystemColors.ControlLightLight;
+			this.panel1.Controls.Add(groupfloorceiling);
+			this.panel1.Controls.Add(groupeffect);
+			this.panel1.Location = new System.Drawing.Point(12, 10);
+			this.panel1.Name = "panel1";
+			this.panel1.Size = new System.Drawing.Size(443, 260);
+			this.panel1.TabIndex = 3;
+			// 
 			// SectorEditForm
 			// 
 			this.AcceptButton = this.apply;
 			this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
 			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
 			this.CancelButton = this.cancel;
-			this.ClientSize = new System.Drawing.Size(477, 458);
-			this.Controls.Add(this.tabs);
+			this.ClientSize = new System.Drawing.Size(468, 310);
+			this.Controls.Add(this.panel1);
 			this.Controls.Add(this.cancel);
 			this.Controls.Add(this.apply);
 			this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -522,17 +348,11 @@ namespace CodeImp.DoomBuilder.Windows
 			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
 			this.Text = "Edit Sector";
 			this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.SectorEditForm_HelpRequested);
-			groupaction.ResumeLayout(false);
 			groupeffect.ResumeLayout(false);
 			groupeffect.PerformLayout();
 			groupfloorceiling.ResumeLayout(false);
-			this.panelTextureOffsets.ResumeLayout(false);
-			this.panelTextureOffsets.PerformLayout();
-			this.panelHeights.ResumeLayout(false);
-			this.panelHeights.PerformLayout();
-			this.tabs.ResumeLayout(false);
-			this.tabproperties.ResumeLayout(false);
-			this.tabcustom.ResumeLayout(false);
+			groupfloorceiling.PerformLayout();
+			this.panel1.ResumeLayout(false);
 			this.ResumeLayout(false);
 
 		}
@@ -541,14 +361,10 @@ namespace CodeImp.DoomBuilder.Windows
 
 		private System.Windows.Forms.Button cancel;
 		private System.Windows.Forms.Button apply;
-		private System.Windows.Forms.TabControl tabs;
-		private System.Windows.Forms.TabPage tabproperties;
-		private System.Windows.Forms.TabPage tabcustom;
 		private CodeImp.DoomBuilder.Controls.FlatSelectorControl floortex;
 		private CodeImp.DoomBuilder.Controls.FlatSelectorControl ceilingtex;
 		private CodeImp.DoomBuilder.Controls.FlatSelectorControl flatSelectorControl2;
 		private CodeImp.DoomBuilder.Controls.FlatSelectorControl flatSelectorControl1;
-		private CodeImp.DoomBuilder.Controls.FieldsEditorControl fieldslist;
 		private System.Windows.Forms.Label sectorheight;
 		private CodeImp.DoomBuilder.Controls.ActionSelectorControl effect;
 		private System.Windows.Forms.Button browseeffect;
@@ -556,14 +372,7 @@ namespace CodeImp.DoomBuilder.Windows
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilingheight;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorheight;
 		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox brightness;
-        private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilOffsetY;
-        private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilOffsetX;
-        private System.Windows.Forms.Label lTexOffset;
-        private System.Windows.Forms.Panel panelHeights;
-        private System.Windows.Forms.Panel panelTextureOffsets;
-        private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorOffsetY;
-        private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorOffsetX;
-        private System.Windows.Forms.Label label7;
 		private CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector tagSelector;
+		private System.Windows.Forms.Panel panel1;
 	}
 }
\ No newline at end of file
diff --git a/Source/Core/Windows/SectorEditForm.cs b/Source/Core/Windows/SectorEditForm.cs
index 93f216fbdba68f799cd764279bb4dd3c843ea9d0..aedb029754a64a85f1f4ea3e1dc4dad293c8d7bb 100644
--- a/Source/Core/Windows/SectorEditForm.cs
+++ b/Source/Core/Windows/SectorEditForm.cs
@@ -39,9 +39,6 @@ namespace CodeImp.DoomBuilder.Windows
 
 			// Fill effects list
 			effect.AddInfo(General.Map.Config.SortedSectorEffects.ToArray());
-			
-			// Fill universal fields list
-			fieldslist.ListFixedFields(General.Map.Config.SectorFields);
 
 			// Initialize image selectors
 			floortex.Initialize();
@@ -49,19 +46,6 @@ namespace CodeImp.DoomBuilder.Windows
 
 			// Set steps for brightness field
 			brightness.StepValues = General.Map.Config.BrightnessLevels;
-
-			// Custom fields?
-			if(!General.Map.FormatInterface.HasCustomFields)
-				tabs.TabPages.Remove(tabcustom);
-
-            //mxd. Texture offsets panel setup
-            if (!General.Map.UDMF) {
-                panelTextureOffsets.Visible = false;
-                panelHeights.Top = floortex.Top;
-            }
-			
-			// Initialize custom fields editor
-			fieldslist.Setup("sector");
 		}
 		
 		// This sets up the form to edit the given sectors
@@ -90,21 +74,9 @@ namespace CodeImp.DoomBuilder.Windows
 			floortex.TextureName = sc.FloorTexture;
 			ceilingtex.TextureName = sc.CeilTexture;
 
-            //mxd. Texture offsets
-            if (General.Map.UDMF) {
-                ceilOffsetX.Text = getUDMFTextureOffset(sc.Fields, "xpanningceiling").ToString();
-                ceilOffsetY.Text = getUDMFTextureOffset(sc.Fields, "ypanningceiling").ToString();
-                floorOffsetX.Text = getUDMFTextureOffset(sc.Fields, "xpanningfloor").ToString();
-                floorOffsetY.Text = getUDMFTextureOffset(sc.Fields, "ypanningfloor").ToString();
-            }
-
 			// Action
-			//tag.Text = sc.Tag.ToString();
 			tagSelector.Setup(); //mxd
 			tagSelector.SetTag(sc.Tag);//mxd
-
-			// Custom fields
-			fieldslist.SetValues(sc.Fields, true);
 			
 			////////////////////////////////////////////////////////////////////////
 			// Now go for all sectors and change the options when a setting is different
@@ -123,20 +95,8 @@ namespace CodeImp.DoomBuilder.Windows
 				if(s.FloorTexture != floortex.TextureName) floortex.TextureName = "";
 				if(s.CeilTexture != ceilingtex.TextureName) ceilingtex.TextureName = "";
 
-                //mxd. Texture offsets
-                if (General.Map.UDMF) {
-                    if (ceilOffsetX.Text != getUDMFTextureOffset(s.Fields, "xpanningceiling").ToString()) ceilOffsetX.Text = "";
-                    if (ceilOffsetY.Text != getUDMFTextureOffset(s.Fields, "ypanningceiling").ToString()) ceilOffsetY.Text = "";
-                    if (floorOffsetX.Text != getUDMFTextureOffset(s.Fields, "xpanningfloor").ToString()) floorOffsetX.Text = "";
-                    if (floorOffsetY.Text != getUDMFTextureOffset(s.Fields, "ypanningfloor").ToString()) floorOffsetY.Text = "";
-                }
-
 				// Action
-				//if(s.Tag.ToString() != tag.Text) tag.Text = "";
 				if(s.Tag != sc.Tag)	tagSelector.ClearTag(); //mxd
-
-				// Custom fields
-				fieldslist.SetValues(s.Fields, false);
 			}
 
 			// Show sector height
@@ -188,29 +148,6 @@ namespace CodeImp.DoomBuilder.Windows
 			}
 		}
 
-        //mxd
-        private float getUDMFTextureOffset(UniFields fields, string key) {
-            if (fields != null && fields.ContainsKey(key))
-                return (float)fields[key].Value;
-            return 0;
-        }
-
-        //mxd
-        private void setUDMFTextureOffset(UniFields fields, string key, float value) {
-            if (fields == null) return;
-
-            fields.BeforeFieldsChange();
-
-			if(value != 0) {
-				if(!fields.ContainsKey(key))
-					fields.Add(key, new UniValue(UniversalType.Float, value));
-				else
-					fields[key].Value = value;
-			} else if(fields.ContainsKey(key)) { //don't save default value
-				fields.Remove(key);
-			}
-        }
-
 		// OK clicked
 		private void apply_Click(object sender, EventArgs e)
 		{
@@ -230,14 +167,6 @@ namespace CodeImp.DoomBuilder.Windows
 				General.ShowWarningMessage("Sector effect must be between " + General.Map.FormatInterface.MinEffect + " and " + General.Map.FormatInterface.MaxEffect + ".", MessageBoxButtons.OK);
 				return;
 			}
-
-			// Verify the brightness
-            //mxd. We clamp it anyway, so...
-			/*if((brightness.GetResult(0) < General.Map.FormatInterface.MinBrightness) || (brightness.GetResult(0) > General.Map.FormatInterface.MaxBrightness))
-			{
-				General.ShowWarningMessage("Sector brightness must be between " + General.Map.FormatInterface.MinBrightness + " and " + General.Map.FormatInterface.MaxBrightness + ".", MessageBoxButtons.OK);
-				return;
-			}*/
 			
 			// Make undo
 			if(sectors.Count > 1) undodesc = sectors.Count + " sectors";
@@ -257,22 +186,7 @@ namespace CodeImp.DoomBuilder.Windows
 				s.SetCeilTexture(ceilingtex.GetResult(s.CeilTexture));
 
 				// Action
-				//s.Tag = General.Clamp(tag.GetResult(s.Tag), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag);
 				s.Tag = tagSelector.GetTag(s.Tag); //mxd
-
-				// Custom fields
-				fieldslist.Apply(s.Fields);
-
-                //mxd. Texture offsets
-                int min = General.Map.FormatInterface.MinTextureOffset;
-                int max = General.Map.FormatInterface.MaxTextureOffset;
-
-                if (General.Map.UDMF) {
-                    if (ceilOffsetX.Text != "") setUDMFTextureOffset(s.Fields, "xpanningceiling", General.Clamp(ceilOffsetX.GetResult((int)getUDMFTextureOffset(s.Fields, "xpanningceiling")), min, max));
-                    if (ceilOffsetY.Text != "") setUDMFTextureOffset(s.Fields, "ypanningceiling", General.Clamp(ceilOffsetY.GetResult((int)getUDMFTextureOffset(s.Fields, "ypanningceiling")), min, max));
-                    if (floorOffsetX.Text != "") setUDMFTextureOffset(s.Fields, "xpanningfloor", General.Clamp(floorOffsetX.GetResult((int)getUDMFTextureOffset(s.Fields, "xpanningfloor")), min, max));
-                    if (floorOffsetY.Text != "") setUDMFTextureOffset(s.Fields, "ypanningfloor", General.Clamp(floorOffsetY.GetResult((int)getUDMFTextureOffset(s.Fields, "ypanningfloor")), min, max));
-                }
 			}
 			
 			// Update the used textures
@@ -311,11 +225,6 @@ namespace CodeImp.DoomBuilder.Windows
 			UpdateSectorHeight();
 		}
 
-		//mxd
-		private void tabcustom_MouseEnter(object sender, EventArgs e) {
-			fieldslist.Focus();
-		}
-
 		// Help
 		private void SectorEditForm_HelpRequested(object sender, HelpEventArgs hlpevent)
 		{
diff --git a/Source/Core/Windows/SectorEditForm.resx b/Source/Core/Windows/SectorEditForm.resx
index 2c17eb7cfc39c5c03367d6e850348ca37e71ff39..b6c97be97a1bdafdd73bcfd0e51568ce145d3f5c 100644
--- a/Source/Core/Windows/SectorEditForm.resx
+++ b/Source/Core/Windows/SectorEditForm.resx
@@ -129,41 +129,17 @@
   <metadata name="label3.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="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="brightness.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="browseeffect.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</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="effect.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</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="groupfloorceiling.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
+  <metadata name="label9.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>
@@ -180,31 +156,10 @@
   <metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</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="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="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="flatSelectorControl2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="flatSelectorControl1.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>
\ No newline at end of file
diff --git a/Source/Core/Windows/SectorEditFormUDMF.Designer.cs b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..d4884d2689f1184eb51e1c884ea0f6994e1ec47e
--- /dev/null
+++ b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs
@@ -0,0 +1,975 @@
+namespace CodeImp.DoomBuilder.Windows
+{
+	partial class SectorEditFormUDMF
+	{
+		/// <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() {
+			System.Windows.Forms.GroupBox groupaction;
+			System.Windows.Forms.GroupBox groupeffect;
+			System.Windows.Forms.Label label14;
+			System.Windows.Forms.Label label9;
+			System.Windows.Forms.Label label13;
+			System.Windows.Forms.Label label2;
+			System.Windows.Forms.Label label8;
+			System.Windows.Forms.GroupBox groupfloorceiling;
+			System.Windows.Forms.Label label6;
+			System.Windows.Forms.Label label5;
+			this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector();
+			this.brightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.desaturation = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.soundSequence = new System.Windows.Forms.TextBox();
+			this.gravity = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.browseeffect = new System.Windows.Forms.Button();
+			this.effect = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
+			this.ceilingheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.sectorheightlabel = new System.Windows.Forms.Label();
+			this.sectorheight = new System.Windows.Forms.Label();
+			this.floorheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.tabs = new System.Windows.Forms.TabControl();
+			this.tabproperties = new System.Windows.Forms.TabPage();
+			this.groupBox3 = new System.Windows.Forms.GroupBox();
+			this.cbDropactors = new System.Windows.Forms.CheckBox();
+			this.cbNorespawn = new System.Windows.Forms.CheckBox();
+			this.cbNofallingdamage = new System.Windows.Forms.CheckBox();
+			this.cbHidden = new System.Windows.Forms.CheckBox();
+			this.cbSilent = new System.Windows.Forms.CheckBox();
+			this.tabSurfaces = new System.Windows.Forms.TabPage();
+			this.groupBox2 = new System.Windows.Forms.GroupBox();
+			this.floorAngleControl = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
+			this.label7 = new System.Windows.Forms.Label();
+			this.label10 = new System.Windows.Forms.Label();
+			this.floorAlpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.label11 = new System.Windows.Forms.Label();
+			this.floorRotation = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.floorLightAbsolute = new System.Windows.Forms.CheckBox();
+			this.label12 = new System.Windows.Forms.Label();
+			this.floorBrightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.floorRenderStyle = new System.Windows.Forms.ComboBox();
+			this.floorScale = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+			this.floorOffsets = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+			this.floortex = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
+			this.groupBox1 = new System.Windows.Forms.GroupBox();
+			this.ceilAngleControl = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
+			this.label3 = new System.Windows.Forms.Label();
+			this.label4 = new System.Windows.Forms.Label();
+			this.ceilAlpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.label1 = new System.Windows.Forms.Label();
+			this.ceilRotation = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.ceilLightAbsolute = new System.Windows.Forms.CheckBox();
+			this.labelLightFront = new System.Windows.Forms.Label();
+			this.ceilBrightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+			this.ceilRenderStyle = new System.Windows.Forms.ComboBox();
+			this.ceilScale = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+			this.ceilOffsets = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+			this.ceilingtex = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
+			this.tabcustom = new System.Windows.Forms.TabPage();
+			this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
+			this.cancel = new System.Windows.Forms.Button();
+			this.apply = new System.Windows.Forms.Button();
+			this.lightColor = new CodeImp.DoomBuilder.GZBuilder.Controls.ColorFieldsControl();
+			this.fadeColor = new CodeImp.DoomBuilder.GZBuilder.Controls.ColorFieldsControl();
+			groupaction = new System.Windows.Forms.GroupBox();
+			groupeffect = new System.Windows.Forms.GroupBox();
+			label14 = new System.Windows.Forms.Label();
+			label9 = new System.Windows.Forms.Label();
+			label13 = new System.Windows.Forms.Label();
+			label2 = new System.Windows.Forms.Label();
+			label8 = new System.Windows.Forms.Label();
+			groupfloorceiling = new System.Windows.Forms.GroupBox();
+			label6 = new System.Windows.Forms.Label();
+			label5 = new System.Windows.Forms.Label();
+			groupaction.SuspendLayout();
+			groupeffect.SuspendLayout();
+			groupfloorceiling.SuspendLayout();
+			this.tabs.SuspendLayout();
+			this.tabproperties.SuspendLayout();
+			this.groupBox3.SuspendLayout();
+			this.tabSurfaces.SuspendLayout();
+			this.groupBox2.SuspendLayout();
+			this.groupBox1.SuspendLayout();
+			this.tabcustom.SuspendLayout();
+			this.SuspendLayout();
+			// 
+			// groupaction
+			// 
+			groupaction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+						| System.Windows.Forms.AnchorStyles.Right)));
+			groupaction.Controls.Add(this.tagSelector);
+			groupaction.Location = new System.Drawing.Point(7, 341);
+			groupaction.Name = "groupaction";
+			groupaction.Size = new System.Drawing.Size(436, 71);
+			groupaction.TabIndex = 2;
+			groupaction.TabStop = false;
+			groupaction.Text = " Identification: ";
+			// 
+			// tagSelector
+			// 
+			this.tagSelector.Location = new System.Drawing.Point(6, 21);
+			this.tagSelector.Name = "tagSelector";
+			this.tagSelector.Size = new System.Drawing.Size(369, 35);
+			this.tagSelector.TabIndex = 0;
+			// 
+			// groupeffect
+			// 
+			groupeffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+						| System.Windows.Forms.AnchorStyles.Right)));
+			groupeffect.Controls.Add(this.fadeColor);
+			groupeffect.Controls.Add(this.lightColor);
+			groupeffect.Controls.Add(this.brightness);
+			groupeffect.Controls.Add(this.desaturation);
+			groupeffect.Controls.Add(label14);
+			groupeffect.Controls.Add(label9);
+			groupeffect.Controls.Add(label13);
+			groupeffect.Controls.Add(this.soundSequence);
+			groupeffect.Controls.Add(this.gravity);
+			groupeffect.Controls.Add(label2);
+			groupeffect.Controls.Add(this.browseeffect);
+			groupeffect.Controls.Add(this.effect);
+			groupeffect.Controls.Add(label8);
+			groupeffect.Location = new System.Drawing.Point(7, 160);
+			groupeffect.Name = "groupeffect";
+			groupeffect.Size = new System.Drawing.Size(436, 175);
+			groupeffect.TabIndex = 1;
+			groupeffect.TabStop = false;
+			groupeffect.Text = " Effects:";
+			// 
+			// brightness
+			// 
+			this.brightness.AllowDecimal = false;
+			this.brightness.AllowNegative = false;
+			this.brightness.AllowRelative = true;
+			this.brightness.ButtonStep = 8F;
+			this.brightness.Location = new System.Drawing.Point(125, 84);
+			this.brightness.Name = "brightness";
+			this.brightness.Size = new System.Drawing.Size(81, 24);
+			this.brightness.StepValues = null;
+			this.brightness.TabIndex = 24;
+			// 
+			// desaturation
+			// 
+			this.desaturation.AllowDecimal = true;
+			this.desaturation.AllowNegative = false;
+			this.desaturation.AllowRelative = false;
+			this.desaturation.ButtonStep = 0.1F;
+			this.desaturation.Location = new System.Drawing.Point(125, 142);
+			this.desaturation.Name = "desaturation";
+			this.desaturation.Size = new System.Drawing.Size(81, 24);
+			this.desaturation.StepValues = null;
+			this.desaturation.TabIndex = 28;
+			// 
+			// label14
+			// 
+			label14.AutoSize = true;
+			label14.Location = new System.Drawing.Point(27, 58);
+			label14.Name = "label14";
+			label14.Size = new System.Drawing.Size(92, 14);
+			label14.TabIndex = 3;
+			label14.Text = "Sound sequence:";
+			// 
+			// label9
+			// 
+			label9.AutoSize = true;
+			label9.Location = new System.Drawing.Point(57, 89);
+			label9.Name = "label9";
+			label9.Size = new System.Drawing.Size(62, 14);
+			label9.TabIndex = 2;
+			label9.Text = "Brightness:";
+			// 
+			// label13
+			// 
+			label13.Location = new System.Drawing.Point(45, 147);
+			label13.Name = "label13";
+			label13.Size = new System.Drawing.Size(74, 14);
+			label13.TabIndex = 27;
+			label13.Text = "Desaturation:";
+			label13.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// soundSequence
+			// 
+			this.soundSequence.Location = new System.Drawing.Point(125, 55);
+			this.soundSequence.Name = "soundSequence";
+			this.soundSequence.Size = new System.Drawing.Size(271, 20);
+			this.soundSequence.TabIndex = 2;
+			// 
+			// gravity
+			// 
+			this.gravity.AllowDecimal = true;
+			this.gravity.AllowNegative = true;
+			this.gravity.AllowRelative = true;
+			this.gravity.ButtonStep = 0.1F;
+			this.gravity.Location = new System.Drawing.Point(125, 112);
+			this.gravity.Name = "gravity";
+			this.gravity.Size = new System.Drawing.Size(81, 24);
+			this.gravity.StepValues = null;
+			this.gravity.TabIndex = 24;
+			// 
+			// label2
+			// 
+			label2.Location = new System.Drawing.Point(45, 117);
+			label2.Name = "label2";
+			label2.Size = new System.Drawing.Size(74, 14);
+			label2.TabIndex = 23;
+			label2.Text = "Gravity:";
+			label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// browseeffect
+			// 
+			this.browseeffect.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
+			this.browseeffect.Location = new System.Drawing.Point(402, 26);
+			this.browseeffect.Name = "browseeffect";
+			this.browseeffect.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
+			this.browseeffect.Size = new System.Drawing.Size(28, 25);
+			this.browseeffect.TabIndex = 1;
+			this.browseeffect.Text = " ";
+			this.browseeffect.UseVisualStyleBackColor = true;
+			this.browseeffect.Click += new System.EventHandler(this.browseeffect_Click);
+			// 
+			// effect
+			// 
+			this.effect.BackColor = System.Drawing.Color.Transparent;
+			this.effect.Cursor = System.Windows.Forms.Cursors.Default;
+			this.effect.Empty = false;
+			this.effect.GeneralizedCategories = null;
+			this.effect.Location = new System.Drawing.Point(68, 28);
+			this.effect.Name = "effect";
+			this.effect.Size = new System.Drawing.Size(328, 21);
+			this.effect.TabIndex = 0;
+			this.effect.Value = 402;
+			// 
+			// label8
+			// 
+			label8.AutoSize = true;
+			label8.Location = new System.Drawing.Point(17, 31);
+			label8.Name = "label8";
+			label8.Size = new System.Drawing.Size(45, 14);
+			label8.TabIndex = 0;
+			label8.Text = "Special:";
+			// 
+			// groupfloorceiling
+			// 
+			groupfloorceiling.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+						| System.Windows.Forms.AnchorStyles.Right)));
+			groupfloorceiling.Controls.Add(this.ceilingheight);
+			groupfloorceiling.Controls.Add(label6);
+			groupfloorceiling.Controls.Add(label5);
+			groupfloorceiling.Controls.Add(this.sectorheightlabel);
+			groupfloorceiling.Controls.Add(this.sectorheight);
+			groupfloorceiling.Controls.Add(this.floorheight);
+			groupfloorceiling.Location = new System.Drawing.Point(7, 6);
+			groupfloorceiling.Name = "groupfloorceiling";
+			groupfloorceiling.Size = new System.Drawing.Size(188, 148);
+			groupfloorceiling.TabIndex = 0;
+			groupfloorceiling.TabStop = false;
+			groupfloorceiling.Text = " Heights:";
+			// 
+			// ceilingheight
+			// 
+			this.ceilingheight.AllowDecimal = false;
+			this.ceilingheight.AllowNegative = true;
+			this.ceilingheight.AllowRelative = true;
+			this.ceilingheight.ButtonStep = 8F;
+			this.ceilingheight.Location = new System.Drawing.Point(89, 19);
+			this.ceilingheight.Name = "ceilingheight";
+			this.ceilingheight.Size = new System.Drawing.Size(88, 24);
+			this.ceilingheight.StepValues = null;
+			this.ceilingheight.TabIndex = 22;
+			this.ceilingheight.WhenTextChanged += new System.EventHandler(this.ceilingheight_WhenTextChanged);
+			// 
+			// label6
+			// 
+			label6.Location = new System.Drawing.Point(9, 24);
+			label6.Name = "label6";
+			label6.Size = new System.Drawing.Size(74, 14);
+			label6.TabIndex = 19;
+			label6.Text = "Ceiling height:";
+			label6.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// label5
+			// 
+			label5.Location = new System.Drawing.Point(9, 54);
+			label5.Name = "label5";
+			label5.Size = new System.Drawing.Size(74, 14);
+			label5.TabIndex = 17;
+			label5.Text = "Floor height:";
+			label5.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// sectorheightlabel
+			// 
+			this.sectorheightlabel.Location = new System.Drawing.Point(9, 83);
+			this.sectorheightlabel.Name = "sectorheightlabel";
+			this.sectorheightlabel.Size = new System.Drawing.Size(74, 14);
+			this.sectorheightlabel.TabIndex = 20;
+			this.sectorheightlabel.Text = "Sector height:";
+			this.sectorheightlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// sectorheight
+			// 
+			this.sectorheight.AutoSize = true;
+			this.sectorheight.Location = new System.Drawing.Point(90, 83);
+			this.sectorheight.Name = "sectorheight";
+			this.sectorheight.Size = new System.Drawing.Size(13, 14);
+			this.sectorheight.TabIndex = 21;
+			this.sectorheight.Text = "0";
+			// 
+			// floorheight
+			// 
+			this.floorheight.AllowDecimal = false;
+			this.floorheight.AllowNegative = true;
+			this.floorheight.AllowRelative = true;
+			this.floorheight.ButtonStep = 8F;
+			this.floorheight.Location = new System.Drawing.Point(89, 49);
+			this.floorheight.Name = "floorheight";
+			this.floorheight.Size = new System.Drawing.Size(88, 24);
+			this.floorheight.StepValues = null;
+			this.floorheight.TabIndex = 23;
+			this.floorheight.WhenTextChanged += new System.EventHandler(this.floorheight_WhenTextChanged);
+			// 
+			// 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.tabSurfaces);
+			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(457, 445);
+			this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
+			this.tabs.TabIndex = 1;
+			// 
+			// tabproperties
+			// 
+			this.tabproperties.Controls.Add(this.groupBox3);
+			this.tabproperties.Controls.Add(groupaction);
+			this.tabproperties.Controls.Add(groupeffect);
+			this.tabproperties.Controls.Add(groupfloorceiling);
+			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(449, 418);
+			this.tabproperties.TabIndex = 0;
+			this.tabproperties.Text = "Properties";
+			this.tabproperties.UseVisualStyleBackColor = true;
+			// 
+			// groupBox3
+			// 
+			this.groupBox3.Controls.Add(this.cbDropactors);
+			this.groupBox3.Controls.Add(this.cbNorespawn);
+			this.groupBox3.Controls.Add(this.cbNofallingdamage);
+			this.groupBox3.Controls.Add(this.cbHidden);
+			this.groupBox3.Controls.Add(this.cbSilent);
+			this.groupBox3.Location = new System.Drawing.Point(201, 6);
+			this.groupBox3.Name = "groupBox3";
+			this.groupBox3.Size = new System.Drawing.Size(242, 148);
+			this.groupBox3.TabIndex = 3;
+			this.groupBox3.TabStop = false;
+			this.groupBox3.Text = "Flags:";
+			// 
+			// cbDropactors
+			// 
+			this.cbDropactors.AutoSize = true;
+			this.cbDropactors.Location = new System.Drawing.Point(14, 119);
+			this.cbDropactors.Name = "cbDropactors";
+			this.cbDropactors.Size = new System.Drawing.Size(219, 18);
+			this.cbDropactors.TabIndex = 4;
+			this.cbDropactors.Tag = "dropactors";
+			this.cbDropactors.Text = "Actors drop with instantly moving floors";
+			this.cbDropactors.UseVisualStyleBackColor = true;
+			// 
+			// cbNorespawn
+			// 
+			this.cbNorespawn.AutoSize = true;
+			this.cbNorespawn.Location = new System.Drawing.Point(14, 95);
+			this.cbNorespawn.Name = "cbNorespawn";
+			this.cbNorespawn.Size = new System.Drawing.Size(135, 18);
+			this.cbNorespawn.TabIndex = 3;
+			this.cbNorespawn.Tag = "norespawn";
+			this.cbNorespawn.Text = "Players can\'t respawn";
+			this.cbNorespawn.UseVisualStyleBackColor = true;
+			// 
+			// cbNofallingdamage
+			// 
+			this.cbNofallingdamage.AutoSize = true;
+			this.cbNofallingdamage.Location = new System.Drawing.Point(14, 71);
+			this.cbNofallingdamage.Name = "cbNofallingdamage";
+			this.cbNofallingdamage.Size = new System.Drawing.Size(111, 18);
+			this.cbNofallingdamage.TabIndex = 2;
+			this.cbNofallingdamage.Tag = "nofallingdamage";
+			this.cbNofallingdamage.Text = "No falling damage";
+			this.cbNofallingdamage.UseVisualStyleBackColor = true;
+			// 
+			// cbHidden
+			// 
+			this.cbHidden.AutoSize = true;
+			this.cbHidden.Location = new System.Drawing.Point(14, 47);
+			this.cbHidden.Name = "cbHidden";
+			this.cbHidden.Size = new System.Drawing.Size(138, 18);
+			this.cbHidden.TabIndex = 1;
+			this.cbHidden.Tag = "hidden";
+			this.cbHidden.Text = "Not shown on automap";
+			this.cbHidden.UseVisualStyleBackColor = true;
+			// 
+			// cbSilent
+			// 
+			this.cbSilent.AutoSize = true;
+			this.cbSilent.Location = new System.Drawing.Point(14, 23);
+			this.cbSilent.Name = "cbSilent";
+			this.cbSilent.Size = new System.Drawing.Size(52, 18);
+			this.cbSilent.TabIndex = 0;
+			this.cbSilent.Tag = "silent";
+			this.cbSilent.Text = "Silent";
+			this.cbSilent.UseVisualStyleBackColor = true;
+			// 
+			// tabSurfaces
+			// 
+			this.tabSurfaces.Controls.Add(this.groupBox2);
+			this.tabSurfaces.Controls.Add(this.groupBox1);
+			this.tabSurfaces.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.tabSurfaces.Location = new System.Drawing.Point(4, 23);
+			this.tabSurfaces.Name = "tabSurfaces";
+			this.tabSurfaces.Size = new System.Drawing.Size(449, 418);
+			this.tabSurfaces.TabIndex = 2;
+			this.tabSurfaces.Text = "Surfaces";
+			this.tabSurfaces.UseVisualStyleBackColor = true;
+			// 
+			// groupBox2
+			// 
+			this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+						| System.Windows.Forms.AnchorStyles.Right)));
+			this.groupBox2.Controls.Add(this.floorAngleControl);
+			this.groupBox2.Controls.Add(this.label7);
+			this.groupBox2.Controls.Add(this.label10);
+			this.groupBox2.Controls.Add(this.floorAlpha);
+			this.groupBox2.Controls.Add(this.label11);
+			this.groupBox2.Controls.Add(this.floorRotation);
+			this.groupBox2.Controls.Add(this.floorLightAbsolute);
+			this.groupBox2.Controls.Add(this.label12);
+			this.groupBox2.Controls.Add(this.floorBrightness);
+			this.groupBox2.Controls.Add(this.floorRenderStyle);
+			this.groupBox2.Controls.Add(this.floorScale);
+			this.groupBox2.Controls.Add(this.floorOffsets);
+			this.groupBox2.Controls.Add(this.floortex);
+			this.groupBox2.Location = new System.Drawing.Point(3, 212);
+			this.groupBox2.Name = "groupBox2";
+			this.groupBox2.Size = new System.Drawing.Size(443, 203);
+			this.groupBox2.TabIndex = 55;
+			this.groupBox2.TabStop = false;
+			this.groupBox2.Text = "Floor:";
+			// 
+			// floorAngleControl
+			// 
+			this.floorAngleControl.Angle = 0;
+			this.floorAngleControl.Location = new System.Drawing.Point(186, 113);
+			this.floorAngleControl.Name = "floorAngleControl";
+			this.floorAngleControl.Size = new System.Drawing.Size(32, 32);
+			this.floorAngleControl.TabIndex = 56;
+			this.floorAngleControl.AngleChanged += new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl.AngleChangedDelegate(this.floorAngleControl_AngleChanged);
+			// 
+			// label7
+			// 
+			this.label7.Location = new System.Drawing.Point(29, 178);
+			this.label7.Name = "label7";
+			this.label7.Size = new System.Drawing.Size(80, 14);
+			this.label7.TabIndex = 54;
+			this.label7.Tag = "";
+			this.label7.Text = "Render style:";
+			this.label7.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// label10
+			// 
+			this.label10.Location = new System.Drawing.Point(29, 150);
+			this.label10.Name = "label10";
+			this.label10.Size = new System.Drawing.Size(80, 14);
+			this.label10.TabIndex = 52;
+			this.label10.Tag = "";
+			this.label10.Text = "Alpha:";
+			this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// floorAlpha
+			// 
+			this.floorAlpha.AllowDecimal = true;
+			this.floorAlpha.AllowNegative = false;
+			this.floorAlpha.AllowRelative = false;
+			this.floorAlpha.ButtonStep = 0.1F;
+			this.floorAlpha.Location = new System.Drawing.Point(118, 145);
+			this.floorAlpha.Name = "floorAlpha";
+			this.floorAlpha.Size = new System.Drawing.Size(62, 24);
+			this.floorAlpha.StepValues = null;
+			this.floorAlpha.TabIndex = 53;
+			this.floorAlpha.Tag = "";
+			// 
+			// label11
+			// 
+			this.label11.Location = new System.Drawing.Point(29, 120);
+			this.label11.Name = "label11";
+			this.label11.Size = new System.Drawing.Size(80, 14);
+			this.label11.TabIndex = 50;
+			this.label11.Tag = "";
+			this.label11.Text = "Rotation:";
+			this.label11.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// floorRotation
+			// 
+			this.floorRotation.AllowDecimal = false;
+			this.floorRotation.AllowNegative = true;
+			this.floorRotation.AllowRelative = true;
+			this.floorRotation.ButtonStep = 5F;
+			this.floorRotation.Location = new System.Drawing.Point(118, 115);
+			this.floorRotation.Name = "floorRotation";
+			this.floorRotation.Size = new System.Drawing.Size(62, 24);
+			this.floorRotation.StepValues = null;
+			this.floorRotation.TabIndex = 51;
+			this.floorRotation.Tag = "";
+			this.floorRotation.WhenTextChanged += new System.EventHandler(this.floorRotation_WhenTextChanged);
+			// 
+			// floorLightAbsolute
+			// 
+			this.floorLightAbsolute.AutoSize = true;
+			this.floorLightAbsolute.Location = new System.Drawing.Point(186, 89);
+			this.floorLightAbsolute.Name = "floorLightAbsolute";
+			this.floorLightAbsolute.Size = new System.Drawing.Size(69, 18);
+			this.floorLightAbsolute.TabIndex = 49;
+			this.floorLightAbsolute.Tag = "lightfloorabsolute";
+			this.floorLightAbsolute.Text = "Absolute";
+			this.floorLightAbsolute.UseVisualStyleBackColor = true;
+			// 
+			// label12
+			// 
+			this.label12.Location = new System.Drawing.Point(29, 90);
+			this.label12.Name = "label12";
+			this.label12.Size = new System.Drawing.Size(80, 14);
+			this.label12.TabIndex = 47;
+			this.label12.Tag = "";
+			this.label12.Text = "Brightness:";
+			this.label12.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// floorBrightness
+			// 
+			this.floorBrightness.AllowDecimal = false;
+			this.floorBrightness.AllowNegative = false;
+			this.floorBrightness.AllowRelative = true;
+			this.floorBrightness.ButtonStep = 16F;
+			this.floorBrightness.Location = new System.Drawing.Point(118, 85);
+			this.floorBrightness.Name = "floorBrightness";
+			this.floorBrightness.Size = new System.Drawing.Size(62, 24);
+			this.floorBrightness.StepValues = null;
+			this.floorBrightness.TabIndex = 48;
+			this.floorBrightness.Tag = "lightceiling";
+			// 
+			// floorRenderStyle
+			// 
+			this.floorRenderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+			this.floorRenderStyle.FormattingEnabled = true;
+			this.floorRenderStyle.Items.AddRange(new object[] {
+            "Translucent",
+            "Additive"});
+			this.floorRenderStyle.Location = new System.Drawing.Point(118, 175);
+			this.floorRenderStyle.Name = "floorRenderStyle";
+			this.floorRenderStyle.Size = new System.Drawing.Size(86, 22);
+			this.floorRenderStyle.TabIndex = 46;
+			// 
+			// floorScale
+			// 
+			this.floorScale.AllowDecimal = true;
+			this.floorScale.ButtonStep = 0.1F;
+			this.floorScale.DefaultValue = 1F;
+			this.floorScale.Field1 = "xscalefloor";
+			this.floorScale.Field2 = "yscalefloor";
+			this.floorScale.Label = "Texture Scale:";
+			this.floorScale.Location = new System.Drawing.Point(23, 51);
+			this.floorScale.Name = "floorScale";
+			this.floorScale.Size = new System.Drawing.Size(255, 28);
+			this.floorScale.TabIndex = 17;
+			// 
+			// floorOffsets
+			// 
+			this.floorOffsets.AllowDecimal = false;
+			this.floorOffsets.ButtonStep = 16F;
+			this.floorOffsets.DefaultValue = 0F;
+			this.floorOffsets.Field1 = "xpanningfloor";
+			this.floorOffsets.Field2 = "ypanningfloor";
+			this.floorOffsets.Label = "Texture Offsets:";
+			this.floorOffsets.Location = new System.Drawing.Point(23, 19);
+			this.floorOffsets.Name = "floorOffsets";
+			this.floorOffsets.Size = new System.Drawing.Size(255, 26);
+			this.floorOffsets.TabIndex = 16;
+			// 
+			// floortex
+			// 
+			this.floortex.Location = new System.Drawing.Point(338, 19);
+			this.floortex.Name = "floortex";
+			this.floortex.Size = new System.Drawing.Size(83, 105);
+			this.floortex.TabIndex = 15;
+			this.floortex.TextureName = "";
+			// 
+			// groupBox1
+			// 
+			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+						| System.Windows.Forms.AnchorStyles.Right)));
+			this.groupBox1.Controls.Add(this.ceilAngleControl);
+			this.groupBox1.Controls.Add(this.label3);
+			this.groupBox1.Controls.Add(this.label4);
+			this.groupBox1.Controls.Add(this.ceilAlpha);
+			this.groupBox1.Controls.Add(this.label1);
+			this.groupBox1.Controls.Add(this.ceilRotation);
+			this.groupBox1.Controls.Add(this.ceilLightAbsolute);
+			this.groupBox1.Controls.Add(this.labelLightFront);
+			this.groupBox1.Controls.Add(this.ceilBrightness);
+			this.groupBox1.Controls.Add(this.ceilRenderStyle);
+			this.groupBox1.Controls.Add(this.ceilScale);
+			this.groupBox1.Controls.Add(this.ceilOffsets);
+			this.groupBox1.Controls.Add(this.ceilingtex);
+			this.groupBox1.Location = new System.Drawing.Point(3, 3);
+			this.groupBox1.Name = "groupBox1";
+			this.groupBox1.Size = new System.Drawing.Size(443, 203);
+			this.groupBox1.TabIndex = 0;
+			this.groupBox1.TabStop = false;
+			this.groupBox1.Text = " Ceiling:";
+			// 
+			// ceilAngleControl
+			// 
+			this.ceilAngleControl.Angle = 0;
+			this.ceilAngleControl.Location = new System.Drawing.Point(186, 113);
+			this.ceilAngleControl.Name = "ceilAngleControl";
+			this.ceilAngleControl.Size = new System.Drawing.Size(32, 32);
+			this.ceilAngleControl.TabIndex = 55;
+			this.ceilAngleControl.AngleChanged += new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl.AngleChangedDelegate(this.ceilAngleControl_AngleChanged);
+			// 
+			// label3
+			// 
+			this.label3.Location = new System.Drawing.Point(29, 178);
+			this.label3.Name = "label3";
+			this.label3.Size = new System.Drawing.Size(80, 14);
+			this.label3.TabIndex = 54;
+			this.label3.Tag = "";
+			this.label3.Text = "Render style:";
+			this.label3.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// label4
+			// 
+			this.label4.Location = new System.Drawing.Point(29, 150);
+			this.label4.Name = "label4";
+			this.label4.Size = new System.Drawing.Size(80, 14);
+			this.label4.TabIndex = 52;
+			this.label4.Tag = "";
+			this.label4.Text = "Alpha:";
+			this.label4.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// ceilAlpha
+			// 
+			this.ceilAlpha.AllowDecimal = true;
+			this.ceilAlpha.AllowNegative = false;
+			this.ceilAlpha.AllowRelative = false;
+			this.ceilAlpha.ButtonStep = 0.1F;
+			this.ceilAlpha.Location = new System.Drawing.Point(118, 145);
+			this.ceilAlpha.Name = "ceilAlpha";
+			this.ceilAlpha.Size = new System.Drawing.Size(62, 24);
+			this.ceilAlpha.StepValues = null;
+			this.ceilAlpha.TabIndex = 53;
+			this.ceilAlpha.Tag = "";
+			// 
+			// label1
+			// 
+			this.label1.Location = new System.Drawing.Point(29, 120);
+			this.label1.Name = "label1";
+			this.label1.Size = new System.Drawing.Size(80, 14);
+			this.label1.TabIndex = 50;
+			this.label1.Tag = "";
+			this.label1.Text = "Rotation:";
+			this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// ceilRotation
+			// 
+			this.ceilRotation.AllowDecimal = false;
+			this.ceilRotation.AllowNegative = true;
+			this.ceilRotation.AllowRelative = true;
+			this.ceilRotation.ButtonStep = 5F;
+			this.ceilRotation.Location = new System.Drawing.Point(118, 115);
+			this.ceilRotation.Name = "ceilRotation";
+			this.ceilRotation.Size = new System.Drawing.Size(62, 24);
+			this.ceilRotation.StepValues = null;
+			this.ceilRotation.TabIndex = 51;
+			this.ceilRotation.Tag = "";
+			this.ceilRotation.WhenTextChanged += new System.EventHandler(this.ceilRotation_WhenTextChanged);
+			// 
+			// ceilLightAbsolute
+			// 
+			this.ceilLightAbsolute.AutoSize = true;
+			this.ceilLightAbsolute.Location = new System.Drawing.Point(186, 89);
+			this.ceilLightAbsolute.Name = "ceilLightAbsolute";
+			this.ceilLightAbsolute.Size = new System.Drawing.Size(69, 18);
+			this.ceilLightAbsolute.TabIndex = 49;
+			this.ceilLightAbsolute.Tag = "lightceilingabsolute";
+			this.ceilLightAbsolute.Text = "Absolute";
+			this.ceilLightAbsolute.UseVisualStyleBackColor = true;
+			// 
+			// labelLightFront
+			// 
+			this.labelLightFront.Location = new System.Drawing.Point(29, 90);
+			this.labelLightFront.Name = "labelLightFront";
+			this.labelLightFront.Size = new System.Drawing.Size(80, 14);
+			this.labelLightFront.TabIndex = 47;
+			this.labelLightFront.Tag = "";
+			this.labelLightFront.Text = "Brightness:";
+			this.labelLightFront.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// ceilBrightness
+			// 
+			this.ceilBrightness.AllowDecimal = false;
+			this.ceilBrightness.AllowNegative = false;
+			this.ceilBrightness.AllowRelative = true;
+			this.ceilBrightness.ButtonStep = 16F;
+			this.ceilBrightness.Location = new System.Drawing.Point(118, 85);
+			this.ceilBrightness.Name = "ceilBrightness";
+			this.ceilBrightness.Size = new System.Drawing.Size(62, 24);
+			this.ceilBrightness.StepValues = null;
+			this.ceilBrightness.TabIndex = 48;
+			this.ceilBrightness.Tag = "lightceiling";
+			// 
+			// ceilRenderStyle
+			// 
+			this.ceilRenderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+			this.ceilRenderStyle.FormattingEnabled = true;
+			this.ceilRenderStyle.Items.AddRange(new object[] {
+            "Translucent",
+            "Additive"});
+			this.ceilRenderStyle.Location = new System.Drawing.Point(118, 175);
+			this.ceilRenderStyle.Name = "ceilRenderStyle";
+			this.ceilRenderStyle.Size = new System.Drawing.Size(86, 22);
+			this.ceilRenderStyle.TabIndex = 46;
+			// 
+			// ceilScale
+			// 
+			this.ceilScale.AllowDecimal = true;
+			this.ceilScale.ButtonStep = 0.1F;
+			this.ceilScale.DefaultValue = 1F;
+			this.ceilScale.Field1 = "xscaleceiling";
+			this.ceilScale.Field2 = "yscaleceiling";
+			this.ceilScale.Label = "Texture Scale:";
+			this.ceilScale.Location = new System.Drawing.Point(23, 51);
+			this.ceilScale.Name = "ceilScale";
+			this.ceilScale.Size = new System.Drawing.Size(255, 28);
+			this.ceilScale.TabIndex = 17;
+			// 
+			// ceilOffsets
+			// 
+			this.ceilOffsets.AllowDecimal = false;
+			this.ceilOffsets.ButtonStep = 16F;
+			this.ceilOffsets.DefaultValue = 0F;
+			this.ceilOffsets.Field1 = "xpanningceiling";
+			this.ceilOffsets.Field2 = "ypanningceiling";
+			this.ceilOffsets.Label = "Texture Offsets:";
+			this.ceilOffsets.Location = new System.Drawing.Point(23, 19);
+			this.ceilOffsets.Name = "ceilOffsets";
+			this.ceilOffsets.Size = new System.Drawing.Size(255, 26);
+			this.ceilOffsets.TabIndex = 16;
+			// 
+			// ceilingtex
+			// 
+			this.ceilingtex.Location = new System.Drawing.Point(338, 19);
+			this.ceilingtex.Name = "ceilingtex";
+			this.ceilingtex.Size = new System.Drawing.Size(83, 105);
+			this.ceilingtex.TabIndex = 15;
+			this.ceilingtex.TextureName = "";
+			// 
+			// 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.Padding = new System.Windows.Forms.Padding(3);
+			this.tabcustom.Size = new System.Drawing.Size(449, 418);
+			this.tabcustom.TabIndex = 1;
+			this.tabcustom.Text = "Custom";
+			this.tabcustom.UseVisualStyleBackColor = true;
+			this.tabcustom.MouseEnter += new System.EventHandler(this.tabcustom_MouseEnter);
+			// 
+			// fieldslist
+			// 
+			this.fieldslist.AllowInsert = true;
+			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.AutoInsertUserPrefix = true;
+			this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+			this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.fieldslist.Location = new System.Drawing.Point(11, 11);
+			this.fieldslist.Margin = new System.Windows.Forms.Padding(8);
+			this.fieldslist.Name = "fieldslist";
+			this.fieldslist.PropertyColumnVisible = true;
+			this.fieldslist.PropertyColumnWidth = 150;
+			this.fieldslist.Size = new System.Drawing.Size(427, 397);
+			this.fieldslist.TabIndex = 1;
+			this.fieldslist.TypeColumnVisible = true;
+			this.fieldslist.TypeColumnWidth = 100;
+			this.fieldslist.ValueColumnVisible = true;
+			// 
+			// 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(355, 459);
+			this.cancel.Name = "cancel";
+			this.cancel.Size = new System.Drawing.Size(112, 25);
+			this.cancel.TabIndex = 4;
+			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(237, 459);
+			this.apply.Name = "apply";
+			this.apply.Size = new System.Drawing.Size(112, 25);
+			this.apply.TabIndex = 3;
+			this.apply.Text = "OK";
+			this.apply.UseVisualStyleBackColor = true;
+			this.apply.Click += new System.EventHandler(this.apply_Click);
+			// 
+			// lightColor
+			// 
+			this.lightColor.DefaultValue = 16777215;
+			this.lightColor.Field = "lightcolor";
+			this.lightColor.Label = "Light:";
+			this.lightColor.Location = new System.Drawing.Point(223, 82);
+			this.lightColor.Name = "lightColor";
+			this.lightColor.Size = new System.Drawing.Size(207, 29);
+			this.lightColor.TabIndex = 29;
+			// 
+			// fadeColor
+			// 
+			this.fadeColor.DefaultValue = 0;
+			this.fadeColor.Field = "fadecolor";
+			this.fadeColor.Label = "Fade:";
+			this.fadeColor.Location = new System.Drawing.Point(223, 111);
+			this.fadeColor.Name = "fadeColor";
+			this.fadeColor.Size = new System.Drawing.Size(207, 31);
+			this.fadeColor.TabIndex = 30;
+			// 
+			// SectorEditFormUDMF
+			// 
+			this.AcceptButton = this.apply;
+			this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+			this.CancelButton = this.cancel;
+			this.ClientSize = new System.Drawing.Size(477, 489);
+			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)(204)));
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+			this.MaximizeBox = false;
+			this.MinimizeBox = false;
+			this.Name = "SectorEditFormUDMF";
+			this.Opacity = 0;
+			this.ShowIcon = false;
+			this.ShowInTaskbar = false;
+			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+			this.Text = "Edit Sector";
+			this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.SectorEditFormUDMF_HelpRequested);
+			groupaction.ResumeLayout(false);
+			groupeffect.ResumeLayout(false);
+			groupeffect.PerformLayout();
+			groupfloorceiling.ResumeLayout(false);
+			groupfloorceiling.PerformLayout();
+			this.tabs.ResumeLayout(false);
+			this.tabproperties.ResumeLayout(false);
+			this.groupBox3.ResumeLayout(false);
+			this.groupBox3.PerformLayout();
+			this.tabSurfaces.ResumeLayout(false);
+			this.groupBox2.ResumeLayout(false);
+			this.groupBox2.PerformLayout();
+			this.groupBox1.ResumeLayout(false);
+			this.groupBox1.PerformLayout();
+			this.tabcustom.ResumeLayout(false);
+			this.ResumeLayout(false);
+
+		}
+
+		#endregion
+
+		private System.Windows.Forms.TabControl tabs;
+		private System.Windows.Forms.TabPage tabproperties;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector tagSelector;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox brightness;
+		private System.Windows.Forms.Button browseeffect;
+		private CodeImp.DoomBuilder.Controls.ActionSelectorControl effect;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilingheight;
+		private System.Windows.Forms.Label sectorheightlabel;
+		private System.Windows.Forms.Label sectorheight;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorheight;
+		private System.Windows.Forms.TabPage tabcustom;
+		private CodeImp.DoomBuilder.Controls.FieldsEditorControl fieldslist;
+		private System.Windows.Forms.Button cancel;
+		private System.Windows.Forms.Button apply;
+		private System.Windows.Forms.TabPage tabSurfaces;
+		private System.Windows.Forms.GroupBox groupBox1;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl ceilOffsets;
+		private CodeImp.DoomBuilder.Controls.FlatSelectorControl ceilingtex;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl ceilScale;
+		private System.Windows.Forms.ComboBox ceilRenderStyle;
+		private System.Windows.Forms.Label label4;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilAlpha;
+		private System.Windows.Forms.Label label1;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilRotation;
+		private System.Windows.Forms.CheckBox ceilLightAbsolute;
+		private System.Windows.Forms.Label labelLightFront;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilBrightness;
+		private System.Windows.Forms.Label label3;
+		private System.Windows.Forms.GroupBox groupBox2;
+		private System.Windows.Forms.Label label7;
+		private System.Windows.Forms.Label label10;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorAlpha;
+		private System.Windows.Forms.Label label11;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorRotation;
+		private System.Windows.Forms.CheckBox floorLightAbsolute;
+		private System.Windows.Forms.Label label12;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorBrightness;
+		private System.Windows.Forms.ComboBox floorRenderStyle;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl floorScale;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl floorOffsets;
+		private CodeImp.DoomBuilder.Controls.FlatSelectorControl floortex;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl floorAngleControl;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl ceilAngleControl;
+		private System.Windows.Forms.GroupBox groupBox3;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox gravity;
+		private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox desaturation;
+		private System.Windows.Forms.TextBox soundSequence;
+		private System.Windows.Forms.CheckBox cbDropactors;
+		private System.Windows.Forms.CheckBox cbNorespawn;
+		private System.Windows.Forms.CheckBox cbNofallingdamage;
+		private System.Windows.Forms.CheckBox cbHidden;
+		private System.Windows.Forms.CheckBox cbSilent;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.ColorFieldsControl fadeColor;
+		private CodeImp.DoomBuilder.GZBuilder.Controls.ColorFieldsControl lightColor;
+	}
+}
\ No newline at end of file
diff --git a/Source/Core/Windows/SectorEditFormUDMF.cs b/Source/Core/Windows/SectorEditFormUDMF.cs
new file mode 100644
index 0000000000000000000000000000000000000000..a47a8315be168cfc87e076c8ef7802ab85667a3f
--- /dev/null
+++ b/Source/Core/Windows/SectorEditFormUDMF.cs
@@ -0,0 +1,412 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using CodeImp.DoomBuilder.Map;
+using CodeImp.DoomBuilder.Types;
+using CodeImp.DoomBuilder.Rendering;
+using CodeImp.DoomBuilder.GZBuilder.Tools;
+
+namespace CodeImp.DoomBuilder.Windows
+{
+	public partial class SectorEditFormUDMF : DelayedForm
+	{
+		// Variables
+		private ICollection<Sector> sectors;
+		private List<CheckBox> flags;
+		
+		public SectorEditFormUDMF() {
+			InitializeComponent();
+
+			// Fill effects list
+			effect.AddInfo(General.Map.Config.SortedSectorEffects.ToArray());
+
+			// Fill universal fields list
+			fieldslist.ListFixedFields(General.Map.Config.SectorFields);
+
+			// Initialize image selectors
+			floortex.Initialize();
+			ceilingtex.Initialize();
+
+			// Set steps for brightness field
+			brightness.StepValues = General.Map.Config.BrightnessLevels;
+
+			// Custom fields?
+			if(!General.Map.FormatInterface.HasCustomFields)
+				tabs.TabPages.Remove(tabcustom);
+
+			flags = new List<CheckBox>() { cbDropactors, cbHidden, cbNofallingdamage, cbNorespawn, cbSilent, ceilLightAbsolute, floorLightAbsolute };
+
+			// Initialize custom fields editor
+			fieldslist.Setup("sector");
+		}
+
+		// This sets up the form to edit the given sectors
+		public void Setup(ICollection<Sector> sectors) {
+			Sector sc;
+
+			// Keep this list
+			this.sectors = sectors;
+			if(sectors.Count > 1) this.Text = "Edit Sectors (" + sectors.Count + ")";
+
+			////////////////////////////////////////////////////////////////////////
+			// Set all options to the first sector properties
+			////////////////////////////////////////////////////////////////////////
+
+			// Get first sector
+			sc = General.GetByIndex(sectors, 0);
+
+			// Effects
+			effect.Value = sc.Effect;
+			brightness.Text = sc.Brightness.ToString();
+
+			// Floor/ceiling
+			floorheight.Text = sc.FloorHeight.ToString();
+			ceilingheight.Text = sc.CeilHeight.ToString();
+			floortex.TextureName = sc.FloorTexture;
+			ceilingtex.TextureName = sc.CeilTexture;
+
+			//UDMF stuff
+			//Texture offsets
+			ceilOffsets.SetValuesFrom(sc.Fields);
+			floorOffsets.SetValuesFrom(sc.Fields);
+
+			//Texture scale
+			ceilScale.SetValuesFrom(sc.Fields);
+			floorScale.SetValuesFrom(sc.Fields);
+
+			//Texture rotation
+			float ceilAngle = sc.Fields.GetValue("rotationceiling", 0.0f);
+			float floorAngle = sc.Fields.GetValue("rotationfloor", 0.0f);
+
+			ceilRotation.Text = ceilAngle.ToString();
+			floorRotation.Text = floorAngle.ToString();
+
+			ceilAngleControl.Angle = General.ClampAngle(360 - (int)ceilAngle);
+			floorAngleControl.Angle = General.ClampAngle(360 - (int)floorAngle);
+
+			//Texture brightness
+			ceilBrightness.Text = sc.Fields.GetValue("lightceiling", 0).ToString();
+			floorBrightness.Text = sc.Fields.GetValue("lightfloor", 0).ToString();
+
+			//Alpha
+			ceilAlpha.Text = General.Clamp(sc.Fields.GetValue("alphaceiling", 1.0f), 0f, 1f).ToString();
+			floorAlpha.Text = General.Clamp(sc.Fields.GetValue("alphafloor", 1.0f), 0f, 1f).ToString();
+
+			//Render style
+			ceilRenderStyle.SelectedIndex = (sc.Fields.GetValue("renderstyleceiling", "") == "add" ? 1 : 0);
+			floorRenderStyle.SelectedIndex = (sc.Fields.GetValue("renderstylefloor", "") == "add" ? 1 : 0);
+
+			//Misc
+			soundSequence.Text = sc.Fields.GetValue("soundsequence", string.Empty);
+			gravity.Text = sc.Fields.GetValue("gravity", 1.0f).ToString();
+			desaturation.Text = General.Clamp(sc.Fields.GetValue("desaturation", 0.0f), 0f, 1f).ToString();
+
+			//Sector colors
+			fadeColor.SetValueFrom(sc.Fields);
+			lightColor.SetValueFrom(sc.Fields);
+
+			//Sector flags
+			foreach(CheckBox cb in flags) {
+				string key = cb.Tag.ToString();
+				if(sc.Fields != null)
+					cb.CheckState = (sc.Fields.GetValue(key, false) ? CheckState.Checked : CheckState.Unchecked);
+			}
+
+			// Action
+			tagSelector.Setup(); //mxd
+			tagSelector.SetTag(sc.Tag);//mxd
+
+			// Custom fields
+			fieldslist.SetValues(sc.Fields, true);
+
+			////////////////////////////////////////////////////////////////////////
+			// Now go for all sectors and change the options when a setting is different
+			////////////////////////////////////////////////////////////////////////
+
+			// Go for all sectors
+			foreach(Sector s in sectors) {
+				// Effects
+				if(s.Effect != effect.Value) effect.Empty = true;
+				if(s.Brightness.ToString() != brightness.Text) brightness.Text = "";
+
+				// Floor/Ceiling
+				if(s.FloorHeight.ToString() != floorheight.Text) floorheight.Text = "";
+				if(s.CeilHeight.ToString() != ceilingheight.Text) ceilingheight.Text = "";
+				if(s.FloorTexture != floortex.TextureName) floortex.TextureName = "";
+				if(s.CeilTexture != ceilingtex.TextureName) ceilingtex.TextureName = "";
+
+				//mxd. UDMF stuff
+				//Texture offsets
+				ceilOffsets.SetValuesFrom(s.Fields);
+				floorOffsets.SetValuesFrom(s.Fields);
+
+				//Texture scale
+				ceilScale.SetValuesFrom(s.Fields);
+				floorScale.SetValuesFrom(s.Fields);
+
+				//Texture rotation
+				if(s.Fields.GetValue("rotationceiling", 0.0f).ToString() != ceilRotation.Text) {
+					ceilRotation.Text = "";
+					ceilAngleControl.Angle = 0;
+				}
+				if(s.Fields.GetValue("rotationfloor", 0.0f).ToString() != floorRotation.Text) {
+					floorRotation.Text = "";
+					floorAngleControl.Angle = 0;
+				}
+
+				//Texture brightness
+				if(s.Fields.GetValue("lightceiling", 0).ToString() != ceilBrightness.Text) ceilBrightness.Text = "";
+				if(s.Fields.GetValue("lightfloor", 0).ToString() != floorBrightness.Text) floorBrightness.Text = "";
+
+				//Alpha
+				if(s.Fields.GetValue("alphaceiling", 1.0f).ToString() != ceilAlpha.Text) ceilAlpha.Text = "";
+				if(s.Fields.GetValue("alphafloor", 1.0f).ToString() != floorAlpha.Text) floorAlpha.Text = "";
+
+				//Render style
+				if(ceilRenderStyle.SelectedIndex != (s.Fields.GetValue("renderstyleceiling", "") == "add" ? 1 : 0)) ceilRenderStyle.SelectedIndex = -1;
+				if(floorRenderStyle.SelectedIndex != (s.Fields.GetValue("renderstylefloor", "") == "add" ? 1 : 0)) floorRenderStyle.SelectedIndex = -1;
+
+				//Misc
+				if(s.Fields.GetValue("soundsequence", string.Empty) != soundSequence.Text) soundSequence.Text = "";
+				if(s.Fields.GetValue("gravity", 1.0f).ToString() != gravity.Text) gravity.Text = "";
+				if(s.Fields.GetValue("desaturation", 0.0f).ToString() != desaturation.Text) desaturation.Text = "";
+
+				//Sector colors
+				fadeColor.SetValueFrom(s.Fields);
+				lightColor.SetValueFrom(s.Fields);
+
+				//Sector flags
+				foreach(CheckBox cb in flags) {
+					if(cb.CheckState == CheckState.Indeterminate) continue;
+
+					string key = cb.Tag.ToString();
+					if(s.Fields != null) {
+						CheckState state = (s.Fields.GetValue(key, false) ? CheckState.Checked : CheckState.Unchecked);
+						if(cb.CheckState != state) {
+							cb.ThreeState = true;
+							cb.CheckState = CheckState.Indeterminate;
+						}
+					}
+				}
+
+				// Action
+				if(s.Tag != sc.Tag) tagSelector.ClearTag(); //mxd
+
+				// Custom fields
+				fieldslist.SetValues(s.Fields, false);
+			}
+
+			// Show sector height
+			UpdateSectorHeight();
+		}
+
+		// This updates the sector height field
+		private void UpdateSectorHeight() {
+			bool showheight = true;
+			int delta = 0;
+			Sector first = null;
+
+			// Check all selected sectors
+			foreach(Sector s in sectors) {
+				if(first == null) {
+					// First sector in list
+					delta = s.CeilHeight - s.FloorHeight;
+					showheight = true;
+					first = s;
+				} else {
+					if(delta != (s.CeilHeight - s.FloorHeight)) {
+						// We can't show heights because the delta
+						// heights for the sectors is different
+						showheight = false;
+						break;
+					}
+				}
+			}
+
+			if(showheight) {
+				int fh = floorheight.GetResult(first.FloorHeight);
+				int ch = ceilingheight.GetResult(first.CeilHeight);
+				int height = ch - fh;
+				sectorheight.Text = height.ToString();
+				sectorheight.Visible = true;
+				sectorheightlabel.Visible = true;
+			} else {
+				sectorheight.Visible = false;
+				sectorheightlabel.Visible = false;
+			}
+		}
+
+		private void apply_Click(object sender, EventArgs e) {
+			string undodesc = "sector";
+
+			// Verify the tag
+			tagSelector.ValidateTag(); //mxd
+			if((tagSelector.GetTag(0) < General.Map.FormatInterface.MinTag) || (tagSelector.GetTag(0) > General.Map.FormatInterface.MaxTag)) {
+				General.ShowWarningMessage("Sector tag must be between " + General.Map.FormatInterface.MinTag + " and " + General.Map.FormatInterface.MaxTag + ".", MessageBoxButtons.OK);
+				return;
+			}
+
+			// Verify the effect
+			if((effect.Value < General.Map.FormatInterface.MinEffect) || (effect.Value > General.Map.FormatInterface.MaxEffect)) {
+				General.ShowWarningMessage("Sector effect must be between " + General.Map.FormatInterface.MinEffect + " and " + General.Map.FormatInterface.MaxEffect + ".", MessageBoxButtons.OK);
+				return;
+			}
+
+			// Make undo
+			if(sectors.Count > 1) undodesc = sectors.Count + " sectors";
+			General.Map.UndoRedo.CreateUndo("Edit " + undodesc);
+
+			// Go for all sectors
+			foreach(Sector s in sectors) {
+				// Effects
+				if(!effect.Empty) s.Effect = effect.Value;
+				s.Brightness = General.Clamp(brightness.GetResult(s.Brightness), General.Map.FormatInterface.MinBrightness, General.Map.FormatInterface.MaxBrightness);
+
+				// Floor/Ceiling
+				s.FloorHeight = floorheight.GetResult(s.FloorHeight);
+				s.CeilHeight = ceilingheight.GetResult(s.CeilHeight);
+				s.SetFloorTexture(floortex.GetResult(s.FloorTexture));
+				s.SetCeilTexture(ceilingtex.GetResult(s.CeilTexture));
+
+				// Action
+				s.Tag = tagSelector.GetTag(s.Tag); //mxd
+
+				// Custom fields
+				fieldslist.Apply(s.Fields);
+
+				//mxd. UDMF stuff
+				ceilOffsets.ApplyTo(s.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset);
+				floorOffsets.ApplyTo(s.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset);
+
+				ceilScale.ApplyTo(s.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset);
+				floorScale.ApplyTo(s.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset);
+
+				//rotation
+				if(ceilRotation.Text != ""){
+					float angle = General.ClampAngle(ceilRotation.GetResultFloat(0f));
+					UDMFTools.SetFloat(s.Fields, "rotationceiling", angle, 0f, false);
+				}
+
+				if(floorRotation.Text != "") {
+					float angle = General.ClampAngle(floorRotation.GetResultFloat(0f));
+					UDMFTools.SetFloat(s.Fields, "rotationfloor", angle, 0f, false);
+				}
+
+				//alpha
+				if(ceilAlpha.Text != "") {
+					float ceilAlphaVal = General.Clamp(ceilAlpha.GetResultFloat(1.0f), 0f, 1f);
+					UDMFTools.SetFloat(s.Fields, "alphaceiling", ceilAlphaVal, 1.0f, false);
+				}
+				
+				if(floorAlpha.Text != ""){
+					float floorAlphaVal = General.Clamp(floorAlpha.GetResultFloat(1.0f), 0f, 1f);
+					UDMFTools.SetFloat(s.Fields, "alphafloor", floorAlphaVal, 1.0f, false);
+				}
+
+				//renderstyle
+				if(ceilRenderStyle.SelectedIndex == 1) { //add
+					s.Fields["renderstyleceiling"] = new UniValue(UniversalType.String, "add");
+				} else if(s.Fields.ContainsKey("renderstyleceiling")) {
+					s.Fields.Remove("renderstyleceiling");
+				}
+
+				if(floorRenderStyle.SelectedIndex == 1) { //add
+					s.Fields["renderstylefloor"] = new UniValue(UniversalType.String, "add");
+				} else if(s.Fields.ContainsKey("renderstylefloor")) {
+					s.Fields.Remove("renderstylefloor");
+				}
+
+				//brightness
+				if(!string.IsNullOrEmpty(ceilBrightness.Text)) {
+					string key = ceilBrightness.Tag.ToString();
+					bool absolute = (ceilLightAbsolute.CheckState == CheckState.Checked);
+					int value = General.Clamp(ceilBrightness.GetResult(UDMFTools.GetInteger(s.Fields, key, 0)), (absolute ? 0 : -255), 255);
+					UDMFTools.SetInteger(s.Fields, key, value, 0, false);
+				}
+
+				if(!string.IsNullOrEmpty(floorBrightness.Text)) {
+					string key = floorBrightness.Tag.ToString();
+					bool absolute = (floorLightAbsolute.CheckState == CheckState.Checked);
+					int value = General.Clamp(floorBrightness.GetResult(UDMFTools.GetInteger(s.Fields, key, 0)), (absolute ? 0 : -255), 255);
+					UDMFTools.SetInteger(s.Fields, key, value, 0, false);
+				}
+
+				//Sector colors
+				fadeColor.ApplyTo(s.Fields);
+				lightColor.ApplyTo(s.Fields);
+
+				//misc
+				if(soundSequence.Text != "") s.Fields["soundsequence"] = new UniValue(UniversalType.String, soundSequence.Text);
+				if(gravity.Text != "") UDMFTools.SetFloat(s.Fields, "alphafloor", gravity.GetResultFloat(1.0f), 1.0f, false);
+				if(desaturation.Text != "") {
+					float val = General.Clamp(desaturation.GetResultFloat(0f), 0f, 1f);
+					UDMFTools.SetFloat(s.Fields, "desaturation", val, 0f, false);
+				}
+
+				//flags
+				foreach(CheckBox cb in flags) {
+					if(cb.CheckState == CheckState.Indeterminate) continue;
+					string key = cb.Tag.ToString();
+					bool oldValue = s.Fields.GetValue(key, false);
+
+					if(cb.CheckState == CheckState.Checked) {
+						if(!oldValue) s.Fields[key] = new UniValue(UniversalType.Boolean, true);
+					} else if(s.Fields.ContainsKey(key)) {
+						s.Fields.Remove(key);
+					}
+				}
+			}
+
+			// Update the used textures
+			General.Map.Data.UpdateUsedTextures();
+
+			// Done
+			General.Map.IsChanged = true;
+			this.DialogResult = DialogResult.OK;
+			this.Close();
+		}
+
+		private void cancel_Click(object sender, EventArgs e) {
+			// Be gone
+			this.DialogResult = DialogResult.Cancel;
+			this.Close();
+		}
+
+		private void browseeffect_Click(object sender, EventArgs e) {
+			effect.Value = EffectBrowserForm.BrowseEffect(this, effect.Value);
+		}
+
+		private void ceilingheight_WhenTextChanged(object sender, EventArgs e) {
+			UpdateSectorHeight();
+		}
+
+		private void floorheight_WhenTextChanged(object sender, EventArgs e) {
+			UpdateSectorHeight();
+		}
+
+		private void SectorEditFormUDMF_HelpRequested(object sender, HelpEventArgs hlpevent) {
+			General.ShowHelp("w_sectoredit.html");
+			hlpevent.Handled = true;
+		}
+
+		private void tabcustom_MouseEnter(object sender, EventArgs e) {
+			fieldslist.Focus();
+		}
+
+		private void ceilAngleControl_AngleChanged() {
+			ceilRotation.Text = (General.ClampAngle(360 - ceilAngleControl.Angle)).ToString();
+		}
+
+		private void floorAngleControl_AngleChanged() {
+			floorRotation.Text = (General.ClampAngle(360 - floorAngleControl.Angle)).ToString();
+		}
+
+		private void floorRotation_WhenTextChanged(object sender, EventArgs e) {
+			floorAngleControl.Angle = General.ClampAngle(360 - floorRotation.GetResult(0));
+		}
+
+		private void ceilRotation_WhenTextChanged(object sender, EventArgs e) {
+			ceilAngleControl.Angle = General.ClampAngle(360 - ceilRotation.GetResult(0));
+		}
+	}
+}
diff --git a/Source/Core/Windows/SectorEditFormUDMF.resx b/Source/Core/Windows/SectorEditFormUDMF.resx
new file mode 100644
index 0000000000000000000000000000000000000000..f3e8e41bc2a903f56376e6a9b958248d971e4b09
--- /dev/null
+++ b/Source/Core/Windows/SectorEditFormUDMF.resx
@@ -0,0 +1,168 @@
+<?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="groupaction.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</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="label14.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</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="label13.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</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="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="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</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.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</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="tabproperties.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="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file
diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
index cb38d79cc1db33b17f7b29ccba956675b544aaca..1c244c5b11d2828ce093568431b86333b9298329 100644
--- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
@@ -3113,7 +3113,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
 
 		//mxd. This converts offsetY from/to "normalized" offset for given lower wall
 		internal float GetBottomOffsetY(Sidedef side, float offset, float scaleY, bool fromNormalized) {
-			offset *= scaleY;
 			if(side.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag) || side.Other == null || side.Other.Sector == null)
 				return offset;
 
diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs
index 871562f425f7029dbc500ccdeae58e41c02e34a7..e121a200a6aa59c88c37444020391a3f81d779fe 100644
--- a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs
@@ -299,9 +299,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
 			if(fitWidth) {
 				float scaleX = Texture.ScaledWidth / Sidedef.Line.Length;
 				UDMFTools.SetFloat(Sidedef.Fields, "scalex_bottom", scaleX, 1.0f, false);
-
-				float offsetX = (float)Math.Round(-(float)Sidedef.OffsetX * scaleX);
-				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_bottom", offsetX, 0.0f, false);
+				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_bottom", -Sidedef.OffsetX, 0.0f, false);
 			}
 
 			if(fitHeight && Sidedef.Sector != null && Sidedef.Other.Sector != null) {
diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs
index 22b454b640403a6c3902529fc0de243da564815a..581496131ac41f2532852a7534c9066c0d82cf48 100644
--- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs
@@ -344,9 +344,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
 			if(fitWidth) {
 				float scaleX = Texture.ScaledWidth / Sidedef.Line.Length;
 				UDMFTools.SetFloat(Sidedef.Fields, "scalex_mid", scaleX, 1.0f, false);
-
-				float offsetX = (float)Math.Round(-(float)Sidedef.OffsetX * scaleX);
-				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_mid", offsetX, 0.0f, false);
+				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_mid", -Sidedef.OffsetX, 0.0f, false);
 			}
 
 			if(fitHeight && Sidedef.Sector != null) {
diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs
index ecd5c5cdeca33893eea70952ee71179effc5230a..3952bcdc9d1990b3603b658bd11bf2f3e0fbaa0d 100644
--- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs
@@ -295,9 +295,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
 			if(fitWidth) {
 				float scaleX = Texture.ScaledWidth / Sidedef.Line.Length;
 				UDMFTools.SetFloat(Sidedef.Fields, "scalex_mid", scaleX, 1.0f, false);
-
-				float offsetX = (float)Math.Round(-(float)Sidedef.OffsetX * scaleX);
-				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_mid", offsetX, 0.0f, false);
+				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_mid", -Sidedef.OffsetX, 0.0f, false);
 			}
 
 			if(fitHeight && Sidedef.Sector != null){
diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs
index 495922b933c7d95f1bb6908b6171ee8720ea2de0..4844b8cc706a8dbdeb51319f778f458be675d9ce 100644
--- a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs
@@ -298,9 +298,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
 			if(fitWidth) {
 				float scaleX = Texture.ScaledWidth / Sidedef.Line.Length;
 				UDMFTools.SetFloat(Sidedef.Fields, "scalex_top", scaleX, 1.0f, false);
-
-				float offsetX = (float)Math.Round(-(float)Sidedef.OffsetX * scaleX);
-				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_top", offsetX, 0.0f, false);
+				UDMFTools.SetFloat(Sidedef.Fields, "offsetx_top", -Sidedef.OffsetX, 0.0f, false);
 			}
 
 			if(fitHeight && Sidedef.Sector != null && Sidedef.Other.Sector != null) {