mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 07:31:36 +00:00
UDMF: vertical offsets of a vertex can now be edited in Vertex Edit form and are shown in Vertex Info panel.
Bridge mode: when source sidedefs don't have upper/lower textures, their middle textures are used instead.
This commit is contained in:
parent
a3f28cfe94
commit
94dce70ada
9 changed files with 279 additions and 44 deletions
|
@ -727,6 +727,7 @@
|
||||||
<Compile Include="GZBuilder\md3\GZModel.cs" />
|
<Compile Include="GZBuilder\md3\GZModel.cs" />
|
||||||
<Compile Include="GZBuilder\md3\ModelReader.cs" />
|
<Compile Include="GZBuilder\md3\ModelReader.cs" />
|
||||||
<Compile Include="GZBuilder\GZDoom\AcsParserSE.cs" />
|
<Compile Include="GZBuilder\GZDoom\AcsParserSE.cs" />
|
||||||
|
<Compile Include="GZBuilder\Tools\UDMFTools.cs" />
|
||||||
<Compile Include="IO\DoomColormapReader.cs" />
|
<Compile Include="IO\DoomColormapReader.cs" />
|
||||||
<Compile Include="Map\SelectionType.cs" />
|
<Compile Include="Map\SelectionType.cs" />
|
||||||
<Compile Include="Map\MapElementCollection.cs" />
|
<Compile Include="Map\MapElementCollection.cs" />
|
||||||
|
|
65
Source/Core/Controls/VertexInfoPanel.Designer.cs
generated
65
Source/Core/Controls/VertexInfoPanel.Designer.cs
generated
|
@ -31,14 +31,20 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
System.Windows.Forms.Label label1;
|
System.Windows.Forms.Label label1;
|
||||||
this.vertexinfo = new System.Windows.Forms.GroupBox();
|
this.vertexinfo = new System.Windows.Forms.GroupBox();
|
||||||
this.position = new System.Windows.Forms.Label();
|
this.position = new System.Windows.Forms.Label();
|
||||||
|
this.labelCeilingOffset = new System.Windows.Forms.Label();
|
||||||
|
this.labelFloorOffset = new System.Windows.Forms.Label();
|
||||||
|
this.zceiling = new System.Windows.Forms.Label();
|
||||||
|
this.zfloor = new System.Windows.Forms.Label();
|
||||||
|
this.panelOffsets = new System.Windows.Forms.Panel();
|
||||||
label1 = new System.Windows.Forms.Label();
|
label1 = new System.Windows.Forms.Label();
|
||||||
this.vertexinfo.SuspendLayout();
|
this.vertexinfo.SuspendLayout();
|
||||||
|
this.panelOffsets.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
label1.AutoSize = true;
|
label1.AutoSize = true;
|
||||||
label1.Location = new System.Drawing.Point(13, 34);
|
label1.Location = new System.Drawing.Point(13, 28);
|
||||||
label1.Name = "label1";
|
label1.Name = "label1";
|
||||||
label1.Size = new System.Drawing.Size(47, 14);
|
label1.Size = new System.Drawing.Size(47, 14);
|
||||||
label1.TabIndex = 2;
|
label1.TabIndex = 2;
|
||||||
|
@ -46,6 +52,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
//
|
//
|
||||||
// vertexinfo
|
// vertexinfo
|
||||||
//
|
//
|
||||||
|
this.vertexinfo.Controls.Add(this.panelOffsets);
|
||||||
this.vertexinfo.Controls.Add(this.position);
|
this.vertexinfo.Controls.Add(this.position);
|
||||||
this.vertexinfo.Controls.Add(label1);
|
this.vertexinfo.Controls.Add(label1);
|
||||||
this.vertexinfo.Location = new System.Drawing.Point(0, 0);
|
this.vertexinfo.Location = new System.Drawing.Point(0, 0);
|
||||||
|
@ -58,12 +65,59 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
// position
|
// position
|
||||||
//
|
//
|
||||||
this.position.AutoSize = true;
|
this.position.AutoSize = true;
|
||||||
this.position.Location = new System.Drawing.Point(66, 34);
|
this.position.Location = new System.Drawing.Point(66, 28);
|
||||||
this.position.Name = "position";
|
this.position.Name = "position";
|
||||||
this.position.Size = new System.Drawing.Size(25, 14);
|
this.position.Size = new System.Drawing.Size(25, 14);
|
||||||
this.position.TabIndex = 3;
|
this.position.TabIndex = 3;
|
||||||
this.position.Text = "0, 0";
|
this.position.Text = "0, 0";
|
||||||
//
|
//
|
||||||
|
// labelCeilingOffset
|
||||||
|
//
|
||||||
|
this.labelCeilingOffset.AutoSize = true;
|
||||||
|
this.labelCeilingOffset.Location = new System.Drawing.Point(7, 3);
|
||||||
|
this.labelCeilingOffset.Name = "labelCeilingOffset";
|
||||||
|
this.labelCeilingOffset.Size = new System.Drawing.Size(73, 14);
|
||||||
|
this.labelCeilingOffset.TabIndex = 4;
|
||||||
|
this.labelCeilingOffset.Text = "Ceiling offset:";
|
||||||
|
//
|
||||||
|
// labelFloorOffset
|
||||||
|
//
|
||||||
|
this.labelFloorOffset.AutoSize = true;
|
||||||
|
this.labelFloorOffset.Location = new System.Drawing.Point(14, 26);
|
||||||
|
this.labelFloorOffset.Name = "labelFloorOffset";
|
||||||
|
this.labelFloorOffset.Size = new System.Drawing.Size(66, 14);
|
||||||
|
this.labelFloorOffset.TabIndex = 5;
|
||||||
|
this.labelFloorOffset.Text = "Floor offset:";
|
||||||
|
//
|
||||||
|
// zceiling
|
||||||
|
//
|
||||||
|
this.zceiling.AutoSize = true;
|
||||||
|
this.zceiling.Location = new System.Drawing.Point(86, 3);
|
||||||
|
this.zceiling.Name = "zceiling";
|
||||||
|
this.zceiling.Size = new System.Drawing.Size(29, 14);
|
||||||
|
this.zceiling.TabIndex = 6;
|
||||||
|
this.zceiling.Text = "-512";
|
||||||
|
//
|
||||||
|
// zfloor
|
||||||
|
//
|
||||||
|
this.zfloor.AutoSize = true;
|
||||||
|
this.zfloor.Location = new System.Drawing.Point(86, 26);
|
||||||
|
this.zfloor.Name = "zfloor";
|
||||||
|
this.zfloor.Size = new System.Drawing.Size(29, 14);
|
||||||
|
this.zfloor.TabIndex = 7;
|
||||||
|
this.zfloor.Text = "-512";
|
||||||
|
//
|
||||||
|
// panelOffsets
|
||||||
|
//
|
||||||
|
this.panelOffsets.Controls.Add(this.zfloor);
|
||||||
|
this.panelOffsets.Controls.Add(this.labelCeilingOffset);
|
||||||
|
this.panelOffsets.Controls.Add(this.zceiling);
|
||||||
|
this.panelOffsets.Controls.Add(this.labelFloorOffset);
|
||||||
|
this.panelOffsets.Location = new System.Drawing.Point(6, 49);
|
||||||
|
this.panelOffsets.Name = "panelOffsets";
|
||||||
|
this.panelOffsets.Size = new System.Drawing.Size(151, 46);
|
||||||
|
this.panelOffsets.TabIndex = 1;
|
||||||
|
//
|
||||||
// VertexInfoPanel
|
// VertexInfoPanel
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
|
@ -76,6 +130,8 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.Size = new System.Drawing.Size(393, 100);
|
this.Size = new System.Drawing.Size(393, 100);
|
||||||
this.vertexinfo.ResumeLayout(false);
|
this.vertexinfo.ResumeLayout(false);
|
||||||
this.vertexinfo.PerformLayout();
|
this.vertexinfo.PerformLayout();
|
||||||
|
this.panelOffsets.ResumeLayout(false);
|
||||||
|
this.panelOffsets.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -84,6 +140,11 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
|
|
||||||
private System.Windows.Forms.Label position;
|
private System.Windows.Forms.Label position;
|
||||||
private System.Windows.Forms.GroupBox vertexinfo;
|
private System.Windows.Forms.GroupBox vertexinfo;
|
||||||
|
private System.Windows.Forms.Label zfloor;
|
||||||
|
private System.Windows.Forms.Label zceiling;
|
||||||
|
private System.Windows.Forms.Panel panelOffsets;
|
||||||
|
private System.Windows.Forms.Label labelCeilingOffset;
|
||||||
|
private System.Windows.Forms.Label labelFloorOffset;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ using Microsoft.Win32;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using CodeImp.DoomBuilder.Data;
|
using CodeImp.DoomBuilder.Data;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -47,6 +48,25 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
vertexinfo.Text = " Vertex " + v.Index + " ";
|
vertexinfo.Text = " Vertex " + v.Index + " ";
|
||||||
position.Text = v.Position.x.ToString("0.##") + ", " + v.Position.y.ToString("0.##");
|
position.Text = v.Position.x.ToString("0.##") + ", " + v.Position.y.ToString("0.##");
|
||||||
|
|
||||||
|
//mxd. Height offsets
|
||||||
|
if(General.Map.UDMF) {
|
||||||
|
float zc = UDMFTools.GetFloat(v.Fields, "zceiling", 0);
|
||||||
|
float zf = UDMFTools.GetFloat(v.Fields, "zfloor", 0);
|
||||||
|
|
||||||
|
zceiling.Enabled = (zc != 0);
|
||||||
|
labelCeilingOffset.Enabled = zceiling.Enabled;
|
||||||
|
|
||||||
|
zfloor.Enabled = (zf != 0);
|
||||||
|
labelFloorOffset.Enabled = zfloor.Enabled;
|
||||||
|
|
||||||
|
zceiling.Text = zc.ToString("0.##");
|
||||||
|
zfloor.Text = zf.ToString("0.##");
|
||||||
|
|
||||||
|
panelOffsets.Visible = true;
|
||||||
|
} else {
|
||||||
|
panelOffsets.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Show the whole thing
|
// Show the whole thing
|
||||||
this.Show();
|
this.Show();
|
||||||
this.Update();
|
this.Update();
|
||||||
|
|
|
@ -117,18 +117,12 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="vertexinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="vertexinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="position.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">
|
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
53
Source/Core/GZBuilder/Tools/UDMFTools.cs
Normal file
53
Source/Core/GZBuilder/Tools/UDMFTools.cs
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
using System;
|
||||||
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
using CodeImp.DoomBuilder.Types;
|
||||||
|
|
||||||
|
namespace CodeImp.DoomBuilder.GZBuilder.Tools
|
||||||
|
{
|
||||||
|
public static class UDMFTools
|
||||||
|
{
|
||||||
|
//float
|
||||||
|
public static float GetFloat(UniFields fields, string key, float defaultValue) {
|
||||||
|
if(fields != null && fields.ContainsKey(key))
|
||||||
|
return (float)fields[key].Value;
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetFloat(UniFields fields, string key, float value, float defaultValue, bool prepareUndo) {
|
||||||
|
if(fields == null) return;
|
||||||
|
|
||||||
|
if(prepareUndo) fields.BeforeFieldsChange();
|
||||||
|
|
||||||
|
if(value != defaultValue) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//int
|
||||||
|
public static int GetInteger(UniFields fields, string key, int defaultValue) {
|
||||||
|
if(fields != null && fields.ContainsKey(key))
|
||||||
|
return (int)fields[key].Value;
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetInteger(UniFields fields, string key, int value, int defaultValue, bool prepareUndo) {
|
||||||
|
if(fields == null) return;
|
||||||
|
|
||||||
|
if(prepareUndo) fields.BeforeFieldsChange();
|
||||||
|
|
||||||
|
if(value != defaultValue) {
|
||||||
|
if(!fields.ContainsKey(key))
|
||||||
|
fields.Add(key, new UniValue(UniversalType.Integer, value));
|
||||||
|
else
|
||||||
|
fields[key].Value = value;
|
||||||
|
} else if(fields.ContainsKey(key)) { //don't save default value
|
||||||
|
fields.Remove(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
122
Source/Core/Windows/VertexEditForm.Designer.cs
generated
122
Source/Core/Windows/VertexEditForm.Designer.cs
generated
|
@ -29,23 +29,31 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.TabPage tabproperties;
|
System.Windows.Forms.TabPage tabproperties;
|
||||||
|
System.Windows.Forms.Label label3;
|
||||||
|
System.Windows.Forms.Label label2;
|
||||||
System.Windows.Forms.Label label1;
|
System.Windows.Forms.Label label1;
|
||||||
System.Windows.Forms.Label label6;
|
System.Windows.Forms.Label label6;
|
||||||
this.groupposition = new System.Windows.Forms.GroupBox();
|
this.groupposition = new System.Windows.Forms.GroupBox();
|
||||||
|
this.zfloor = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||||
|
this.zceiling = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||||
|
this.positiony = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||||
|
this.positionx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||||
this.tabs = new System.Windows.Forms.TabControl();
|
this.tabs = new System.Windows.Forms.TabControl();
|
||||||
this.tabcustom = new System.Windows.Forms.TabPage();
|
this.tabcustom = new System.Windows.Forms.TabPage();
|
||||||
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
|
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
|
||||||
this.cancel = new System.Windows.Forms.Button();
|
this.cancel = new System.Windows.Forms.Button();
|
||||||
this.apply = new System.Windows.Forms.Button();
|
this.apply = new System.Windows.Forms.Button();
|
||||||
this.positionx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
this.panelHeightControls = new System.Windows.Forms.Panel();
|
||||||
this.positiony = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
|
||||||
tabproperties = new System.Windows.Forms.TabPage();
|
tabproperties = new System.Windows.Forms.TabPage();
|
||||||
|
label3 = new System.Windows.Forms.Label();
|
||||||
|
label2 = new System.Windows.Forms.Label();
|
||||||
label1 = new System.Windows.Forms.Label();
|
label1 = new System.Windows.Forms.Label();
|
||||||
label6 = new System.Windows.Forms.Label();
|
label6 = new System.Windows.Forms.Label();
|
||||||
tabproperties.SuspendLayout();
|
tabproperties.SuspendLayout();
|
||||||
this.groupposition.SuspendLayout();
|
this.groupposition.SuspendLayout();
|
||||||
this.tabs.SuspendLayout();
|
this.tabs.SuspendLayout();
|
||||||
this.tabcustom.SuspendLayout();
|
this.tabcustom.SuspendLayout();
|
||||||
|
this.panelHeightControls.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// tabproperties
|
// tabproperties
|
||||||
|
@ -65,6 +73,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.groupposition.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.groupposition.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.groupposition.Controls.Add(this.panelHeightControls);
|
||||||
this.groupposition.Controls.Add(this.positiony);
|
this.groupposition.Controls.Add(this.positiony);
|
||||||
this.groupposition.Controls.Add(this.positionx);
|
this.groupposition.Controls.Add(this.positionx);
|
||||||
this.groupposition.Controls.Add(label1);
|
this.groupposition.Controls.Add(label1);
|
||||||
|
@ -76,12 +85,78 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.groupposition.TabStop = false;
|
this.groupposition.TabStop = false;
|
||||||
this.groupposition.Text = " Position ";
|
this.groupposition.Text = " Position ";
|
||||||
//
|
//
|
||||||
|
// zfloor
|
||||||
|
//
|
||||||
|
this.zfloor.AllowDecimal = false;
|
||||||
|
this.zfloor.AllowNegative = true;
|
||||||
|
this.zfloor.AllowRelative = true;
|
||||||
|
this.zfloor.ButtonStep = 1;
|
||||||
|
this.zfloor.Location = new System.Drawing.Point(188, 32);
|
||||||
|
this.zfloor.Name = "zfloor";
|
||||||
|
this.zfloor.Size = new System.Drawing.Size(120, 24);
|
||||||
|
this.zfloor.StepValues = null;
|
||||||
|
this.zfloor.TabIndex = 29;
|
||||||
|
//
|
||||||
|
// zceiling
|
||||||
|
//
|
||||||
|
this.zceiling.AllowDecimal = false;
|
||||||
|
this.zceiling.AllowNegative = true;
|
||||||
|
this.zceiling.AllowRelative = true;
|
||||||
|
this.zceiling.ButtonStep = 1;
|
||||||
|
this.zceiling.Location = new System.Drawing.Point(188, 0);
|
||||||
|
this.zceiling.Name = "zceiling";
|
||||||
|
this.zceiling.Size = new System.Drawing.Size(120, 24);
|
||||||
|
this.zceiling.StepValues = null;
|
||||||
|
this.zceiling.TabIndex = 28;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new System.Drawing.Point(63, 5);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new System.Drawing.Size(118, 14);
|
||||||
|
label3.TabIndex = 27;
|
||||||
|
label3.Text = "Absolute ceiling height:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new System.Drawing.Point(71, 37);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new System.Drawing.Size(110, 14);
|
||||||
|
label2.TabIndex = 26;
|
||||||
|
label2.Text = "Absolute floor height:";
|
||||||
|
//
|
||||||
|
// positiony
|
||||||
|
//
|
||||||
|
this.positiony.AllowDecimal = false;
|
||||||
|
this.positiony.AllowNegative = true;
|
||||||
|
this.positiony.AllowRelative = true;
|
||||||
|
this.positiony.ButtonStep = 1;
|
||||||
|
this.positiony.Location = new System.Drawing.Point(236, 34);
|
||||||
|
this.positiony.Name = "positiony";
|
||||||
|
this.positiony.Size = new System.Drawing.Size(120, 24);
|
||||||
|
this.positiony.StepValues = null;
|
||||||
|
this.positiony.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// positionx
|
||||||
|
//
|
||||||
|
this.positionx.AllowDecimal = false;
|
||||||
|
this.positionx.AllowNegative = true;
|
||||||
|
this.positionx.AllowRelative = true;
|
||||||
|
this.positionx.ButtonStep = 1;
|
||||||
|
this.positionx.Location = new System.Drawing.Point(68, 34);
|
||||||
|
this.positionx.Name = "positionx";
|
||||||
|
this.positionx.Size = new System.Drawing.Size(120, 24);
|
||||||
|
this.positionx.StepValues = null;
|
||||||
|
this.positionx.TabIndex = 24;
|
||||||
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
label1.AutoSize = true;
|
label1.AutoSize = true;
|
||||||
label1.Location = new System.Drawing.Point(212, 39);
|
label1.Location = new System.Drawing.Point(212, 39);
|
||||||
label1.Name = "label1";
|
label1.Name = "label1";
|
||||||
label1.Size = new System.Drawing.Size(18, 14);
|
label1.Size = new System.Drawing.Size(17, 14);
|
||||||
label1.TabIndex = 23;
|
label1.TabIndex = 23;
|
||||||
label1.Text = "Y:";
|
label1.Text = "Y:";
|
||||||
//
|
//
|
||||||
|
@ -124,16 +199,23 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//
|
//
|
||||||
// fieldslist
|
// fieldslist
|
||||||
//
|
//
|
||||||
|
this.fieldslist.AllowInsert = true;
|
||||||
this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
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.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.fieldslist.AutoInsertUserPrefix = true;
|
||||||
this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
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.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.Location = new System.Drawing.Point(11, 11);
|
||||||
this.fieldslist.Margin = new System.Windows.Forms.Padding(8);
|
this.fieldslist.Margin = new System.Windows.Forms.Padding(8);
|
||||||
this.fieldslist.Name = "fieldslist";
|
this.fieldslist.Name = "fieldslist";
|
||||||
|
this.fieldslist.PropertyColumnVisible = true;
|
||||||
|
this.fieldslist.PropertyColumnWidth = 150;
|
||||||
this.fieldslist.Size = new System.Drawing.Size(406, 187);
|
this.fieldslist.Size = new System.Drawing.Size(406, 187);
|
||||||
this.fieldslist.TabIndex = 2;
|
this.fieldslist.TabIndex = 2;
|
||||||
|
this.fieldslist.TypeColumnVisible = true;
|
||||||
|
this.fieldslist.TypeColumnWidth = 100;
|
||||||
|
this.fieldslist.ValueColumnVisible = true;
|
||||||
//
|
//
|
||||||
// cancel
|
// cancel
|
||||||
//
|
//
|
||||||
|
@ -158,27 +240,16 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.apply.UseVisualStyleBackColor = true;
|
this.apply.UseVisualStyleBackColor = true;
|
||||||
this.apply.Click += new System.EventHandler(this.apply_Click);
|
this.apply.Click += new System.EventHandler(this.apply_Click);
|
||||||
//
|
//
|
||||||
// positionx
|
// panelHeightControls
|
||||||
//
|
//
|
||||||
this.positionx.AllowDecimal = false;
|
this.panelHeightControls.Controls.Add(this.zceiling);
|
||||||
this.positionx.AllowNegative = true;
|
this.panelHeightControls.Controls.Add(this.zfloor);
|
||||||
this.positionx.AllowRelative = true;
|
this.panelHeightControls.Controls.Add(label2);
|
||||||
this.positionx.ButtonStep = 1;
|
this.panelHeightControls.Controls.Add(label3);
|
||||||
this.positionx.Location = new System.Drawing.Point(68, 34);
|
this.panelHeightControls.Location = new System.Drawing.Point(48, 73);
|
||||||
this.positionx.Name = "positionx";
|
this.panelHeightControls.Name = "panelHeightControls";
|
||||||
this.positionx.Size = new System.Drawing.Size(120, 24);
|
this.panelHeightControls.Size = new System.Drawing.Size(308, 100);
|
||||||
this.positionx.TabIndex = 24;
|
this.panelHeightControls.TabIndex = 30;
|
||||||
//
|
|
||||||
// positiony
|
|
||||||
//
|
|
||||||
this.positiony.AllowDecimal = false;
|
|
||||||
this.positiony.AllowNegative = true;
|
|
||||||
this.positiony.AllowRelative = true;
|
|
||||||
this.positiony.ButtonStep = 1;
|
|
||||||
this.positiony.Location = new System.Drawing.Point(236, 34);
|
|
||||||
this.positiony.Name = "positiony";
|
|
||||||
this.positiony.Size = new System.Drawing.Size(120, 24);
|
|
||||||
this.positiony.TabIndex = 25;
|
|
||||||
//
|
//
|
||||||
// VertexEditForm
|
// VertexEditForm
|
||||||
//
|
//
|
||||||
|
@ -204,6 +275,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.groupposition.PerformLayout();
|
this.groupposition.PerformLayout();
|
||||||
this.tabs.ResumeLayout(false);
|
this.tabs.ResumeLayout(false);
|
||||||
this.tabcustom.ResumeLayout(false);
|
this.tabcustom.ResumeLayout(false);
|
||||||
|
this.panelHeightControls.ResumeLayout(false);
|
||||||
|
this.panelHeightControls.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -218,5 +291,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private System.Windows.Forms.GroupBox groupposition;
|
private System.Windows.Forms.GroupBox groupposition;
|
||||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox positiony;
|
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox positiony;
|
||||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox positionx;
|
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox positionx;
|
||||||
|
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox zfloor;
|
||||||
|
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox zceiling;
|
||||||
|
private System.Windows.Forms.Panel panelHeightControls;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,6 +30,7 @@ using System.IO;
|
||||||
using CodeImp.DoomBuilder.Config;
|
using CodeImp.DoomBuilder.Config;
|
||||||
using CodeImp.DoomBuilder.Editing;
|
using CodeImp.DoomBuilder.Editing;
|
||||||
using CodeImp.DoomBuilder.Controls;
|
using CodeImp.DoomBuilder.Controls;
|
||||||
|
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -70,8 +71,14 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
{
|
{
|
||||||
positionx.AllowDecimal = true;
|
positionx.AllowDecimal = true;
|
||||||
positiony.AllowDecimal = true;
|
positiony.AllowDecimal = true;
|
||||||
|
|
||||||
|
//mxd
|
||||||
|
zceiling.AllowDecimal = true;
|
||||||
|
zfloor.AllowDecimal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!General.Map.UDMF) panelHeightControls.Visible = false;
|
||||||
|
|
||||||
// Initialize custom fields editor
|
// Initialize custom fields editor
|
||||||
fieldslist.Setup("vertex");
|
fieldslist.Setup("vertex");
|
||||||
}
|
}
|
||||||
|
@ -115,6 +122,19 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
// Custom fields
|
// Custom fields
|
||||||
fieldslist.SetValues(v.Fields, false);
|
fieldslist.SetValues(v.Fields, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Height offsets
|
||||||
|
if(General.Map.UDMF) {
|
||||||
|
zceiling.Text = UDMFTools.GetFloat(vc.Fields, "zceiling", 0).ToString();
|
||||||
|
zfloor.Text = UDMFTools.GetFloat(vc.Fields, "zfloor", 0).ToString();
|
||||||
|
|
||||||
|
foreach(Vertex v in vertices) {
|
||||||
|
if(zceiling.Text != UDMFTools.GetFloat(v.Fields, "zceiling", 0).ToString())
|
||||||
|
zceiling.Text = "";
|
||||||
|
if(zfloor.Text != UDMFTools.GetFloat(v.Fields, "zfloor", 0).ToString())
|
||||||
|
zfloor.Text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -146,10 +166,20 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
p.x = General.Clamp(positionx.GetResultFloat(v.Position.x), (float)General.Map.FormatInterface.MinCoordinate, (float)General.Map.FormatInterface.MaxCoordinate);
|
p.x = General.Clamp(positionx.GetResultFloat(v.Position.x), (float)General.Map.FormatInterface.MinCoordinate, (float)General.Map.FormatInterface.MaxCoordinate);
|
||||||
p.y = General.Clamp(positiony.GetResultFloat(v.Position.y), (float)General.Map.FormatInterface.MinCoordinate, (float)General.Map.FormatInterface.MaxCoordinate);
|
p.y = General.Clamp(positiony.GetResultFloat(v.Position.y), (float)General.Map.FormatInterface.MinCoordinate, (float)General.Map.FormatInterface.MaxCoordinate);
|
||||||
v.Move(p);
|
v.Move(p);
|
||||||
|
|
||||||
// Custom fields
|
// Custom fields
|
||||||
fieldslist.Apply(v.Fields);
|
fieldslist.Apply(v.Fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mxd. Height offsets
|
||||||
|
if(General.Map.UDMF) {
|
||||||
|
foreach(Vertex v in vertices) {
|
||||||
|
float oldCeil = UDMFTools.GetFloat(v.Fields, "zceiling", 0);
|
||||||
|
UDMFTools.SetFloat(v.Fields, "zceiling", zceiling.GetResultFloat(oldCeil), 0, false);
|
||||||
|
float oldFloor = UDMFTools.GetFloat(v.Fields, "zfloor", 0);
|
||||||
|
UDMFTools.SetFloat(v.Fields, "zfloor", zfloor.GetResultFloat(oldFloor), 0, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
|
|
|
@ -126,11 +126,11 @@
|
||||||
<metadata name="groupposition.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="groupposition.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="positiony.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="positionx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
|
@ -138,9 +138,6 @@
|
||||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
@ -153,6 +150,9 @@
|
||||||
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -233,7 +233,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
|
||||||
foreach (Sector s in newSectors[i][c]) {
|
foreach (Sector s in newSectors[i][c]) {
|
||||||
foreach(Sidedef sd in s.Sidedefs){
|
foreach(Sidedef sd in s.Sidedefs){
|
||||||
if (sd.LowRequired())
|
if (sd.LowRequired())
|
||||||
sd.SetTextureLow(sectorProps[i][c].LowTexture);
|
sd.SetTextureLow(sectorProps[i][c].LowTexture);
|
||||||
if (sd.HighRequired())
|
if (sd.HighRequired())
|
||||||
sd.SetTextureHigh(sectorProps[i][c].HighTexture);
|
sd.SetTextureHigh(sectorProps[i][c].HighTexture);
|
||||||
}
|
}
|
||||||
|
@ -823,14 +823,14 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
|
||||||
SectorProperties.CeilingHeight = ld.Back.Sector.CeilHeight;
|
SectorProperties.CeilingHeight = ld.Back.Sector.CeilHeight;
|
||||||
SectorProperties.FloorHeight = ld.Back.Sector.FloorHeight;
|
SectorProperties.FloorHeight = ld.Back.Sector.FloorHeight;
|
||||||
SectorProperties.Brightness = ld.Back.Sector.Brightness;
|
SectorProperties.Brightness = ld.Back.Sector.Brightness;
|
||||||
SectorProperties.HighTexture = ld.Back.HighTexture;
|
SectorProperties.HighTexture = ld.Back.HighTexture != "-" ? ld.Back.HighTexture : ld.Back.MiddleTexture;
|
||||||
SectorProperties.LowTexture = ld.Back.LowTexture;
|
SectorProperties.LowTexture = ld.Back.LowTexture != "-" ? ld.Back.LowTexture : ld.Back.MiddleTexture;
|
||||||
}else if(ld.Front != null){
|
}else if(ld.Front != null){
|
||||||
SectorProperties.CeilingHeight = ld.Front.Sector.CeilHeight;
|
SectorProperties.CeilingHeight = ld.Front.Sector.CeilHeight;
|
||||||
SectorProperties.FloorHeight = ld.Front.Sector.FloorHeight;
|
SectorProperties.FloorHeight = ld.Front.Sector.FloorHeight;
|
||||||
SectorProperties.Brightness = ld.Front.Sector.Brightness;
|
SectorProperties.Brightness = ld.Front.Sector.Brightness;
|
||||||
SectorProperties.HighTexture = ld.Front.HighTexture;
|
SectorProperties.HighTexture = ld.Front.HighTexture != "-" ? ld.Front.HighTexture : ld.Front.MiddleTexture;
|
||||||
SectorProperties.LowTexture = ld.Front.LowTexture;
|
SectorProperties.LowTexture = ld.Front.LowTexture != "-" ? ld.Front.LowTexture : ld.Front.MiddleTexture;
|
||||||
}else{
|
}else{
|
||||||
SectorProperties.CeilingHeight = 128;
|
SectorProperties.CeilingHeight = 128;
|
||||||
SectorProperties.FloorHeight = 0;
|
SectorProperties.FloorHeight = 0;
|
||||||
|
|
Loading…
Reference in a new issue