mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Sector Edit form and Linedef Edit form now support float texture offsets.
Tag Statistics form: you can now double click on Sectors, Linedefs or Things cell to select them, and right click to open their properties. Texture size labels were displayed incorrectly in some cases. Rewritten VerticesMode.DeleteItem() once again... Vertex Edit form now works in realtime mode. Vertex Edit form: ceiling and floor vertex offsets can now be cleared. Added StairSectorBuilder plugin (I suppose some external plugins will stop working in GZDB because I've changed ButtonStep to float in ButtonsNumericTextbox a couple revisions ago...). Preferences form: action description is now scrollable. Changed background color of Sector Edit form. Vertex' ZCeiling and ZFloor properties are now managed internally.
This commit is contained in:
parent
392f7f6eca
commit
883527c37c
45 changed files with 5296 additions and 460 deletions
|
@ -713,21 +713,6 @@ universalfields
|
|||
default = false;
|
||||
}
|
||||
}
|
||||
|
||||
vertex
|
||||
{
|
||||
zfloor
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0f;
|
||||
}
|
||||
|
||||
zceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -493,7 +493,9 @@
|
|||
<Compile Include="Rendering\WorldVertex.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="SharpCompress.3.5, Version=0.8.1.0, Culture=neutral, processorArchitecture=MSIL" />
|
||||
<Reference Include="SharpCompress.3.5, Version=0.8.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SlimDX, Version=2.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
|
|
@ -16,6 +16,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuilderEffects", "..\Plugin
|
|||
{818B3D10-F791-4C3F-9AF5-BB2D0079B63C} = {818B3D10-F791-4C3F-9AF5-BB2D0079B63C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StairSectorBuilder", "..\Plugins\StairSectorBuilder\StairSectorBuilder.csproj", "{3F365121-906B-409D-BB1E-37E0A78056C2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "..\Plugins\CommentsPanel\CommentsPanel.csproj", "{58BD8A5B-1B48-435D-8473-A92F27D06C49}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyPasteSectorProperties", "..\Plugins\CopyPasteSectorProps\CopyPasteSectorProperties.csproj", "{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Statistics", "..\Plugins\Statistics\Statistics.csproj", "{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagRange", "..\Plugins\TagRange\TagRange.csproj", "{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisplaneExplorer", "..\Plugins\VisplaneExplorer\VisplaneExplorer.csproj", "{CF670175-7099-4090-A330-EE25C7230139}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -88,6 +100,66 @@ Global
|
|||
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|x86.ActiveCfg = Release|x86
|
||||
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|x86.Build.0 = Release|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Debug|x86.Build.0 = Debug|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Release|x86.ActiveCfg = Release|x86
|
||||
{3F365121-906B-409D-BB1E-37E0A78056C2}.Release|x86.Build.0 = Release|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|x86.Build.0 = Debug|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.ActiveCfg = Release|x86
|
||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.Build.0 = Release|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|x86.Build.0 = Debug|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|x86.ActiveCfg = Release|x86
|
||||
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|x86.Build.0 = Release|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Debug|x86.Build.0 = Debug|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|x86.ActiveCfg = Release|x86
|
||||
{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|x86.Build.0 = Release|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Debug|x86.Build.0 = Debug|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Release|x86.ActiveCfg = Release|x86
|
||||
{F49EFF6D-51CB-4E49-8223-AAE653C5B62F}.Release|x86.Build.0 = Release|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Debug|x86.Build.0 = Debug|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Release|x86.ActiveCfg = Release|x86
|
||||
{CF670175-7099-4090-A330-EE25C7230139}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -41,17 +41,17 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Check if name is a "none" texture
|
||||
if((imagename.Length < 1) || (imagename[0] == '-'))
|
||||
{
|
||||
DisplayImageSize(-1, -1); //mxd
|
||||
DisplayImageSize(0, 0); //mxd
|
||||
|
||||
// Flat required!
|
||||
return CodeImp.DoomBuilder.Properties.Resources.MissingTexture;
|
||||
}
|
||||
else
|
||||
{
|
||||
//mxd
|
||||
ImageData texture = General.Map.Data.GetFlatImage(imagename);
|
||||
if(texture.ImageState == ImageLoadState.Ready) DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight);
|
||||
else DisplayImageSize(-1, -1);
|
||||
ImageData texture = General.Map.Data.GetFlatImage(imagename); //mxd
|
||||
|
||||
if(string.IsNullOrEmpty(texture.FullName)) DisplayImageSize(0, 0); //mxd
|
||||
else DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight); //mxd
|
||||
|
||||
// Set the image
|
||||
return texture.GetPreview();
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.labelSize.Size = new System.Drawing.Size(48, 13);
|
||||
this.labelSize.TabIndex = 0;
|
||||
this.labelSize.Text = "128x128";
|
||||
this.labelSize.Visible = false;
|
||||
//
|
||||
// name
|
||||
//
|
||||
|
|
|
@ -189,7 +189,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
//mxd
|
||||
protected void DisplayImageSize(float width, float height) {
|
||||
if(!General.Settings.ShowTextureSizes || (width == -1 && height == -1)) {
|
||||
if(!General.Settings.ShowTextureSizes || width == 0 || height == 0) {
|
||||
labelSize.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Check if name is a "none" texture
|
||||
if((imagename.Length < 1) || (imagename[0] == '-'))
|
||||
{
|
||||
DisplayImageSize(-1, -1); //mxd
|
||||
DisplayImageSize(0, 0); //mxd
|
||||
|
||||
// Determine image to show
|
||||
if(required)
|
||||
|
@ -58,10 +58,10 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
else
|
||||
{
|
||||
//mxd
|
||||
ImageData texture = General.Map.Data.GetTextureImage(imagename);
|
||||
if(texture.ImageState == ImageLoadState.Ready) DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight);
|
||||
else DisplayImageSize(-1, -1);
|
||||
ImageData texture = General.Map.Data.GetTextureImage(imagename); //mxd
|
||||
|
||||
if(string.IsNullOrEmpty(texture.FullName)) DisplayImageSize(0, 0); //mxd
|
||||
else DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight); //mxd
|
||||
|
||||
// Set the image
|
||||
return texture.GetPreview();
|
||||
|
|
|
@ -41,18 +41,16 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
//mxd. Height offsets
|
||||
if(General.Map.UDMF) {
|
||||
if(v.Fields.ContainsKey("zceiling")) {
|
||||
float zc = v.Fields.GetValue("zceiling", 0f);
|
||||
zceiling.Text = zc.ToString("0.##");
|
||||
if(!float.IsNaN(v.ZCeiling)) {
|
||||
zceiling.Text = v.ZCeiling.ToString("0.##");
|
||||
zceiling.Enabled = true;
|
||||
labelCeilingOffset.Enabled = true;
|
||||
} else {
|
||||
zceiling.Text = "--";
|
||||
}
|
||||
|
||||
if(v.Fields.ContainsKey("zfloor")) {
|
||||
float zf = v.Fields.GetValue("zfloor", 0f);
|
||||
zfloor.Text = zf.ToString("0.##");
|
||||
if(!float.IsNaN(v.ZFloor)) {
|
||||
zfloor.Text = v.ZFloor.ToString("0.##");
|
||||
zfloor.Enabled = true;
|
||||
labelFloorOffset.Enabled = true;
|
||||
} else {
|
||||
|
|
|
@ -25,20 +25,21 @@
|
|||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.TagColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Label = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Sectors = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Linedefs = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Things = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -54,14 +55,14 @@
|
|||
this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dataGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
||||
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.TagColumn,
|
||||
|
@ -75,13 +76,66 @@
|
|||
this.dataGridView.RowHeadersVisible = false;
|
||||
this.dataGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||
this.dataGridView.Size = new System.Drawing.Size(477, 286);
|
||||
this.dataGridView.Size = new System.Drawing.Size(477, 256);
|
||||
this.dataGridView.TabIndex = 3;
|
||||
this.dataGridView.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_CellMouseClick);
|
||||
this.dataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_CellMouseDoubleClick);
|
||||
//
|
||||
// TagColumn
|
||||
//
|
||||
this.TagColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.TagColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.TagColumn.HeaderText = "Tag";
|
||||
this.TagColumn.Name = "TagColumn";
|
||||
this.TagColumn.ReadOnly = true;
|
||||
this.TagColumn.Width = 51;
|
||||
//
|
||||
// Label
|
||||
//
|
||||
this.Label.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Label.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.Label.HeaderText = "Label";
|
||||
this.Label.Name = "Label";
|
||||
//
|
||||
// Sectors
|
||||
//
|
||||
this.Sectors.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Sectors.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.Sectors.HeaderText = "Sectors";
|
||||
this.Sectors.Name = "Sectors";
|
||||
this.Sectors.ReadOnly = true;
|
||||
this.Sectors.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Sectors.Width = 68;
|
||||
//
|
||||
// Linedefs
|
||||
//
|
||||
this.Linedefs.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Linedefs.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.Linedefs.HeaderText = "Linedefs";
|
||||
this.Linedefs.Name = "Linedefs";
|
||||
this.Linedefs.ReadOnly = true;
|
||||
this.Linedefs.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Linedefs.Width = 72;
|
||||
//
|
||||
// Things
|
||||
//
|
||||
this.Things.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Things.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.Things.HeaderText = "Things";
|
||||
this.Things.Name = "Things";
|
||||
this.Things.ReadOnly = true;
|
||||
this.Things.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Things.Width = 64;
|
||||
//
|
||||
// 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(399, 304);
|
||||
this.apply.Location = new System.Drawing.Point(399, 319);
|
||||
this.apply.Name = "apply";
|
||||
this.apply.Size = new System.Drawing.Size(90, 23);
|
||||
this.apply.TabIndex = 4;
|
||||
|
@ -93,7 +147,7 @@
|
|||
//
|
||||
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(303, 304);
|
||||
this.cancel.Location = new System.Drawing.Point(303, 319);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(90, 23);
|
||||
this.cancel.TabIndex = 5;
|
||||
|
@ -101,56 +155,17 @@
|
|||
this.cancel.UseVisualStyleBackColor = true;
|
||||
this.cancel.Click += new System.EventHandler(this.cancel_Click);
|
||||
//
|
||||
// TagColumn
|
||||
// label1
|
||||
//
|
||||
this.TagColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.TagColumn.DefaultCellStyle = dataGridViewCellStyle14;
|
||||
this.TagColumn.HeaderText = "Tag";
|
||||
this.TagColumn.Name = "TagColumn";
|
||||
this.TagColumn.ReadOnly = true;
|
||||
this.TagColumn.Width = 51;
|
||||
//
|
||||
// Label
|
||||
//
|
||||
this.Label.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Label.DefaultCellStyle = dataGridViewCellStyle15;
|
||||
this.Label.HeaderText = "Label";
|
||||
this.Label.Name = "Label";
|
||||
//
|
||||
// Sectors
|
||||
//
|
||||
this.Sectors.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Sectors.DefaultCellStyle = dataGridViewCellStyle16;
|
||||
this.Sectors.HeaderText = "Sectors";
|
||||
this.Sectors.Name = "Sectors";
|
||||
this.Sectors.ReadOnly = true;
|
||||
this.Sectors.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Sectors.Width = 68;
|
||||
//
|
||||
// Linedefs
|
||||
//
|
||||
this.Linedefs.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Linedefs.DefaultCellStyle = dataGridViewCellStyle17;
|
||||
this.Linedefs.HeaderText = "Linedefs";
|
||||
this.Linedefs.Name = "Linedefs";
|
||||
this.Linedefs.ReadOnly = true;
|
||||
this.Linedefs.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Linedefs.Width = 72;
|
||||
//
|
||||
// Things
|
||||
//
|
||||
this.Things.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Things.DefaultCellStyle = dataGridViewCellStyle18;
|
||||
this.Things.HeaderText = "Things";
|
||||
this.Things.Name = "Things";
|
||||
this.Things.ReadOnly = true;
|
||||
this.Things.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Things.Width = 64;
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 278);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(472, 26);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Double click on a cell in Sectors, Linedefs or Things column to select map elemen" +
|
||||
"ts with given tag.\r\nRight click to open Properties form for map elements with gi" +
|
||||
"ven tag.";
|
||||
//
|
||||
// TagStatisticsForm
|
||||
//
|
||||
|
@ -158,7 +173,8 @@
|
|||
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(501, 333);
|
||||
this.ClientSize = new System.Drawing.Size(501, 348);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.dataGridView);
|
||||
|
@ -170,6 +186,7 @@
|
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TagStatisticsForm_FormClosing);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
@ -183,5 +200,6 @@
|
|||
private System.Windows.Forms.DataGridViewTextBoxColumn Sectors;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Linedefs;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Things;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,8 @@ using System.ComponentModel;
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
|
||||
namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
||||
{
|
||||
|
@ -22,6 +24,10 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
this.Location = location;
|
||||
}
|
||||
|
||||
setup();
|
||||
}
|
||||
|
||||
private void setup() {
|
||||
//collect all tags
|
||||
List<int> tags = new List<int>();
|
||||
Dictionary<int, int> sectorsCountByTag = new Dictionary<int, int>();
|
||||
|
@ -32,7 +38,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
foreach(Sector s in General.Map.Map.Sectors) {
|
||||
if(s.Tag == 0) continue;
|
||||
if(!tags.Contains(s.Tag)) tags.Add(s.Tag);
|
||||
|
||||
|
||||
if(!sectorsCountByTag.ContainsKey(s.Tag))
|
||||
sectorsCountByTag.Add(s.Tag, 1);
|
||||
else
|
||||
|
@ -44,13 +50,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
foreach(Linedef l in General.Map.Map.Linedefs) {
|
||||
if(l.Tag == 0) continue;
|
||||
if(!tags.Contains(l.Tag)) tags.Add(l.Tag);
|
||||
|
||||
|
||||
if(!linedefsCountByTag.ContainsKey(l.Tag))
|
||||
linedefsCountByTag.Add(l.Tag, 1);
|
||||
else
|
||||
linedefsCountByTag[l.Tag] += 1;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
Linedefs.Visible = false;
|
||||
}
|
||||
|
||||
|
@ -59,19 +65,20 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
foreach(Thing t in General.Map.Map.Things) {
|
||||
if(t.Tag == 0) continue;
|
||||
if(!tags.Contains(t.Tag)) tags.Add(t.Tag);
|
||||
|
||||
|
||||
if(!thingsCountByTag.ContainsKey(t.Tag))
|
||||
thingsCountByTag.Add(t.Tag, 1);
|
||||
else
|
||||
thingsCountByTag[t.Tag] += 1;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
Things.Visible = false;
|
||||
}
|
||||
|
||||
//create rows
|
||||
foreach(int tag in tags){
|
||||
addRow(tag,
|
||||
dataGridView.Rows.Clear();
|
||||
foreach(int tag in tags) {
|
||||
addRow(tag,
|
||||
General.Map.Options.TagLabels.ContainsKey(tag) ? General.Map.Options.TagLabels[tag] : string.Empty,
|
||||
sectorsCountByTag.ContainsKey(tag) ? sectorsCountByTag[tag] : 0,
|
||||
linedefsCountByTag.ContainsKey(tag) ? linedefsCountByTag[tag] : 0,
|
||||
|
@ -108,6 +115,67 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
dataGridView.Rows.Add(row);
|
||||
}
|
||||
|
||||
private List<Sector> getSectorsWithTag(int tag, int count) {
|
||||
List<Sector> list = new List<Sector>();
|
||||
foreach(Sector s in General.Map.Map.Sectors) {
|
||||
if(s.Tag == tag) {
|
||||
list.Add(s);
|
||||
if(list.Count == count) break;
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private List<Linedef> getLinedefsWithTag(int tag, int count) {
|
||||
List<Linedef> list = new List<Linedef>();
|
||||
foreach(Linedef l in General.Map.Map.Linedefs) {
|
||||
if(l.Tag == tag) {
|
||||
list.Add(l);
|
||||
if(list.Count == count) break;
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private List<Thing> getThingsWithTag(int tag, int count) {
|
||||
List<Thing> list = new List<Thing>();
|
||||
foreach(Thing t in General.Map.Map.Things) {
|
||||
if(t.Tag == tag) {
|
||||
list.Add(t);
|
||||
if(list.Count == count) break;
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void showSelection(List<Vector2D> points) {
|
||||
RectangleF area = MapSet.CreateEmptyArea();
|
||||
|
||||
// Make a view area from the points
|
||||
foreach(Vector2D p in points) area = MapSet.IncreaseArea(area, p);
|
||||
|
||||
// Make the area square, using the largest side
|
||||
if(area.Width > area.Height) {
|
||||
float delta = area.Width - area.Height;
|
||||
area.Y -= delta * 0.5f;
|
||||
area.Height += delta;
|
||||
} else {
|
||||
float delta = area.Height - area.Width;
|
||||
area.X -= delta * 0.5f;
|
||||
area.Width += delta;
|
||||
}
|
||||
|
||||
// Add padding
|
||||
area.Inflate(100f, 100f);
|
||||
|
||||
// Zoom to area
|
||||
ClassicMode editmode = (General.Editing.Mode as ClassicMode);
|
||||
editmode.CenterOnArea(area, 0.6f);
|
||||
}
|
||||
|
||||
//events
|
||||
private void apply_Click(object sender, EventArgs e) {
|
||||
//refill TagLabels with table data
|
||||
|
@ -127,6 +195,102 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
this.Close();
|
||||
}
|
||||
|
||||
private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
|
||||
//open properties window
|
||||
if(e.ColumnIndex > 1 && e.Button == MouseButtons.Right) {
|
||||
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true;
|
||||
int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value;
|
||||
|
||||
if(e.ColumnIndex == 2) { //sectors
|
||||
List<Sector> list = getSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value);
|
||||
if(list.Count > 0) {
|
||||
General.MainWindow.ShowEditSectors(list);
|
||||
General.Map.Map.Update();
|
||||
setup();
|
||||
}
|
||||
} else if(e.ColumnIndex == 3) { //linedefs
|
||||
List<Linedef> list = getLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value);
|
||||
if(list.Count > 0) {
|
||||
General.MainWindow.ShowEditLinedefs(list);
|
||||
General.Map.Map.Update();
|
||||
setup();
|
||||
}
|
||||
} else if(e.ColumnIndex == 4) { //things
|
||||
List<Thing> list = getThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value);
|
||||
if(list.Count > 0) {
|
||||
General.MainWindow.ShowEditThings(list);
|
||||
General.Map.Map.Update();
|
||||
setup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {
|
||||
if(e.ColumnIndex < 2) return;
|
||||
int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value;
|
||||
|
||||
if(e.ColumnIndex == 2) { //sectors
|
||||
List<Sector> list = getSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value);
|
||||
if(list.Count > 0) {
|
||||
General.Map.Map.ClearSelectedSectors();
|
||||
General.Map.Map.ClearSelectedLinedefs();
|
||||
|
||||
List<Vector2D> points = new List<Vector2D>();
|
||||
foreach(Sector s in list) {
|
||||
s.Selected = true;
|
||||
|
||||
foreach(Sidedef sd in s.Sidedefs) {
|
||||
points.Add(sd.Line.Start.Position);
|
||||
points.Add(sd.Line.End.Position);
|
||||
}
|
||||
}
|
||||
|
||||
General.Map.Map.Update();
|
||||
General.Editing.ChangeMode("SectorsMode");
|
||||
showSelection(points);
|
||||
}
|
||||
} else if(e.ColumnIndex == 3) { //linedefs
|
||||
List<Linedef> list = getLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value);
|
||||
if(list.Count > 0) {
|
||||
General.Map.Map.ClearSelectedSectors();
|
||||
General.Map.Map.ClearSelectedLinedefs();
|
||||
|
||||
List<Vector2D> points = new List<Vector2D>();
|
||||
foreach(Linedef l in list) {
|
||||
l.Selected = true;
|
||||
points.Add(l.Start.Position);
|
||||
points.Add(l.End.Position);
|
||||
}
|
||||
|
||||
General.Map.Map.Update();
|
||||
General.Editing.ChangeMode("LinedefsMode");
|
||||
showSelection(points);
|
||||
}
|
||||
} else if(e.ColumnIndex == 4) { //things
|
||||
List<Thing> list = getThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value);
|
||||
if(list.Count > 0) {
|
||||
General.Map.Map.ClearSelectedThings();
|
||||
|
||||
List<Vector2D> points = new List<Vector2D>();
|
||||
foreach(Thing t in list) {
|
||||
t.Selected = true;
|
||||
|
||||
Vector2D p = (Vector2D)t.Position;
|
||||
points.Add(p);
|
||||
points.Add(p + new Vector2D(t.Size * 2.0f, t.Size * 2.0f));
|
||||
points.Add(p + new Vector2D(t.Size * 2.0f, -t.Size * 2.0f));
|
||||
points.Add(p + new Vector2D(-t.Size * 2.0f, t.Size * 2.0f));
|
||||
points.Add(p + new Vector2D(-t.Size * 2.0f, -t.Size * 2.0f));
|
||||
}
|
||||
|
||||
General.Map.Map.Update();
|
||||
General.Editing.ChangeMode("ThingsMode");
|
||||
showSelection(points);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TagStatisticsForm_FormClosing(object sender, FormClosingEventArgs e) {
|
||||
size = this.Size;
|
||||
location = this.Location;
|
||||
|
|
|
@ -391,6 +391,10 @@ namespace CodeImp.DoomBuilder.IO
|
|||
Vertex v = map.CreateVertex(new Vector2D(x, y));
|
||||
if(v != null)
|
||||
{
|
||||
//mxd. zoffsets
|
||||
v.ZCeiling = GetCollectionEntry<float>(c, "zceiling", false, float.NaN, where); //mxd
|
||||
v.ZFloor = GetCollectionEntry<float>(c, "zfloor", false, float.NaN, where); //mxd
|
||||
|
||||
// Custom fields
|
||||
ReadCustomFields(c, v, "vertex");
|
||||
|
||||
|
|
|
@ -158,6 +158,8 @@ namespace CodeImp.DoomBuilder.IO
|
|||
UniversalCollection coll = new UniversalCollection();
|
||||
coll.Add("x", v.Position.x);
|
||||
coll.Add("y", v.Position.y);
|
||||
if(!float.IsNaN(v.ZCeiling)) coll.Add("zceiling", v.ZCeiling); //mxd
|
||||
if(!float.IsNaN(v.ZFloor)) coll.Add("zfloor", v.ZFloor); //mxd
|
||||
coll.Comment = v.Index.ToString();
|
||||
|
||||
// Add custom fields
|
||||
|
|
|
@ -45,6 +45,10 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Position
|
||||
private Vector2D pos;
|
||||
|
||||
//mxd. Height
|
||||
private float zfloor;
|
||||
private float zceiling;
|
||||
|
||||
// References
|
||||
private LinkedList<Linedef> linedefs;
|
||||
|
||||
|
@ -61,6 +65,24 @@ namespace CodeImp.DoomBuilder.Map
|
|||
public Vector2D Position { get { return pos; } }
|
||||
internal Vertex Clone { get { return clone; } set { clone = value; } }
|
||||
internal int SerializedIndex { get { return serializedindex; } set { serializedindex = value; } }
|
||||
public float ZCeiling { //mxd
|
||||
get { return zceiling; }
|
||||
set {
|
||||
if(zceiling != value) {
|
||||
BeforeFieldsChange();
|
||||
zceiling = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
public float ZFloor { //mxd
|
||||
get { return zfloor; }
|
||||
set {
|
||||
if(zfloor != value) {
|
||||
BeforeFieldsChange();
|
||||
zfloor = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -74,6 +96,8 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.linedefs = new LinkedList<Linedef>();
|
||||
this.listindex = listindex;
|
||||
this.pos = pos;
|
||||
this.zceiling = float.NaN; //mxd
|
||||
this.zfloor = float.NaN; //mxd
|
||||
|
||||
if(map == General.Map.Map)
|
||||
General.Map.UndoRedo.RecAddVertex(this);
|
||||
|
@ -161,6 +185,8 @@ namespace CodeImp.DoomBuilder.Map
|
|||
base.ReadWrite(s);
|
||||
|
||||
s.rwVector2D(ref pos);
|
||||
s.rwFloat(ref zceiling); //mxd
|
||||
s.rwFloat(ref zfloor); //mxd
|
||||
|
||||
if(s.IsWriting)
|
||||
{
|
||||
|
@ -195,6 +221,8 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
// Copy properties
|
||||
v.pos = pos;
|
||||
v.zceiling = zceiling; //mxd
|
||||
v.zfloor = zfloor; //mxd
|
||||
base.CopyPropertiesTo(v);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ managedfields
|
|||
{
|
||||
x;
|
||||
y;
|
||||
zceiling;
|
||||
zfloor;
|
||||
}
|
||||
|
||||
linedef
|
||||
|
|
|
@ -40,6 +40,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
MouseButtons MouseButtons { get; }
|
||||
bool IsActiveWindow { get; }
|
||||
RenderTargetControl Display { get; }
|
||||
|
||||
//mxd. Events
|
||||
event EventHandler OnEditFormValuesChanged;
|
||||
|
||||
// Methods
|
||||
void DisplayReady();
|
||||
|
|
12
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
12
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
|
@ -924,7 +924,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcFrontOffsetBottom
|
||||
//
|
||||
this.pfcFrontOffsetBottom.AllowDecimal = false;
|
||||
this.pfcFrontOffsetBottom.AllowDecimal = true;
|
||||
this.pfcFrontOffsetBottom.ButtonStep = 16F;
|
||||
this.pfcFrontOffsetBottom.DefaultValue = 0F;
|
||||
this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom";
|
||||
|
@ -937,7 +937,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcFrontOffsetMid
|
||||
//
|
||||
this.pfcFrontOffsetMid.AllowDecimal = false;
|
||||
this.pfcFrontOffsetMid.AllowDecimal = true;
|
||||
this.pfcFrontOffsetMid.ButtonStep = 16F;
|
||||
this.pfcFrontOffsetMid.DefaultValue = 0F;
|
||||
this.pfcFrontOffsetMid.Field1 = "offsetx_mid";
|
||||
|
@ -950,7 +950,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcFrontOffsetTop
|
||||
//
|
||||
this.pfcFrontOffsetTop.AllowDecimal = false;
|
||||
this.pfcFrontOffsetTop.AllowDecimal = true;
|
||||
this.pfcFrontOffsetTop.ButtonStep = 16F;
|
||||
this.pfcFrontOffsetTop.DefaultValue = 0F;
|
||||
this.pfcFrontOffsetTop.Field1 = "offsetx_top";
|
||||
|
@ -1244,7 +1244,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcBackOffsetBottom
|
||||
//
|
||||
this.pfcBackOffsetBottom.AllowDecimal = false;
|
||||
this.pfcBackOffsetBottom.AllowDecimal = true;
|
||||
this.pfcBackOffsetBottom.ButtonStep = 16F;
|
||||
this.pfcBackOffsetBottom.DefaultValue = 0F;
|
||||
this.pfcBackOffsetBottom.Field1 = "offsetx_bottom";
|
||||
|
@ -1257,7 +1257,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcBackOffsetMid
|
||||
//
|
||||
this.pfcBackOffsetMid.AllowDecimal = false;
|
||||
this.pfcBackOffsetMid.AllowDecimal = true;
|
||||
this.pfcBackOffsetMid.ButtonStep = 16F;
|
||||
this.pfcBackOffsetMid.DefaultValue = 0F;
|
||||
this.pfcBackOffsetMid.Field1 = "offsetx_mid";
|
||||
|
@ -1270,7 +1270,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// pfcBackOffsetTop
|
||||
//
|
||||
this.pfcBackOffsetTop.AllowDecimal = false;
|
||||
this.pfcBackOffsetTop.AllowDecimal = true;
|
||||
this.pfcBackOffsetTop.ButtonStep = 16F;
|
||||
this.pfcBackOffsetTop.DefaultValue = 0F;
|
||||
this.pfcBackOffsetTop.Field1 = "offsetx_top";
|
||||
|
|
|
@ -101,6 +101,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
#endregion
|
||||
|
||||
#region ================== mxd. Events
|
||||
|
||||
public event EventHandler OnEditFormValuesChanged; //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Position/size
|
||||
|
@ -2960,6 +2966,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Show sector edit dialog
|
||||
VertexEditForm f = new VertexEditForm();
|
||||
f.Setup(vertices, allowPositionChange);
|
||||
f.OnValuesChanged += new EventHandler(EditForm_OnValuesChanged);
|
||||
result = f.ShowDialog(this);
|
||||
f.Dispose();
|
||||
|
||||
|
@ -3015,6 +3022,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
return result;
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void EditForm_OnValuesChanged(object sender, EventArgs e) {
|
||||
if(OnEditFormValuesChanged != null)
|
||||
OnEditFormValuesChanged(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Message Pump
|
||||
|
|
187
Source/Core/Windows/PreferencesForm.Designer.cs
generated
187
Source/Core/Windows/PreferencesForm.Designer.cs
generated
|
@ -57,26 +57,27 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.defaultviewmode = new System.Windows.Forms.ComboBox();
|
||||
this.keyusedlabel = new System.Windows.Forms.Label();
|
||||
this.colorsgroup1 = new System.Windows.Forms.GroupBox();
|
||||
this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.numSectorsLabel = new System.Windows.Forms.Label();
|
||||
this.colorNewSectors = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.colorInfo = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.cbStretchModels = new System.Windows.Forms.CheckBox();
|
||||
this.colorMD3 = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.doublesidedalpha = new Dotnetrix.Controls.TrackBar();
|
||||
this.colorgrid64 = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.squarethings = new System.Windows.Forms.CheckBox();
|
||||
this.colorgrid = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.doublesidedalphalabel = new System.Windows.Forms.Label();
|
||||
this.colorindication = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.qualitydisplay = new System.Windows.Forms.CheckBox();
|
||||
this.colorbackcolor = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.doublesidedalphalabel = new System.Windows.Forms.Label();
|
||||
this.colorselection = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.doublesidedalpha = new Dotnetrix.Controls.TrackBar();
|
||||
this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.tbNumSectors = new Dotnetrix.Controls.TrackBar();
|
||||
this.cbStretchModels = new System.Windows.Forms.CheckBox();
|
||||
this.squarethings = new System.Windows.Forms.CheckBox();
|
||||
this.qualitydisplay = new System.Windows.Forms.CheckBox();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.tabs = new System.Windows.Forms.TabControl();
|
||||
|
@ -118,13 +119,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.columncontrolaction = new System.Windows.Forms.ColumnHeader();
|
||||
this.columncontrolkey = new System.Windows.Forms.ColumnHeader();
|
||||
this.actioncontrolpanel = new System.Windows.Forms.GroupBox();
|
||||
this.actiondescription = new System.Windows.Forms.TextBox();
|
||||
this.keyusedlist = new System.Windows.Forms.ListBox();
|
||||
this.disregardshiftlabel = new System.Windows.Forms.Label();
|
||||
this.actioncontrol = new System.Windows.Forms.ComboBox();
|
||||
this.actiontitle = new System.Windows.Forms.Label();
|
||||
this.actioncontrolclear = new System.Windows.Forms.Button();
|
||||
this.actionkey = new System.Windows.Forms.TextBox();
|
||||
this.actiondescription = new System.Windows.Forms.Label();
|
||||
this.tabcolors = new System.Windows.Forms.TabPage();
|
||||
this.appearancegroup1 = new System.Windows.Forms.GroupBox();
|
||||
this.cbLoadGameGldefs = new System.Windows.Forms.CheckBox();
|
||||
|
@ -163,7 +164,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
|
@ -508,6 +508,18 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorsgroup1.Text = " Display ";
|
||||
this.colorsgroup1.Visible = false;
|
||||
//
|
||||
// color3dFloors
|
||||
//
|
||||
this.color3dFloors.BackColor = System.Drawing.Color.Transparent;
|
||||
this.color3dFloors.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.color3dFloors.Label = "3D Floors:";
|
||||
this.color3dFloors.Location = new System.Drawing.Point(15, 286);
|
||||
this.color3dFloors.MaximumSize = new System.Drawing.Size(10000, 23);
|
||||
this.color3dFloors.MinimumSize = new System.Drawing.Size(100, 23);
|
||||
this.color3dFloors.Name = "color3dFloors";
|
||||
this.color3dFloors.Size = new System.Drawing.Size(168, 23);
|
||||
this.color3dFloors.TabIndex = 24;
|
||||
//
|
||||
// label23
|
||||
//
|
||||
this.label23.AutoSize = true;
|
||||
|
@ -551,18 +563,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorInfo.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorInfo.TabIndex = 19;
|
||||
//
|
||||
// cbStretchModels
|
||||
//
|
||||
this.cbStretchModels.AutoSize = true;
|
||||
this.cbStretchModels.Location = new System.Drawing.Point(236, 170);
|
||||
this.cbStretchModels.Name = "cbStretchModels";
|
||||
this.cbStretchModels.Size = new System.Drawing.Size(167, 18);
|
||||
this.cbStretchModels.TabIndex = 18;
|
||||
this.cbStretchModels.Text = "Scale models in visual modes";
|
||||
this.toolTip1.SetToolTip(this.cbStretchModels, "If enabled, heights of models will be scaled down by 15% in Visual mode \r\nto mimi" +
|
||||
"ck GZDoom\'s way of rendering.");
|
||||
this.cbStretchModels.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// colorMD3
|
||||
//
|
||||
this.colorMD3.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -575,15 +575,15 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorMD3.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorMD3.TabIndex = 17;
|
||||
//
|
||||
// label2
|
||||
// doublesidedalpha
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(14, 405);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(147, 14);
|
||||
this.label2.TabIndex = 14;
|
||||
this.label2.Text = "Passable lines transparency:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.doublesidedalpha.LargeChange = 3;
|
||||
this.doublesidedalpha.Location = new System.Drawing.Point(11, 426);
|
||||
this.doublesidedalpha.Name = "doublesidedalpha";
|
||||
this.doublesidedalpha.Size = new System.Drawing.Size(130, 45);
|
||||
this.doublesidedalpha.TabIndex = 2;
|
||||
this.doublesidedalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
|
||||
this.doublesidedalpha.ValueChanged += new System.EventHandler(this.doublesidedalpha_ValueChanged);
|
||||
//
|
||||
// colorgrid64
|
||||
//
|
||||
|
@ -597,16 +597,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorgrid64.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorgrid64.TabIndex = 9;
|
||||
//
|
||||
// squarethings
|
||||
//
|
||||
this.squarethings.AutoSize = true;
|
||||
this.squarethings.Location = new System.Drawing.Point(25, 170);
|
||||
this.squarethings.Name = "squarethings";
|
||||
this.squarethings.Size = new System.Drawing.Size(93, 18);
|
||||
this.squarethings.TabIndex = 8;
|
||||
this.squarethings.Text = "Square things";
|
||||
this.squarethings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// colorgrid
|
||||
//
|
||||
this.colorgrid.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -619,15 +609,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorgrid.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorgrid.TabIndex = 8;
|
||||
//
|
||||
// doublesidedalphalabel
|
||||
//
|
||||
this.doublesidedalphalabel.AutoSize = true;
|
||||
this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 438);
|
||||
this.doublesidedalphalabel.Name = "doublesidedalphalabel";
|
||||
this.doublesidedalphalabel.Size = new System.Drawing.Size(23, 14);
|
||||
this.doublesidedalphalabel.TabIndex = 16;
|
||||
this.doublesidedalphalabel.Text = "0%";
|
||||
//
|
||||
// colorindication
|
||||
//
|
||||
this.colorindication.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -640,16 +621,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorindication.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorindication.TabIndex = 7;
|
||||
//
|
||||
// qualitydisplay
|
||||
//
|
||||
this.qualitydisplay.AutoSize = true;
|
||||
this.qualitydisplay.Location = new System.Drawing.Point(25, 191);
|
||||
this.qualitydisplay.Name = "qualitydisplay";
|
||||
this.qualitydisplay.Size = new System.Drawing.Size(130, 18);
|
||||
this.qualitydisplay.TabIndex = 7;
|
||||
this.qualitydisplay.Text = "High quality rendering";
|
||||
this.qualitydisplay.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// colorbackcolor
|
||||
//
|
||||
this.colorbackcolor.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -662,6 +633,25 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorbackcolor.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorbackcolor.TabIndex = 0;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(14, 405);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(147, 14);
|
||||
this.label2.TabIndex = 14;
|
||||
this.label2.Text = "Passable lines transparency:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
//
|
||||
// doublesidedalphalabel
|
||||
//
|
||||
this.doublesidedalphalabel.AutoSize = true;
|
||||
this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 438);
|
||||
this.doublesidedalphalabel.Name = "doublesidedalphalabel";
|
||||
this.doublesidedalphalabel.Size = new System.Drawing.Size(23, 14);
|
||||
this.doublesidedalphalabel.TabIndex = 16;
|
||||
this.doublesidedalphalabel.Text = "0%";
|
||||
//
|
||||
// colorselection
|
||||
//
|
||||
this.colorselection.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -686,16 +676,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorvertices.Size = new System.Drawing.Size(168, 23);
|
||||
this.colorvertices.TabIndex = 1;
|
||||
//
|
||||
// doublesidedalpha
|
||||
//
|
||||
this.doublesidedalpha.LargeChange = 3;
|
||||
this.doublesidedalpha.Location = new System.Drawing.Point(11, 426);
|
||||
this.doublesidedalpha.Name = "doublesidedalpha";
|
||||
this.doublesidedalpha.Size = new System.Drawing.Size(130, 45);
|
||||
this.doublesidedalpha.TabIndex = 2;
|
||||
this.doublesidedalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
|
||||
this.doublesidedalpha.ValueChanged += new System.EventHandler(this.doublesidedalpha_ValueChanged);
|
||||
//
|
||||
// colorhighlight
|
||||
//
|
||||
this.colorhighlight.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -732,6 +712,38 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolTip1.SetToolTip(this.tbNumSectors, "Will draw selected number of newly created sectors using \"New sector\" color");
|
||||
this.tbNumSectors.ValueChanged += new System.EventHandler(this.tbNumSectors_ValueChanged);
|
||||
//
|
||||
// cbStretchModels
|
||||
//
|
||||
this.cbStretchModels.AutoSize = true;
|
||||
this.cbStretchModels.Location = new System.Drawing.Point(236, 170);
|
||||
this.cbStretchModels.Name = "cbStretchModels";
|
||||
this.cbStretchModels.Size = new System.Drawing.Size(167, 18);
|
||||
this.cbStretchModels.TabIndex = 18;
|
||||
this.cbStretchModels.Text = "Scale models in visual modes";
|
||||
this.toolTip1.SetToolTip(this.cbStretchModels, "If enabled, heights of models will be scaled down by 15% in Visual mode \r\nto mimi" +
|
||||
"ck GZDoom\'s way of rendering.");
|
||||
this.cbStretchModels.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// squarethings
|
||||
//
|
||||
this.squarethings.AutoSize = true;
|
||||
this.squarethings.Location = new System.Drawing.Point(25, 170);
|
||||
this.squarethings.Name = "squarethings";
|
||||
this.squarethings.Size = new System.Drawing.Size(93, 18);
|
||||
this.squarethings.TabIndex = 8;
|
||||
this.squarethings.Text = "Square things";
|
||||
this.squarethings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// qualitydisplay
|
||||
//
|
||||
this.qualitydisplay.AutoSize = true;
|
||||
this.qualitydisplay.Location = new System.Drawing.Point(25, 191);
|
||||
this.qualitydisplay.Name = "qualitydisplay";
|
||||
this.qualitydisplay.Size = new System.Drawing.Size(130, 18);
|
||||
this.qualitydisplay.TabIndex = 7;
|
||||
this.qualitydisplay.Text = "High quality rendering";
|
||||
this.qualitydisplay.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
@ -1193,6 +1205,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.actioncontrolpanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.actioncontrolpanel.Controls.Add(this.actiondescription);
|
||||
this.actioncontrolpanel.Controls.Add(this.keyusedlist);
|
||||
this.actioncontrolpanel.Controls.Add(this.keyusedlabel);
|
||||
this.actioncontrolpanel.Controls.Add(this.disregardshiftlabel);
|
||||
|
@ -1202,7 +1215,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.actioncontrolpanel.Controls.Add(this.actioncontrolclear);
|
||||
this.actioncontrolpanel.Controls.Add(label6);
|
||||
this.actioncontrolpanel.Controls.Add(this.actionkey);
|
||||
this.actioncontrolpanel.Controls.Add(this.actiondescription);
|
||||
this.actioncontrolpanel.Controls.Add(label5);
|
||||
this.actioncontrolpanel.Enabled = false;
|
||||
this.actioncontrolpanel.Location = new System.Drawing.Point(377, 12);
|
||||
|
@ -1213,6 +1225,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.actioncontrolpanel.TabStop = false;
|
||||
this.actioncontrolpanel.Text = " Action control ";
|
||||
//
|
||||
// actiondescription
|
||||
//
|
||||
this.actiondescription.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.actiondescription.Location = new System.Drawing.Point(20, 47);
|
||||
this.actiondescription.Multiline = true;
|
||||
this.actiondescription.Name = "actiondescription";
|
||||
this.actiondescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.actiondescription.Size = new System.Drawing.Size(256, 72);
|
||||
this.actiondescription.TabIndex = 12;
|
||||
//
|
||||
// keyusedlist
|
||||
//
|
||||
this.keyusedlist.BackColor = System.Drawing.SystemColors.Control;
|
||||
|
@ -1223,7 +1245,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.keyusedlist.Location = new System.Drawing.Point(23, 307);
|
||||
this.keyusedlist.Name = "keyusedlist";
|
||||
this.keyusedlist.SelectionMode = System.Windows.Forms.SelectionMode.None;
|
||||
this.keyusedlist.Size = new System.Drawing.Size(233, 115);
|
||||
this.keyusedlist.Size = new System.Drawing.Size(238, 115);
|
||||
this.keyusedlist.Sorted = true;
|
||||
this.keyusedlist.TabIndex = 11;
|
||||
this.keyusedlist.Visible = false;
|
||||
|
@ -1247,7 +1269,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.actioncontrol.ImeMode = System.Windows.Forms.ImeMode.Off;
|
||||
this.actioncontrol.Location = new System.Drawing.Point(23, 190);
|
||||
this.actioncontrol.Name = "actioncontrol";
|
||||
this.actioncontrol.Size = new System.Drawing.Size(233, 22);
|
||||
this.actioncontrol.Size = new System.Drawing.Size(238, 22);
|
||||
this.actioncontrol.TabIndex = 8;
|
||||
this.actioncontrol.TabStop = false;
|
||||
this.actioncontrol.SelectedIndexChanged += new System.EventHandler(this.actioncontrol_SelectedIndexChanged);
|
||||
|
@ -1284,15 +1306,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.actionkey.TabStop = false;
|
||||
this.actionkey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.actionkey_KeyDown);
|
||||
//
|
||||
// actiondescription
|
||||
//
|
||||
this.actiondescription.AutoEllipsis = true;
|
||||
this.actiondescription.Location = new System.Drawing.Point(20, 50);
|
||||
this.actiondescription.Name = "actiondescription";
|
||||
this.actiondescription.Size = new System.Drawing.Size(245, 71);
|
||||
this.actiondescription.TabIndex = 3;
|
||||
this.actiondescription.UseMnemonic = false;
|
||||
//
|
||||
// tabcolors
|
||||
//
|
||||
this.tabcolors.Controls.Add(this.appearancegroup1);
|
||||
|
@ -1523,7 +1536,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.scripttabwidth.AllowDecimal = false;
|
||||
this.scripttabwidth.AllowNegative = false;
|
||||
this.scripttabwidth.AllowRelative = false;
|
||||
this.scripttabwidth.ButtonStep = 2;
|
||||
this.scripttabwidth.ButtonStep = 2F;
|
||||
this.scripttabwidth.Location = new System.Drawing.Point(259, 155);
|
||||
this.scripttabwidth.Name = "scripttabwidth";
|
||||
this.scripttabwidth.Size = new System.Drawing.Size(71, 24);
|
||||
|
@ -1754,18 +1767,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.pasteoptions.Size = new System.Drawing.Size(666, 427);
|
||||
this.pasteoptions.TabIndex = 0;
|
||||
//
|
||||
// color3dFloors
|
||||
//
|
||||
this.color3dFloors.BackColor = System.Drawing.Color.Transparent;
|
||||
this.color3dFloors.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.color3dFloors.Label = "3D Floors:";
|
||||
this.color3dFloors.Location = new System.Drawing.Point(15, 286);
|
||||
this.color3dFloors.MaximumSize = new System.Drawing.Size(10000, 23);
|
||||
this.color3dFloors.MinimumSize = new System.Drawing.Size(100, 23);
|
||||
this.color3dFloors.Name = "color3dFloors";
|
||||
this.color3dFloors.Size = new System.Drawing.Size(168, 23);
|
||||
this.color3dFloors.TabIndex = 24;
|
||||
//
|
||||
// PreferencesForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
|
@ -1843,7 +1844,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.Label actiontitle;
|
||||
private System.Windows.Forms.Button actioncontrolclear;
|
||||
private System.Windows.Forms.TextBox actionkey;
|
||||
private System.Windows.Forms.Label actiondescription;
|
||||
private System.Windows.Forms.TabPage tabcolors;
|
||||
private CodeImp.DoomBuilder.Controls.ColorControl colorselection;
|
||||
private CodeImp.DoomBuilder.Controls.ColorControl colorhighlight;
|
||||
|
@ -1956,5 +1956,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.TextBox tbFilterActions;
|
||||
private System.Windows.Forms.Label label24;
|
||||
private CodeImp.DoomBuilder.Controls.ColorControl color3dFloors;
|
||||
private System.Windows.Forms.TextBox actiondescription;
|
||||
}
|
||||
}
|
68
Source/Core/Windows/SectorEditForm.Designer.cs
generated
68
Source/Core/Windows/SectorEditForm.Designer.cs
generated
|
@ -31,17 +31,17 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
System.Windows.Forms.Label label1;
|
||||
System.Windows.Forms.Label label3;
|
||||
System.Windows.Forms.GroupBox groupeffect;
|
||||
System.Windows.Forms.Label label9;
|
||||
System.Windows.Forms.Label label8;
|
||||
System.Windows.Forms.Label label9;
|
||||
System.Windows.Forms.GroupBox groupfloorceiling;
|
||||
System.Windows.Forms.Label label6;
|
||||
System.Windows.Forms.Label label5;
|
||||
System.Windows.Forms.Label label2;
|
||||
System.Windows.Forms.Label label4;
|
||||
this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector();
|
||||
this.brightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.browseeffect = new System.Windows.Forms.Button();
|
||||
this.effect = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
|
||||
this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector();
|
||||
this.brightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.ceilingheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.sectorheightlabel = new System.Windows.Forms.Label();
|
||||
this.sectorheight = new System.Windows.Forms.Label();
|
||||
|
@ -56,8 +56,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
label1 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
groupeffect = new System.Windows.Forms.GroupBox();
|
||||
label9 = new System.Windows.Forms.Label();
|
||||
label8 = new System.Windows.Forms.Label();
|
||||
label9 = new System.Windows.Forms.Label();
|
||||
groupfloorceiling = new System.Windows.Forms.GroupBox();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
|
@ -86,15 +86,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
label3.Text = "Ceiling";
|
||||
label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// tagSelector
|
||||
//
|
||||
this.tagSelector.Location = new System.Drawing.Point(47, 52);
|
||||
this.tagSelector.Name = "tagSelector";
|
||||
this.tagSelector.Size = new System.Drawing.Size(384, 34);
|
||||
this.tagSelector.TabIndex = 0;
|
||||
//
|
||||
// groupeffect
|
||||
//
|
||||
groupeffect.BackColor = System.Drawing.Color.Transparent;
|
||||
groupeffect.Controls.Add(this.browseeffect);
|
||||
groupeffect.Controls.Add(this.effect);
|
||||
groupeffect.Controls.Add(label8);
|
||||
|
@ -106,18 +100,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
groupeffect.TabStop = false;
|
||||
groupeffect.Text = "Effect and Identification";
|
||||
//
|
||||
// brightness
|
||||
//
|
||||
this.brightness.AllowDecimal = false;
|
||||
this.brightness.AllowNegative = false;
|
||||
this.brightness.AllowRelative = true;
|
||||
this.brightness.ButtonStep = 8F;
|
||||
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;
|
||||
this.brightness.TabIndex = 24;
|
||||
//
|
||||
// browseeffect
|
||||
//
|
||||
this.browseeffect.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -131,15 +113,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.browseeffect.UseVisualStyleBackColor = true;
|
||||
this.browseeffect.Click += new System.EventHandler(this.browseeffect_Click);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new System.Drawing.Point(31, 129);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new System.Drawing.Size(62, 14);
|
||||
label9.TabIndex = 2;
|
||||
label9.Text = "Brightness:";
|
||||
//
|
||||
// effect
|
||||
//
|
||||
this.effect.BackColor = System.Drawing.Color.Transparent;
|
||||
|
@ -161,8 +134,25 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
label8.TabIndex = 0;
|
||||
label8.Text = "Special:";
|
||||
//
|
||||
// tagSelector
|
||||
//
|
||||
this.tagSelector.Location = new System.Drawing.Point(47, 52);
|
||||
this.tagSelector.Name = "tagSelector";
|
||||
this.tagSelector.Size = new System.Drawing.Size(384, 34);
|
||||
this.tagSelector.TabIndex = 0;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new System.Drawing.Point(31, 129);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new System.Drawing.Size(62, 14);
|
||||
label9.TabIndex = 2;
|
||||
label9.Text = "Brightness:";
|
||||
//
|
||||
// groupfloorceiling
|
||||
//
|
||||
groupfloorceiling.BackColor = System.Drawing.Color.Transparent;
|
||||
groupfloorceiling.Controls.Add(this.brightness);
|
||||
groupfloorceiling.Controls.Add(this.ceilingheight);
|
||||
groupfloorceiling.Controls.Add(label6);
|
||||
|
@ -182,6 +172,18 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
groupfloorceiling.TabStop = false;
|
||||
groupfloorceiling.Text = "Floor and Ceiling ";
|
||||
//
|
||||
// brightness
|
||||
//
|
||||
this.brightness.AllowDecimal = false;
|
||||
this.brightness.AllowNegative = false;
|
||||
this.brightness.AllowRelative = true;
|
||||
this.brightness.ButtonStep = 8F;
|
||||
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;
|
||||
this.brightness.TabIndex = 24;
|
||||
//
|
||||
// ceilingheight
|
||||
//
|
||||
this.ceilingheight.AllowDecimal = false;
|
||||
|
@ -319,7 +321,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.panel1.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.panel1.Controls.Add(groupfloorceiling);
|
||||
this.panel1.Controls.Add(groupeffect);
|
||||
this.panel1.Location = new System.Drawing.Point(12, 10);
|
||||
|
|
|
@ -630,7 +630,7 @@
|
|||
//
|
||||
// floorOffsets
|
||||
//
|
||||
this.floorOffsets.AllowDecimal = false;
|
||||
this.floorOffsets.AllowDecimal = true;
|
||||
this.floorOffsets.ButtonStep = 16F;
|
||||
this.floorOffsets.DefaultValue = 0F;
|
||||
this.floorOffsets.Field1 = "xpanningfloor";
|
||||
|
@ -800,7 +800,7 @@
|
|||
//
|
||||
// ceilOffsets
|
||||
//
|
||||
this.ceilOffsets.AllowDecimal = false;
|
||||
this.ceilOffsets.AllowDecimal = true;
|
||||
this.ceilOffsets.ButtonStep = 16F;
|
||||
this.ceilOffsets.DefaultValue = 0F;
|
||||
this.ceilOffsets.Field1 = "xpanningceiling";
|
||||
|
|
|
@ -138,21 +138,6 @@
|
|||
<metadata name="label8.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>
|
||||
|
@ -162,12 +147,6 @@
|
|||
<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>
|
||||
|
@ -177,7 +156,4 @@
|
|||
<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>
|
33
Source/Core/Windows/VertexEditForm.Designer.cs
generated
33
Source/Core/Windows/VertexEditForm.Designer.cs
generated
|
@ -44,6 +44,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.clearZCeiling = new System.Windows.Forms.Button();
|
||||
this.clearZFloor = new System.Windows.Forms.Button();
|
||||
tabproperties = new System.Windows.Forms.TabPage();
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
|
@ -87,13 +89,15 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// panelHeightControls
|
||||
//
|
||||
this.panelHeightControls.Controls.Add(this.clearZFloor);
|
||||
this.panelHeightControls.Controls.Add(this.clearZCeiling);
|
||||
this.panelHeightControls.Controls.Add(this.zceiling);
|
||||
this.panelHeightControls.Controls.Add(this.zfloor);
|
||||
this.panelHeightControls.Controls.Add(label2);
|
||||
this.panelHeightControls.Controls.Add(label3);
|
||||
this.panelHeightControls.Location = new System.Drawing.Point(48, 73);
|
||||
this.panelHeightControls.Name = "panelHeightControls";
|
||||
this.panelHeightControls.Size = new System.Drawing.Size(308, 100);
|
||||
this.panelHeightControls.Size = new System.Drawing.Size(361, 100);
|
||||
this.panelHeightControls.TabIndex = 30;
|
||||
//
|
||||
// zceiling
|
||||
|
@ -107,6 +111,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.zceiling.Size = new System.Drawing.Size(120, 24);
|
||||
this.zceiling.StepValues = null;
|
||||
this.zceiling.TabIndex = 28;
|
||||
this.zceiling.WhenTextChanged += new System.EventHandler(this.zceiling_WhenTextChanged);
|
||||
//
|
||||
// zfloor
|
||||
//
|
||||
|
@ -119,6 +124,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.zfloor.Size = new System.Drawing.Size(120, 24);
|
||||
this.zfloor.StepValues = null;
|
||||
this.zfloor.TabIndex = 29;
|
||||
this.zfloor.WhenTextChanged += new System.EventHandler(this.zfloor_WhenTextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
|
@ -149,6 +155,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.positiony.Size = new System.Drawing.Size(120, 24);
|
||||
this.positiony.StepValues = null;
|
||||
this.positiony.TabIndex = 25;
|
||||
this.positiony.WhenTextChanged += new System.EventHandler(this.positiony_WhenTextChanged);
|
||||
//
|
||||
// positionx
|
||||
//
|
||||
|
@ -161,6 +168,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.positionx.Size = new System.Drawing.Size(120, 24);
|
||||
this.positionx.StepValues = null;
|
||||
this.positionx.TabIndex = 24;
|
||||
this.positionx.WhenTextChanged += new System.EventHandler(this.positionx_WhenTextChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
|
@ -228,6 +236,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist.TypeColumnVisible = true;
|
||||
this.fieldslist.TypeColumnWidth = 100;
|
||||
this.fieldslist.ValueColumnVisible = true;
|
||||
this.fieldslist.OnFieldValueChanged += new CodeImp.DoomBuilder.Controls.FieldsEditorControl.SingleFieldNameEvent(this.fieldslist_OnFieldValueChanged);
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
|
@ -252,6 +261,26 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.apply.UseVisualStyleBackColor = true;
|
||||
this.apply.Click += new System.EventHandler(this.apply_Click);
|
||||
//
|
||||
// clearZCeiling
|
||||
//
|
||||
this.clearZCeiling.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
|
||||
this.clearZCeiling.Location = new System.Drawing.Point(314, 0);
|
||||
this.clearZCeiling.Name = "clearZCeiling";
|
||||
this.clearZCeiling.Size = new System.Drawing.Size(26, 24);
|
||||
this.clearZCeiling.TabIndex = 30;
|
||||
this.clearZCeiling.UseVisualStyleBackColor = true;
|
||||
this.clearZCeiling.Click += new System.EventHandler(this.clearZCeiling_Click);
|
||||
//
|
||||
// clearZFloor
|
||||
//
|
||||
this.clearZFloor.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
|
||||
this.clearZFloor.Location = new System.Drawing.Point(314, 32);
|
||||
this.clearZFloor.Name = "clearZFloor";
|
||||
this.clearZFloor.Size = new System.Drawing.Size(26, 24);
|
||||
this.clearZFloor.TabIndex = 31;
|
||||
this.clearZFloor.UseVisualStyleBackColor = true;
|
||||
this.clearZFloor.Click += new System.EventHandler(this.clearZFloor_Click);
|
||||
//
|
||||
// VertexEditForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
|
@ -295,5 +324,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox zfloor;
|
||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox zceiling;
|
||||
private System.Windows.Forms.Panel panelHeightControls;
|
||||
private System.Windows.Forms.Button clearZFloor;
|
||||
private System.Windows.Forms.Button clearZCeiling;
|
||||
}
|
||||
}
|
|
@ -31,18 +31,46 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
private ICollection<Vertex> vertices;
|
||||
private const string CLEAR_VALUE = "Unused"; //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
#region ================== Events
|
||||
|
||||
public event EventHandler OnValuesChanged; //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
private ICollection<Vertex> vertices;
|
||||
private bool blockUpdate; //mxd
|
||||
private List<VertexProperties> vertexProps; //mxd
|
||||
|
||||
private struct VertexProperties //mxd
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
public float ZCeiling;
|
||||
public float ZFloor;
|
||||
|
||||
public VertexProperties(Vertex v) {
|
||||
X = v.Position.x;
|
||||
Y = v.Position.y;
|
||||
ZCeiling = v.ZCeiling;
|
||||
ZFloor = v.ZFloor;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== mxd. Properties
|
||||
|
||||
public ICollection<Vertex> Selection { get { return vertices; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor
|
||||
|
||||
// Constructor
|
||||
|
@ -81,9 +109,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// This sets up the form to edit the given vertices
|
||||
public void Setup(ICollection<Vertex> vertices, bool allowPositionChange)
|
||||
{
|
||||
blockUpdate = true; //mxd
|
||||
|
||||
// Keep this list
|
||||
this.vertices = vertices;
|
||||
if(vertices.Count > 1) this.Text = "Edit Vertices (" + vertices.Count + ")";
|
||||
vertexProps = new List<VertexProperties>(); //mxd
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Set all options to the first vertex properties
|
||||
|
@ -115,80 +146,173 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(positiony.Text != v.Position.y.ToString()) positiony.Text = "";
|
||||
|
||||
// Custom fields
|
||||
v.Fields.BeforeFieldsChange();//mxd
|
||||
fieldslist.SetValues(v.Fields, false);
|
||||
|
||||
//mxd. Store initial properties
|
||||
vertexProps.Add(new VertexProperties(v));
|
||||
}
|
||||
|
||||
//mxd. Height offsets
|
||||
if(General.Map.UDMF) {
|
||||
zceiling.Text = vc.Fields.GetValue("zceiling", 0f).ToString();
|
||||
zfloor.Text = vc.Fields.GetValue("zfloor", 0f).ToString();
|
||||
zceiling.Text = (float.IsNaN(vc.ZCeiling) ? CLEAR_VALUE : vc.ZCeiling.ToString());
|
||||
zfloor.Text = (float.IsNaN(vc.ZFloor) ? CLEAR_VALUE : vc.ZFloor.ToString());
|
||||
|
||||
foreach(Vertex v in vertices) {
|
||||
if(zceiling.Text != v.Fields.GetValue("zceiling", 0f).ToString())
|
||||
zceiling.Text = "";
|
||||
if(zfloor.Text != v.Fields.GetValue("zfloor", 0f).ToString())
|
||||
zfloor.Text = "";
|
||||
string zc = (float.IsNaN(v.ZCeiling) ? CLEAR_VALUE : v.ZCeiling.ToString());
|
||||
string zf = (float.IsNaN(v.ZFloor) ? CLEAR_VALUE : v.ZFloor.ToString());
|
||||
|
||||
if(zceiling.Text != zc) zceiling.Text = "";
|
||||
if(zfloor.Text != zf) zfloor.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
//mxd. Make undo
|
||||
string undodesc = "vertex";
|
||||
if(vertices.Count > 1) undodesc = vertices.Count + " vertices";
|
||||
General.Map.UndoRedo.CreateUndo("Edit " + undodesc);
|
||||
|
||||
blockUpdate = false; //mxd
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region ================== mxd. Control Events
|
||||
|
||||
private void positionx_WhenTextChanged(object sender, EventArgs e) {
|
||||
if(blockUpdate) return;
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(positionx.Text)) {
|
||||
int i = 0;
|
||||
|
||||
// Apply position
|
||||
foreach(Vertex v in vertices)
|
||||
v.Move(new Vector2D(vertexProps[i++].X, v.Position.y));
|
||||
} else { //update values
|
||||
// Verify the coordinates
|
||||
float px = positionx.GetResultFloat(0.0f);
|
||||
if(px < General.Map.FormatInterface.MinCoordinate) {
|
||||
positionx.Text = General.Map.FormatInterface.MinCoordinate.ToString();
|
||||
return;
|
||||
} else if(px > General.Map.FormatInterface.MaxCoordinate) {
|
||||
positionx.Text = General.Map.FormatInterface.MaxCoordinate.ToString();
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply position
|
||||
foreach(Vertex v in vertices)
|
||||
v.Move(new Vector2D(px, v.Position.y));
|
||||
}
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void positiony_WhenTextChanged(object sender, EventArgs e) {
|
||||
if(blockUpdate) return;
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(positiony.Text)) {
|
||||
int i = 0;
|
||||
|
||||
// Apply position
|
||||
foreach(Vertex v in vertices)
|
||||
v.Move(new Vector2D(v.Position.x, vertexProps[i++].Y));
|
||||
} else { //update values
|
||||
// Verify the coordinates
|
||||
float py = positiony.GetResultFloat(0.0f);
|
||||
if(py < General.Map.FormatInterface.MinCoordinate) {
|
||||
positiony.Text = General.Map.FormatInterface.MinCoordinate.ToString();
|
||||
return;
|
||||
} else if(py > General.Map.FormatInterface.MaxCoordinate) {
|
||||
positiony.Text = General.Map.FormatInterface.MaxCoordinate.ToString();
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply position
|
||||
foreach(Vertex v in vertices)
|
||||
v.Move(new Vector2D(v.Position.x, py));
|
||||
}
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void zceiling_WhenTextChanged(object sender, EventArgs e) {
|
||||
if(blockUpdate) return;
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(zceiling.Text)) {
|
||||
int i = 0;
|
||||
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZCeiling = vertexProps[i++].ZCeiling;
|
||||
//clear values
|
||||
} else if(zceiling.Text == CLEAR_VALUE) {
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZCeiling = float.NaN;
|
||||
//update values
|
||||
} else {
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZCeiling = zceiling.GetResultFloat(v.ZCeiling);
|
||||
}
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void zfloor_WhenTextChanged(object sender, EventArgs e) {
|
||||
if(blockUpdate) return;
|
||||
|
||||
//restore values
|
||||
if(string.IsNullOrEmpty(zfloor.Text)) {
|
||||
int i = 0;
|
||||
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZFloor = vertexProps[i++].ZFloor;
|
||||
//clear values
|
||||
}else if(zfloor.Text == CLEAR_VALUE){
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZFloor = float.NaN;
|
||||
//update values
|
||||
} else {
|
||||
foreach(Vertex v in vertices)
|
||||
v.ZFloor = zfloor.GetResultFloat(v.ZFloor);
|
||||
}
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void fieldslist_OnFieldValueChanged(string fieldname) {
|
||||
if(blockUpdate) return;
|
||||
|
||||
foreach(Vertex v in vertices)
|
||||
fieldslist.Apply(v.Fields);
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void clearZFloor_Click(object sender, EventArgs e) {
|
||||
zfloor.Text = CLEAR_VALUE;
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void clearZCeiling_Click(object sender, EventArgs e) {
|
||||
zceiling.Text = CLEAR_VALUE;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Events
|
||||
|
||||
// OK clicked
|
||||
private void apply_Click(object sender, EventArgs e)
|
||||
{
|
||||
string undodesc = "vertex";
|
||||
|
||||
// Verify the coordinates
|
||||
if((positionx.GetResultFloat(0.0f) < General.Map.FormatInterface.MinCoordinate) || (positionx.GetResultFloat(0.0f) > General.Map.FormatInterface.MaxCoordinate) ||
|
||||
(positiony.GetResultFloat(0.0f) < General.Map.FormatInterface.MinCoordinate) || (positiony.GetResultFloat(0.0f) > General.Map.FormatInterface.MaxCoordinate))
|
||||
{
|
||||
General.ShowWarningMessage("Vertex coordinates must be between " + General.Map.FormatInterface.MinCoordinate + " and " + General.Map.FormatInterface.MaxCoordinate + ".", MessageBoxButtons.OK);
|
||||
return;
|
||||
}
|
||||
|
||||
// Make undo
|
||||
if(vertices.Count > 1) undodesc = vertices.Count + " vertices";
|
||||
General.Map.UndoRedo.CreateUndo("Edit " + undodesc);
|
||||
|
||||
// Go for all vertices
|
||||
foreach(Vertex v in vertices)
|
||||
{
|
||||
// Apply position
|
||||
Vector2D p = new Vector2D();
|
||||
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);
|
||||
v.Move(p);
|
||||
|
||||
// Custom fields
|
||||
fieldslist.Apply(v.Fields);
|
||||
}
|
||||
|
||||
//mxd. Height offsets
|
||||
if(General.Map.UDMF) {
|
||||
foreach(Vertex v in vertices) {
|
||||
if(string.IsNullOrEmpty(zceiling.Text)) {
|
||||
if(v.Fields.ContainsKey("zceiling"))
|
||||
v.Fields.Remove("zceiling");
|
||||
} else {
|
||||
float oldCeil = v.Fields.GetValue("zceiling", 0f);
|
||||
UDMFTools.SetFloat(v.Fields, "zceiling", zceiling.GetResultFloat(oldCeil), 0, false);
|
||||
}
|
||||
|
||||
if(string.IsNullOrEmpty(zfloor.Text)) {
|
||||
if(v.Fields.ContainsKey("zfloor"))
|
||||
v.Fields.Remove("zfloor");
|
||||
} else {
|
||||
float oldFloor = v.Fields.GetValue("zfloor", 0f);
|
||||
UDMFTools.SetFloat(v.Fields, "zfloor", zfloor.GetResultFloat(oldFloor), 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Done
|
||||
General.Map.IsChanged = true;
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
@ -196,7 +320,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Cancel clicked
|
||||
private void cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Just close
|
||||
//mxd. perform undo
|
||||
General.Map.UndoRedo.PerformUndo();
|
||||
|
||||
// And close
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
|
|
@ -150,6 +150,9 @@
|
|||
<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>
|
||||
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
|
@ -397,16 +397,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
// Show line edit dialog
|
||||
//mxd. Show realtime vertex edit dialog
|
||||
General.Interface.OnEditFormValuesChanged += new EventHandler(vertexEditForm_OnValuesChanged);
|
||||
General.Interface.ShowEditVertices(selected);
|
||||
General.Map.Map.Update();
|
||||
|
||||
// When a single vertex was selected, deselect it now
|
||||
if(selected.Count == 1) General.Map.Map.ClearSelectedVertices();
|
||||
|
||||
// Update entire display
|
||||
General.Map.Renderer2D.Update3dFloorTagsList(); //mxd
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -414,6 +410,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
editpressed = false;
|
||||
base.OnEditEnd();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void vertexEditForm_OnValuesChanged(object sender, EventArgs e) {
|
||||
// Update entire display
|
||||
General.Map.Map.Update();
|
||||
General.Map.Renderer2D.Update3dFloorTagsList();
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
// Mouse moves
|
||||
public override void OnMouseMove(MouseEventArgs e)
|
||||
|
@ -808,8 +812,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
List<Linedef> changedLines = new List<Linedef>();
|
||||
|
||||
// Go for all vertices that need to be removed
|
||||
foreach(Vertex v in selected) {
|
||||
// Not already removed automatically?
|
||||
|
@ -832,13 +834,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
if(!dontMerge) {
|
||||
if(ld1.Start == v) ld1.SetStartVertex(v2);
|
||||
else ld1.SetEndVertex(v2);
|
||||
ld2.Dispose();
|
||||
|
||||
if(!changedLines.Contains(ld1)) changedLines.Add(ld1);
|
||||
}
|
||||
if(!dontMerge) mergeLines(selected, ld1, ld2, v);
|
||||
}
|
||||
|
||||
// Trash vertex
|
||||
|
@ -850,53 +846,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.Map.Update();
|
||||
General.Map.IsChanged = true;
|
||||
|
||||
//redraw changed lines
|
||||
foreach(Linedef l in changedLines) {
|
||||
if(l.IsDisposed) continue;
|
||||
drawLine(l.Start.Position, l.End.Position);
|
||||
|
||||
if(l.IsDisposed) continue;
|
||||
drawLine(l.Start.Position, l.End.Position);
|
||||
}
|
||||
|
||||
//redraw all affected sectors
|
||||
List<Linedef> redrawnLines = new List<Linedef>();
|
||||
foreach(Sector sector in affectedSectors) {
|
||||
if(sector.IsDisposed) continue;
|
||||
|
||||
List<Linedef> lines = new List<Linedef>();
|
||||
foreach(Sidedef side in sector.Sidedefs) {
|
||||
if(!lines.Contains(side.Line))
|
||||
lines.Add(side.Line);
|
||||
}
|
||||
|
||||
if(sector.Triangles.Vertices.Count == 0) {
|
||||
sector.Dispose();
|
||||
}
|
||||
|
||||
foreach(Linedef line in lines) {
|
||||
if(line.IsDisposed || redrawnLines.Contains(line)) continue;
|
||||
|
||||
if(line.Front == null && line.Back != null) {
|
||||
//Flip linedef
|
||||
line.FlipVertices();
|
||||
line.FlipSidedefs();
|
||||
line.SetFlag(General.Map.Config.ImpassableFlag, true);
|
||||
} else if(line.Front != null && line.Back == null) {
|
||||
line.SetFlag(General.Map.Config.ImpassableFlag, true);
|
||||
}
|
||||
|
||||
line.ApplySidedFlags();
|
||||
|
||||
drawLine(line.Start.Position, line.End.Position);
|
||||
redrawnLines.Add(line);
|
||||
}
|
||||
}
|
||||
|
||||
// Update cache values
|
||||
General.Map.Map.Update();
|
||||
General.Map.IsChanged = true;
|
||||
|
||||
// Invoke a new mousemove so that the highlighted item updates
|
||||
MouseEventArgs e = new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0);
|
||||
OnMouseMove(e);
|
||||
|
@ -905,6 +854,45 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void mergeLines(ICollection<Vertex> selected, Linedef ld1, Linedef ld2, Vertex v) {
|
||||
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
|
||||
Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start;
|
||||
|
||||
if(ld1.Start == v) ld1.SetStartVertex(v2);
|
||||
else ld1.SetEndVertex(v2);
|
||||
ld2.Dispose();
|
||||
bool redraw = true;
|
||||
|
||||
if(selected.Contains(v2) && v2.Linedefs.Count == 2) {
|
||||
Linedef[] lines = new Linedef[2];
|
||||
v2.Linedefs.CopyTo(lines, 0);
|
||||
Linedef other = lines[0] == ld2 ? lines[1] :lines[0];
|
||||
|
||||
mergeLines(selected, ld1, other, v2);
|
||||
v2.Dispose();
|
||||
redraw = false;
|
||||
}
|
||||
|
||||
if(selected.Contains(v1) && v1.Linedefs.Count == 2) {
|
||||
Linedef[] lines = new Linedef[2];
|
||||
v1.Linedefs.CopyTo(lines, 0);
|
||||
Linedef other = lines[0] == ld1 ? lines[1] : lines[0];
|
||||
|
||||
mergeLines(selected, other, ld1, v1);
|
||||
v1.Dispose();
|
||||
redraw = false;
|
||||
}
|
||||
|
||||
if(redraw) {
|
||||
Vector2D start = ld1.Start.Position;
|
||||
Vector2D end = ld1.End.Position;
|
||||
ld1.Dispose();
|
||||
drawLine(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void drawLine(Vector2D start, Vector2D end) {
|
||||
DrawnVertex dv1 = new DrawnVertex();
|
||||
DrawnVertex dv2 = new DrawnVertex();
|
||||
|
|
|
@ -27,14 +27,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public class VertexProperties
|
||||
{
|
||||
private UniFields fields;
|
||||
private float zceiling; //mxd
|
||||
private float zfloor; //mxd
|
||||
|
||||
public VertexProperties(Vertex v)
|
||||
{
|
||||
fields = new UniFields(v.Fields);
|
||||
zceiling = v.ZCeiling; //mxd
|
||||
zfloor = v.ZFloor; //mxd
|
||||
}
|
||||
|
||||
public void Apply(Vertex v)
|
||||
{
|
||||
v.ZCeiling = zceiling; //mxd
|
||||
v.ZFloor = zfloor; //mxd
|
||||
|
||||
v.Fields.BeforeFieldsChange();
|
||||
v.Fields.Clear();
|
||||
foreach(KeyValuePair<string, UniValue> uv in fields)
|
||||
|
|
|
@ -1664,10 +1664,35 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void EndEdit()
|
||||
{
|
||||
PreActionNoChange();
|
||||
|
||||
//mxd
|
||||
General.Interface.OnEditFormValuesChanged += new EventHandler(Interface_OnEditFormValuesChanged);
|
||||
|
||||
GetTargetEventReceiver(false).OnEditEnd();
|
||||
PostAction();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void Interface_OnEditFormValuesChanged(object sender, EventArgs e) {
|
||||
// Reset changed flags
|
||||
foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) {
|
||||
BaseVisualSector bvs = (vs.Value as BaseVisualSector);
|
||||
foreach(VisualFloor vf in bvs.ExtraFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraCeilings)
|
||||
vc.Changed = false;
|
||||
foreach(VisualFloor vf in bvs.ExtraBackFloors)
|
||||
vf.Changed = false;
|
||||
foreach(VisualCeiling vc in bvs.ExtraBackCeilings)
|
||||
vc.Changed = false;
|
||||
bvs.Floor.Changed = false;
|
||||
bvs.Ceiling.Changed = false;
|
||||
}
|
||||
|
||||
UpdateChangedObjects();
|
||||
ShowTargetInfo();
|
||||
}
|
||||
|
||||
[BeginAction("raisesector8")]
|
||||
public void RaiseSector8()
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ using CodeImp.DoomBuilder.VisualModes;
|
|||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
|
@ -36,20 +36,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//this updates the handle itself
|
||||
public override void Update() {
|
||||
if(!changed) return;
|
||||
|
||||
string key = ceilingVertex ? "zceiling" : "zfloor";
|
||||
float z = 0f;
|
||||
float z = ceilingVertex ? vertex.ZCeiling : vertex.ZFloor;
|
||||
|
||||
int height = getSectorHeight();
|
||||
if(vertex.Fields.ContainsKey(key)) {
|
||||
z = vertex.Fields.GetValue(key, 0f);
|
||||
|
||||
if(z == height && neighboursHaveSameHeight(height)) { //don't create garbage data!
|
||||
vertex.Fields.Remove(key);
|
||||
haveOffset = false;
|
||||
} else {
|
||||
haveOffset = true;
|
||||
}
|
||||
if(!float.IsNaN(z)) {
|
||||
haveOffset = (z != height || !neighboursHaveSameHeight(height));
|
||||
} else {
|
||||
z = height;
|
||||
haveOffset = false;
|
||||
|
@ -90,7 +81,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
//get the most apropriate height from sectors
|
||||
//get the most appropriate height from sectors
|
||||
private int getSectorHeight() {
|
||||
int height = 0;
|
||||
|
||||
|
@ -275,11 +266,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
//Delete key pressed - remove zoffset field
|
||||
public virtual void OnDelete() {
|
||||
string key = ceilingVertex ? "zceiling" : "zfloor";
|
||||
if(ceilingVertex) {
|
||||
if(float.IsNaN(vertex.ZCeiling)) return;
|
||||
vertex.ZCeiling = float.NaN;
|
||||
|
||||
//update affected sectors
|
||||
updateGeometry(vertex);
|
||||
changed = true;
|
||||
mode.ShowTargetInfo();
|
||||
} else {
|
||||
if(float.IsNaN(vertex.ZFloor)) return;
|
||||
vertex.ZFloor = float.NaN;
|
||||
|
||||
if(vertex.Fields.ContainsKey(key)) {
|
||||
vertex.Fields.Remove(key);
|
||||
|
||||
//update affected sectors
|
||||
updateGeometry(vertex);
|
||||
changed = true;
|
||||
|
@ -291,45 +289,49 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public virtual void OnEditEnd() {
|
||||
if(General.Interface.IsActiveWindow) {
|
||||
List<Vertex> verts = mode.GetSelectedVertices();
|
||||
DialogResult result = General.Interface.ShowEditVertices(verts, false);
|
||||
|
||||
if(result == DialogResult.OK) {
|
||||
foreach(Vertex v in verts) {
|
||||
// Update what must be updated
|
||||
updateGeometry(v);
|
||||
if(v.Index == vertex.Index) {
|
||||
changed = true;
|
||||
Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
General.Interface.OnEditFormValuesChanged += new System.EventHandler(Interface_OnEditFormValuesChanged);
|
||||
General.Interface.ShowEditVertices(verts, false);
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void Interface_OnEditFormValuesChanged(object sender, System.EventArgs e) {
|
||||
VertexEditForm form = sender as VertexEditForm;
|
||||
if(form == null) return;
|
||||
|
||||
// Update what must be updated
|
||||
foreach(Vertex v in form.Selection)
|
||||
updateGeometry(v);
|
||||
|
||||
changed = true;
|
||||
Update();
|
||||
}
|
||||
|
||||
// Raise/lower thing
|
||||
public virtual void OnChangeTargetHeight(int amount) {
|
||||
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
|
||||
undoticket = mode.CreateUndo("Change vertex height");
|
||||
|
||||
//change vertex zoffset
|
||||
vertex.Fields.BeforeFieldsChange();
|
||||
|
||||
string key = ceilingVertex ? "zceiling" : "zfloor";
|
||||
float val = 0f;
|
||||
|
||||
//get value
|
||||
if(!vertex.Fields.ContainsKey(key)) {
|
||||
val = getSectorHeight();
|
||||
vertex.Fields.Add(key, new UniValue(UniversalType.Float, val));
|
||||
if(ceilingVertex) {
|
||||
vertex.ZCeiling = (float.IsNaN(vertex.ZCeiling) ? getSectorHeight() + amount : vertex.ZCeiling + amount);
|
||||
|
||||
if(vertex.ZCeiling == getSectorHeight()) {
|
||||
vertex.ZCeiling = float.NaN;
|
||||
mode.SetActionResult("Cleared vertex height.");
|
||||
} else {
|
||||
mode.SetActionResult("Changed vertex height to " + vertex.ZCeiling + ".");
|
||||
}
|
||||
} else {
|
||||
val = (float)vertex.Fields[key].Value;
|
||||
vertex.ZFloor = (float.IsNaN(vertex.ZFloor) ? getSectorHeight() + amount : vertex.ZFloor + amount);
|
||||
|
||||
if(vertex.ZFloor == getSectorHeight()) {
|
||||
vertex.ZFloor = float.NaN;
|
||||
mode.SetActionResult("Cleared vertex height.");
|
||||
} else {
|
||||
mode.SetActionResult("Changed vertex height to " + vertex.ZFloor + ".");
|
||||
}
|
||||
}
|
||||
|
||||
//update value
|
||||
vertex.Fields[key].Value = val + amount;
|
||||
|
||||
mode.SetActionResult("Changed vertex height to " + (int)(val + amount) + ".");
|
||||
|
||||
// Update what must be updated
|
||||
updateGeometry(vertex);
|
||||
changed = true;
|
||||
|
|
|
@ -30,18 +30,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
ceilingVerts[index] = new Vector3D(v.Position);
|
||||
|
||||
//check ceiling
|
||||
if(v.Fields.ContainsKey("zceiling")) {
|
||||
if(!float.IsNaN(v.ZCeiling)) {
|
||||
//vertex offset is absolute
|
||||
ceilingVerts[index].z = (float)v.Fields["zceiling"].Value;
|
||||
ceilingVerts[index].z = v.ZCeiling;
|
||||
ceilingChanged = true;
|
||||
} else {
|
||||
ceilingVerts[index].z = data.Ceiling.plane.GetZ(v.Position);
|
||||
}
|
||||
|
||||
//and floor
|
||||
if(v.Fields.ContainsKey("zfloor")) {
|
||||
if(!float.IsNaN(v.ZFloor)) {
|
||||
//vertex offset is absolute
|
||||
floorVerts[index].z = (float)v.Fields["zfloor"].Value;
|
||||
floorVerts[index].z = v.ZFloor;
|
||||
floorChanged = true;
|
||||
} else {
|
||||
floorVerts[index].z = data.Floor.plane.GetZ(v.Position);
|
||||
|
|
|
@ -16,27 +16,12 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Drawing;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Plugins;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -69,7 +54,7 @@ namespace CodeImp.DoomBuilder.CopyPasteSectorProps
|
|||
private int brightness;
|
||||
private int effect;
|
||||
private int tag;
|
||||
private UniFields fields;
|
||||
//private UniFields fields;
|
||||
|
||||
// This is set to true to know that we copied sector properties.
|
||||
// If this is false, the variables above are uninitialized.
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<Reference Include="Builder, Version=2.0.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Build\Builder.exe</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
|
184
Source/Plugins/StairSectorBuilder/BuilderPlug.cs
Normal file
184
Source/Plugins/StairSectorBuilder/BuilderPlug.cs
Normal file
|
@ -0,0 +1,184 @@
|
|||
|
||||
#region ================== Copyright (c) 2009 Boris Iwanski
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Boris Iwanski
|
||||
* This program is released under GNU General Public License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Drawing;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Plugins;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.StairSectorBuilderMode
|
||||
{
|
||||
//
|
||||
// MANDATORY: The plug!
|
||||
// This is an important class to the Doom Builder core. Every plugin must
|
||||
// have exactly 1 class that inherits from Plug. When the plugin is loaded,
|
||||
// this class is instantiated and used to receive events from the core.
|
||||
// Make sure the class is public, because only public classes can be seen
|
||||
// by the core.
|
||||
//
|
||||
|
||||
public class BuilderPlug : Plug
|
||||
{
|
||||
public struct Prefab
|
||||
{
|
||||
public string name;
|
||||
|
||||
// General
|
||||
public int numberofsectors;
|
||||
public int innervertexmultiplier;
|
||||
public int outervertexmultiplier;
|
||||
public int stairtype;
|
||||
|
||||
// Straight stairs
|
||||
public int sectordepth;
|
||||
public int spacing;
|
||||
public bool frontside;
|
||||
public bool singlesectors;
|
||||
public bool singledirection;
|
||||
public bool distinctbaseheights;
|
||||
|
||||
// Auto curve
|
||||
public int flipping;
|
||||
|
||||
// Catmull Rom spline
|
||||
public int numberofcontrolpoints;
|
||||
|
||||
// Height info
|
||||
public bool applyfloormod;
|
||||
public int floormod;
|
||||
public int floorbase;
|
||||
public bool applyceilingmod;
|
||||
public int ceilingmod;
|
||||
public int ceilingbase;
|
||||
|
||||
// Textures
|
||||
public bool applyfloortexture;
|
||||
public string floortexture;
|
||||
public bool applyceilingtexture;
|
||||
public string ceilingtexture;
|
||||
|
||||
public bool applyuppertexture;
|
||||
public string uppertexture;
|
||||
public bool upperunpegged;
|
||||
public bool applymiddletexture;
|
||||
public string middletexture;
|
||||
public bool applylowertexture;
|
||||
public string lowertexture;
|
||||
public bool lowerunpegged;
|
||||
}
|
||||
|
||||
// Static instance. We can't use a real static class, because BuilderPlug must
|
||||
// be instantiated by the core, so we keep a static reference. (this technique
|
||||
// should be familiar to object-oriented programmers)
|
||||
private static BuilderPlug me;
|
||||
|
||||
// Static property to access the BuilderPlug
|
||||
public static BuilderPlug Me { get { return me; } }
|
||||
|
||||
private List<Prefab> prefabs;
|
||||
|
||||
public List<Prefab> Prefabs { get { return prefabs; } }
|
||||
|
||||
// This plugin relies on some functionality that wasn't there in older versions
|
||||
public override int MinimumRevision { get { return 1310; } }
|
||||
|
||||
// This event is called when the plugin is initialized
|
||||
public override void OnInitialize()
|
||||
{
|
||||
base.OnInitialize();
|
||||
|
||||
// This binds the methods in this class that have the BeginAction
|
||||
// and EndAction attributes with their actions. Without this, the
|
||||
// attributes are useless. Note that in classes derived from EditMode
|
||||
// this is not needed, because they are bound automatically when the
|
||||
// editing mode is engaged.
|
||||
General.Actions.BindMethods(this);
|
||||
|
||||
prefabs = new List<Prefab>();
|
||||
|
||||
// TODO: Add DB2 version check so that old DB2 versions won't crash
|
||||
// General.ErrorLogger.Add(ErrorType.Error, "zomg!");
|
||||
|
||||
// Keep a static reference
|
||||
me = this;
|
||||
}
|
||||
|
||||
// This is called when the plugin is terminated
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
|
||||
// This must be called to remove bound methods for actions.
|
||||
General.Actions.UnbindMethods(this);
|
||||
}
|
||||
|
||||
#region ================== Actions
|
||||
|
||||
[BeginAction("selectsectorsoutline")]
|
||||
public void SelectSectorsOutline()
|
||||
{
|
||||
// Must have sectors selected. Having sectors selected implies
|
||||
// that there are also linedefs selected
|
||||
if (General.Map.Map.SelectedSectorsCount == 0) return;
|
||||
|
||||
// Get the list of selected sectors since it'll be empty after
|
||||
// switching to linedefs mode
|
||||
List<Sector> sectors = new List<Sector>(General.Map.Map.GetSelectedSectors(true));
|
||||
|
||||
General.Editing.ChangeMode("LinedefsMode");
|
||||
|
||||
// Go through all selected linedefs and unselect/unmark all which
|
||||
// have a selected sector on both sides
|
||||
foreach (Linedef ld in General.Map.Map.GetSelectedLinedefs(true))
|
||||
{
|
||||
if (sectors.Contains(ld.Front.Sector) && ld.Back != null && sectors.Contains(ld.Back.Sector))
|
||||
{
|
||||
ld.Selected = false;
|
||||
ld.Marked = false;
|
||||
}
|
||||
}
|
||||
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
36
Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs
Normal file
36
Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Управление общими сведениями о сборке осуществляется с помощью
|
||||
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
|
||||
// связанные со сборкой.
|
||||
[assembly: AssemblyTitle("StairSectorBuilder")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("StairSectorBuilder")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми
|
||||
// для COM-компонентов. Если требуется обратиться к типу в этой сборке через
|
||||
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
[assembly: Guid("a3340ba1-665f-4414-8cbb-a0271aa32137")]
|
||||
|
||||
// Сведения о версии сборки состоят из следующих четырех значений:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер построения
|
||||
// Редакция
|
||||
//
|
||||
// Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
77
Source/Plugins/StairSectorBuilder/Properties/Resources.Designer.cs
generated
Normal file
77
Source/Plugins/StairSectorBuilder/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,77 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:2.0.50727.4927
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CodeImp.DoomBuilder.StairSectorBuilder.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
// с помощью такого средства, как ResGen или Visual Studio.
|
||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
// с параметром /str или перестройте свой проект VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeImp.DoomBuilder.StairSectorBuilder.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static byte[] Actions {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Actions", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap StairIcon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("StairIcon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
127
Source/Plugins/StairSectorBuilder/Properties/Resources.resx
Normal file
127
Source/Plugins/StairSectorBuilder/Properties/Resources.resx
Normal file
|
@ -0,0 +1,127 @@
|
|||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Actions" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Actions.cfg;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="StairIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\StairIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
42
Source/Plugins/StairSectorBuilder/Resources/Actions.cfg
Normal file
42
Source/Plugins/StairSectorBuilder/Resources/Actions.cfg
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
//
|
||||
// This file defines which actions there are, what description they have and
|
||||
// some behaviour options. The Doom Builder core will bind to these actions
|
||||
// with delegates (function pointers) where you use the BeginAction and
|
||||
// EndAction attributes. This file must be named Actions.cfg and must be
|
||||
// included in the plugin project as "Embedded Resource".
|
||||
//
|
||||
|
||||
//
|
||||
// Options:
|
||||
//
|
||||
// allowkeys: Allows the user to bind standard keys to this action.
|
||||
// allowmouse: Allows the user to bind mouse buttons to this action.
|
||||
// allowscroll: Allows the user to bind the scrollwheel to this action.
|
||||
// disregardshift: This action will trigger regardless if Shift or Control is used.
|
||||
// repeat: BeginAction will be called for automatic key repetition.
|
||||
// default: Default key is only used when the action is loaded for the first
|
||||
// time and the default key is not used by any other action.
|
||||
//
|
||||
// allowkeys and allowmouse are true by default, the others are false by default.
|
||||
//
|
||||
|
||||
stairsectorbuildermode
|
||||
{
|
||||
title = "Stair Sector Builder Mode";
|
||||
category = "modes";
|
||||
description = "Switches to the stair sector builder mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
selectsectorsoutline
|
||||
{
|
||||
title = "Select Sectors Outline";
|
||||
category = "sectors";
|
||||
description = "Selects the outline of all marked sectors, deselecting lines that are shared.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
BIN
Source/Plugins/StairSectorBuilder/Resources/StairIcon.png
Normal file
BIN
Source/Plugins/StairSectorBuilder/Resources/StairIcon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
93
Source/Plugins/StairSectorBuilder/StairSectorBuilder.csproj
Normal file
93
Source/Plugins/StairSectorBuilder/StairSectorBuilder.csproj
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{3F365121-906B-409D-BB1E-37E0A78056C2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CodeImp.DoomBuilder.StairSectorBuilder</RootNamespace>
|
||||
<AssemblyName>StairSectorBuilder</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BuilderPlug.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StairSectorBuilderForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StairSectorBuilderForm.designer.cs">
|
||||
<DependentUpon>StairSectorBuilderForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StairSectorBuilderMode.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="StairSectorBuilderForm.resx">
|
||||
<DependentUpon>StairSectorBuilderForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\Actions.cfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StairIcon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Core\Builder.csproj">
|
||||
<Project>{818B3D10-F791-4C3F-9AF5-BB2D0079B63C}</Project>
|
||||
<Name>Builder</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassDiagram1.cd" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
892
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.cs
Normal file
892
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.cs
Normal file
|
@ -0,0 +1,892 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
|
||||
namespace CodeImp.DoomBuilder.StairSectorBuilderMode
|
||||
{
|
||||
public partial class StairSectorBuilderForm : DelayedForm
|
||||
{
|
||||
private bool fullyloaded = false;
|
||||
private bool loadingprefab = false;
|
||||
private int stepmultiplier = 1;
|
||||
private int originalfloorbase;
|
||||
private int originalceilingbase;
|
||||
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public int OriginalFloorBase
|
||||
{
|
||||
set { originalfloorbase = value; }
|
||||
get { return originalfloorbase; }
|
||||
}
|
||||
|
||||
public int OriginalCeilingBase
|
||||
{
|
||||
set { originalceilingbase = value; }
|
||||
get { return originalceilingbase; }
|
||||
}
|
||||
|
||||
public int StepMultiplier
|
||||
{
|
||||
set { stepmultiplier = value; }
|
||||
}
|
||||
|
||||
public int StairType
|
||||
{
|
||||
get { return tabcontrol.SelectedIndex; }
|
||||
}
|
||||
|
||||
public uint NumberOfSectors
|
||||
{
|
||||
// get { return (uint)System.Convert.ToUInt32(numberofsectors.Text); }
|
||||
get { return (uint)numberofsectors.GetResult(1); }
|
||||
set { numberofsectors.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public uint SectorDepth
|
||||
{
|
||||
// get { return (uint)System.Convert.ToUInt32(sectordepth.Text); }
|
||||
get { return (uint)sectordepth.GetResult(32); }
|
||||
set { sectordepth.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public int Spacing
|
||||
{
|
||||
get { return spacing.GetResult(0); }
|
||||
set { spacing.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public int InnerVertexMultiplier
|
||||
{
|
||||
get { return autocurveinnervertexmultiplier.GetResult(1); }
|
||||
set { autocurveinnervertexmultiplier.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public int OuterVertexMultiplier
|
||||
{
|
||||
get { return autocurveoutervertexmultiplier.GetResult(1); }
|
||||
set { autocurveoutervertexmultiplier.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public bool SideFront
|
||||
{
|
||||
get { return sidefront.Checked; }
|
||||
set { sidefront.Checked = value; }
|
||||
}
|
||||
|
||||
public CheckBox DistinctBaseHeights
|
||||
{
|
||||
get { return distinctbaseheights; }
|
||||
set { distinctbaseheights = value; }
|
||||
}
|
||||
|
||||
public CheckBox SingleSectors
|
||||
{
|
||||
get { return singlesectors; }
|
||||
set { singlesectors = value; }
|
||||
}
|
||||
|
||||
public CheckBox SingleDirection
|
||||
{
|
||||
get { return singledirection; }
|
||||
set { singledirection = value; }
|
||||
}
|
||||
|
||||
public TabControl Tabs
|
||||
{
|
||||
get { return tabcontrol; }
|
||||
}
|
||||
|
||||
public int NumControlPoints
|
||||
{
|
||||
get { return numberofcontrolpoints.GetResult(1) + 2; }
|
||||
set { numberofcontrolpoints.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public bool FloorHeight
|
||||
{
|
||||
get { return floorheightmodification.Checked; }
|
||||
set { floorheightmodification.Checked = value; }
|
||||
}
|
||||
|
||||
public bool CeilingHeight
|
||||
{
|
||||
get { return ceilingheightmodification.Checked; }
|
||||
set { ceilingheightmodification.Checked = value; }
|
||||
}
|
||||
|
||||
|
||||
public int FloorHeightModification
|
||||
{
|
||||
get { return floorheightmod.GetResult(0); }
|
||||
set { floorheightmod.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public int CeilingHeightModification
|
||||
{
|
||||
get { return ceilingheightmod.GetResult(0); }
|
||||
set { ceilingheightmod.Text = value.ToString(); }
|
||||
}
|
||||
|
||||
public bool FloorFlat
|
||||
{
|
||||
get { return floorflat.Checked; }
|
||||
set { floorflat.Checked = value; }
|
||||
}
|
||||
|
||||
public string FloorFlatTexture
|
||||
{
|
||||
get { return floorflattexture.TextureName; }
|
||||
set { floorflattexture.TextureName = value; }
|
||||
}
|
||||
|
||||
public bool CeilingFlat
|
||||
{
|
||||
get { return ceilingflat.Checked; }
|
||||
set { ceilingflat.Checked = value; }
|
||||
}
|
||||
|
||||
public string CeilingFlatTexture
|
||||
{
|
||||
get { return ceilingflattexture.TextureName; }
|
||||
set { ceilingflattexture.TextureName = value; }
|
||||
}
|
||||
|
||||
public bool UpperTexture
|
||||
{
|
||||
get { return uppertexture.Checked; }
|
||||
set { uppertexture.Checked = value; }
|
||||
}
|
||||
|
||||
public bool MiddleTexture
|
||||
{
|
||||
get { return middletexture.Checked; }
|
||||
set { middletexture.Checked = value; }
|
||||
}
|
||||
|
||||
public bool LowerTexture
|
||||
{
|
||||
get { return lowertexture.Checked; }
|
||||
set { lowertexture.Checked = value; }
|
||||
}
|
||||
|
||||
public string UpperTextureTexture
|
||||
{
|
||||
get { return uppertexturetexture.TextureName; }
|
||||
set { uppertexturetexture.TextureName = value; }
|
||||
}
|
||||
|
||||
public string MiddleTextureTexture
|
||||
{
|
||||
get { return middletexturetexture.TextureName; }
|
||||
set { middletexturetexture.TextureName = value; }
|
||||
}
|
||||
|
||||
public string LowerTextureTexture
|
||||
{
|
||||
get { return lowertexturetexture.TextureName; }
|
||||
set { lowertexturetexture.TextureName = value; }
|
||||
}
|
||||
|
||||
public int FloorBase
|
||||
{
|
||||
set { floorbase.Text = value.ToString(); }
|
||||
get { return floorbase.GetResult(0); }
|
||||
}
|
||||
|
||||
public int CeilingBase
|
||||
{
|
||||
set { ceilingbase.Text = value.ToString(); }
|
||||
get { return ceilingbase.GetResult(0); }
|
||||
}
|
||||
|
||||
public bool FullyLoaded
|
||||
{
|
||||
get { return fullyloaded; }
|
||||
}
|
||||
|
||||
public int Flipping
|
||||
{
|
||||
get { return autocurveflipping.SelectedIndex; }
|
||||
set { autocurveflipping.SelectedIndex = value; }
|
||||
}
|
||||
|
||||
public bool UpperUnpegged
|
||||
{
|
||||
get { return upperunpegged.Checked; }
|
||||
set { upperunpegged.Checked = value; }
|
||||
}
|
||||
|
||||
public bool LowerUnpegged
|
||||
{
|
||||
get { return lowerunpegged.Checked; }
|
||||
set { lowerunpegged.Checked = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public StairSectorBuilderForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
foreach (BuilderPlug.Prefab p in BuilderPlug.Me.Prefabs)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem();
|
||||
ListViewItem.ListViewSubItem lvisi = new ListViewItem.ListViewSubItem();
|
||||
|
||||
lvi.Text = p.name;
|
||||
lvisi.Text = tabcontrol.TabPages[p.stairtype].Text;
|
||||
|
||||
lvi.SubItems.Add(lvisi);
|
||||
prefabs.Items.Add(lvi);
|
||||
}
|
||||
}
|
||||
|
||||
// This shows the window
|
||||
public void Show(Form owner)
|
||||
{
|
||||
// Position at left-top of owner
|
||||
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
|
||||
|
||||
// Set the default name for the prefab
|
||||
for (int i = 1; i < int.MaxValue; i++)
|
||||
{
|
||||
string defname = "Prefab #" + i.ToString();
|
||||
bool validname = true;
|
||||
|
||||
foreach (BuilderPlug.Prefab p in BuilderPlug.Me.Prefabs)
|
||||
{
|
||||
if (p.name == defname)
|
||||
{
|
||||
validname = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (validname)
|
||||
{
|
||||
prefabname.Text = defname;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Show window
|
||||
base.Show(owner);
|
||||
}
|
||||
|
||||
private void ComputeHeights()
|
||||
{
|
||||
if (!fullyloaded) return;
|
||||
|
||||
if (floorbase.Enabled == false)
|
||||
{
|
||||
floorfirst.Text = "--";
|
||||
floorlast.Text = "--";
|
||||
}
|
||||
else
|
||||
{
|
||||
floorfirst.Text = (Int32.Parse(floorbase.Text) + Int32.Parse(floorheightmod.Text)).ToString();
|
||||
floorlast.Text = (Int32.Parse(floorbase.Text) + Int32.Parse(floorheightmod.Text) * (Int32.Parse(numberofsectors.Text) * stepmultiplier)).ToString();
|
||||
}
|
||||
|
||||
if (ceilingbase.Enabled == false)
|
||||
{
|
||||
ceilingfirst.Text = "--";
|
||||
ceilinglast.Text = "--";
|
||||
}
|
||||
else
|
||||
{
|
||||
ceilingfirst.Text = (Int32.Parse(ceilingbase.Text) + Int32.Parse(ceilingheightmod.Text)).ToString();
|
||||
ceilinglast.Text = (Int32.Parse(ceilingbase.Text) + Int32.Parse(ceilingheightmod.Text) * (Int32.Parse(numberofsectors.Text) * stepmultiplier)).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap redrawing display so that it will not get called multiple
|
||||
// times while loading a prefab
|
||||
private void DoRedrawDisplay()
|
||||
{
|
||||
if (loadingprefab == false) General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
SavePrefab("[Previous]", true, 0);
|
||||
|
||||
General.Editing.AcceptMode();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
General.Editing.CancelMode();
|
||||
}
|
||||
|
||||
private void tbSectorDepth_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void rdbFront_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void rdbBack_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void tabcontrol_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (General.Map.Map.GetSelectedLinedefs(true).Count == 1)
|
||||
{
|
||||
tabcontrol.SelectedTab = tabPage1;
|
||||
}
|
||||
|
||||
if (tabcontrol.SelectedTab != tabPage1)
|
||||
{
|
||||
floorbase.Enabled = true;
|
||||
ceilingbase.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (distinctbaseheights.Checked == true)
|
||||
{
|
||||
floorbase.Enabled = false;
|
||||
ceilingbase.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
floorbase.Enabled = true;
|
||||
ceilingbase.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
DoRedrawDisplay();
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void tbAutoNumSectors_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void numberofsectors_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (numberofsectors.Text == "" || numberofsectors.GetResult(1) == 0) numberofsectors.Text = "1";
|
||||
ComputeHeights();
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void sectordepth_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (sectordepth.GetResult(32) == 0) sectordepth.Text = "1";
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void StairSectorBuilderForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
sectordepth.Text = "32";
|
||||
spacing.Text = "0";
|
||||
numberofsectors.Text = "1";
|
||||
autocurveinnervertexmultiplier.Text = "1";
|
||||
autocurveoutervertexmultiplier.Text = "1";
|
||||
splineinnervertexmultiplier.Text = "1";
|
||||
splineoutervertexmultiplier.Text = "1";
|
||||
numberofcontrolpoints.Text = "1";
|
||||
floorheightmod.Text = "0";
|
||||
ceilingheightmod.Text = "0";
|
||||
floorbase.Text = "0";
|
||||
ceilingbase.Text = "0";
|
||||
autocurveflipping.SelectedIndex = 0;
|
||||
MiddleTextureTexture = "-";
|
||||
|
||||
fullyloaded = true;
|
||||
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void autocurveinnervertexmultiplier_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (autocurveinnervertexmultiplier.GetResult(1) == 0) autocurveinnervertexmultiplier.Text = "1";
|
||||
|
||||
if(splineinnervertexmultiplier.Text != autocurveinnervertexmultiplier.Text)
|
||||
splineinnervertexmultiplier.Text = autocurveinnervertexmultiplier.Text;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void autocurveoutervertexmultiplier_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (autocurveoutervertexmultiplier.GetResult(1) == 0) autocurveoutervertexmultiplier.Text = "1";
|
||||
|
||||
if(splineoutervertexmultiplier.Text != autocurveoutervertexmultiplier.Text)
|
||||
splineoutervertexmultiplier.Text = autocurveoutervertexmultiplier.Text;
|
||||
|
||||
DoRedrawDisplay();
|
||||
|
||||
}
|
||||
|
||||
private void splineinnervertexmultiplier_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (splineinnervertexmultiplier.GetResult(1) == 0) splineinnervertexmultiplier.Text = "1";
|
||||
|
||||
if(autocurveinnervertexmultiplier.Text != splineinnervertexmultiplier.Text)
|
||||
autocurveinnervertexmultiplier.Text = splineinnervertexmultiplier.Text;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void splineoutervertexmultiplier_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (splineoutervertexmultiplier.GetResult(1) == 0) splineoutervertexmultiplier.Text = "1";
|
||||
|
||||
if(splineoutervertexmultiplier.Text != autocurveoutervertexmultiplier.Text)
|
||||
autocurveoutervertexmultiplier.Text = splineoutervertexmultiplier.Text;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void onecontrolpoint_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void StairSectorBuilderForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
if (General.Map.Map.GetSelectedLinedefs(true).Count == 1 || General.Map.Map.SelectedSectorsCount > 0)
|
||||
{
|
||||
tabcontrol.TabPages.Remove(tabPage2);
|
||||
tabcontrol.TabPages.Remove(tabPage3);
|
||||
}
|
||||
|
||||
if (General.Map.Map.SelectedSectorsCount > 0)
|
||||
{
|
||||
singledirection.Checked = false;
|
||||
singledirection.Enabled = false;
|
||||
|
||||
singlesectors.Checked = true;
|
||||
singlesectors.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void singlesectors_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (singlesectors.Checked)
|
||||
singledirection.Enabled = true;
|
||||
else
|
||||
singledirection.Enabled = false;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void numberofcontrolpoints_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (numberofcontrolpoints.GetResult(1) == 0) numberofcontrolpoints.Text = "1";
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void sidefront_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void sideback_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void singledirection_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void floorheightmod_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (floorheightmod.GetResult(0) == 0) floorheightmod.Text = "0";
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void ceilingheightmod_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ceilingheightmod.GetResult(0) == 0) ceilingheightmod.Text = "0";
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void floorflat_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (floorflat.Checked)
|
||||
floorflattexture.Enabled = true;
|
||||
else
|
||||
floorflattexture.Enabled = false;
|
||||
}
|
||||
|
||||
private void ceilingflat_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ceilingflat.Checked)
|
||||
ceilingflattexture.Enabled = true;
|
||||
else
|
||||
ceilingflattexture.Enabled = false;
|
||||
}
|
||||
|
||||
private void spacing_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (spacing.GetResult(0) == 0) spacing.Text = "0";
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void uppertexture_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (uppertexture.Checked)
|
||||
{
|
||||
uppertexturetexture.Enabled = true;
|
||||
upperunpegged.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
uppertexturetexture.Enabled = false;
|
||||
upperunpegged.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void middletexture_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (middletexture.Checked)
|
||||
middletexturetexture.Enabled = true;
|
||||
else
|
||||
middletexturetexture.Enabled = false;
|
||||
}
|
||||
|
||||
private void lowertexture_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (lowertexture.Checked)
|
||||
{
|
||||
lowertexturetexture.Enabled = true;
|
||||
lowerunpegged.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lowertexturetexture.Enabled = false;
|
||||
lowerunpegged.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void firstisback_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void StairSectorBuilderForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
// User closing the window?
|
||||
if (e.CloseReason == CloseReason.UserClosing)
|
||||
{
|
||||
// Just cancel
|
||||
General.Editing.CancelMode();
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void lastisback_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void acflipping1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void acflipping2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void acflipping3_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void floorbase_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (floorbase.GetResult(0) == 0) floorbase.Text = "0";
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void ceilingbase_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ceilingbase.GetResult(0) == 0) ceilingbase.Text = "0";
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void prefabsave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string name = prefabname.Text.Trim();
|
||||
|
||||
if (name == "[Previous]")
|
||||
MessageBox.Show(Owner, "The prefab name \"[Previous]\" is reserved and can not be overwritten.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
else
|
||||
SavePrefab(prefabname.Text.Trim(), false, -1);
|
||||
}
|
||||
|
||||
private void SavePrefab(string name, bool forceoverwrite, int position)
|
||||
{
|
||||
int overwrite = -1;
|
||||
|
||||
// Prefab name may not be empty
|
||||
if (name == "")
|
||||
{
|
||||
MessageBox.Show(this.Owner, "Please enter a name for the prefab", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there's already a prefab with the given name
|
||||
for (int i = 0; i < BuilderPlug.Me.Prefabs.Count; i++)
|
||||
{
|
||||
BuilderPlug.Prefab p = BuilderPlug.Me.Prefabs[i];
|
||||
|
||||
if (p.name == name)
|
||||
{
|
||||
if (forceoverwrite == false && MessageBox.Show(this.Owner, "A prefab with that name already exists. Overwrite?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
return;
|
||||
else
|
||||
overwrite = i;
|
||||
}
|
||||
}
|
||||
|
||||
ListViewItem lvi = new ListViewItem();
|
||||
ListViewItem.ListViewSubItem lvisi = new ListViewItem.ListViewSubItem();
|
||||
|
||||
lvi.Text = name;
|
||||
lvisi.Text = tabcontrol.TabPages[tabcontrol.SelectedIndex].Text;
|
||||
|
||||
lvi.SubItems.Add(lvisi);
|
||||
|
||||
BuilderPlug.Prefab pf = new BuilderPlug.Prefab();
|
||||
|
||||
pf.name = name;
|
||||
|
||||
pf.numberofsectors = (int)NumberOfSectors;
|
||||
pf.outervertexmultiplier = OuterVertexMultiplier;
|
||||
pf.innervertexmultiplier = InnerVertexMultiplier;
|
||||
|
||||
pf.stairtype = tabcontrol.SelectedIndex;
|
||||
|
||||
// Straight stairs
|
||||
pf.sectordepth = (int)SectorDepth;
|
||||
pf.spacing = (int)Spacing;
|
||||
pf.frontside = SideFront;
|
||||
pf.singlesectors = SingleSectors.Checked;
|
||||
pf.singledirection = SingleDirection.Checked;
|
||||
pf.distinctbaseheights = DistinctBaseHeights.Checked;
|
||||
|
||||
// Auto curve
|
||||
pf.flipping = Flipping;
|
||||
|
||||
// Catmull Rom spline
|
||||
pf.numberofcontrolpoints = NumControlPoints - 2;
|
||||
|
||||
// Height info
|
||||
pf.applyfloormod = FloorHeight;
|
||||
pf.floormod = FloorHeightModification;
|
||||
//pf.floorbase = FloorBase;
|
||||
pf.applyceilingmod = CeilingHeight;
|
||||
pf.ceilingmod = CeilingHeightModification;
|
||||
//pf.ceilingbase = CeilingBase;
|
||||
|
||||
// Textures
|
||||
pf.applyfloortexture = FloorFlat;
|
||||
pf.floortexture = FloorFlatTexture;
|
||||
|
||||
pf.applyceilingtexture = CeilingFlat;
|
||||
pf.ceilingtexture = CeilingFlatTexture;
|
||||
|
||||
pf.applyuppertexture = UpperTexture;
|
||||
pf.uppertexture = UpperTextureTexture;
|
||||
pf.upperunpegged = UpperUnpegged;
|
||||
|
||||
pf.applymiddletexture = MiddleTexture;
|
||||
pf.middletexture = MiddleTextureTexture;
|
||||
|
||||
pf.applylowertexture = LowerTexture;
|
||||
pf.lowertexture = LowerTextureTexture;
|
||||
pf.lowerunpegged = LowerUnpegged;
|
||||
|
||||
if (overwrite == -1)
|
||||
{
|
||||
if (position == -1)
|
||||
{
|
||||
BuilderPlug.Me.Prefabs.Add(pf);
|
||||
prefabs.Items.Add(lvi);
|
||||
}
|
||||
else
|
||||
{
|
||||
BuilderPlug.Me.Prefabs.Insert(position, pf);
|
||||
prefabs.Items.Insert(position, lvi);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BuilderPlug.Me.Prefabs.RemoveAt(overwrite);
|
||||
BuilderPlug.Me.Prefabs.Insert(overwrite, pf);
|
||||
|
||||
prefabs.Items.RemoveAt(overwrite);
|
||||
prefabs.Items.Insert(overwrite, lvi);
|
||||
}
|
||||
}
|
||||
|
||||
private void prefabload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (prefabs.SelectedIndices.Count == 0) return;
|
||||
|
||||
loadingprefab = true;
|
||||
|
||||
BuilderPlug.Prefab p = BuilderPlug.Me.Prefabs[prefabs.SelectedIndices[0]];
|
||||
|
||||
prefabname.Text = p.name;
|
||||
|
||||
NumberOfSectors = (uint)p.numberofsectors;
|
||||
OuterVertexMultiplier = p.outervertexmultiplier;
|
||||
InnerVertexMultiplier = p.innervertexmultiplier;
|
||||
|
||||
tabcontrol.SelectedIndex = p.stairtype;
|
||||
|
||||
// Straight stairs
|
||||
SectorDepth = (uint)p.sectordepth;
|
||||
Spacing = p.spacing;
|
||||
SideFront = p.frontside;
|
||||
SingleSectors.Checked = p.singlesectors;
|
||||
SingleDirection.Checked = p.singledirection;
|
||||
DistinctBaseHeights.Checked = p.distinctbaseheights;
|
||||
|
||||
// Auto curve TODO
|
||||
Flipping = p.flipping;
|
||||
|
||||
// Catmull Rom spline
|
||||
NumControlPoints = p.numberofcontrolpoints;
|
||||
|
||||
// Height info
|
||||
FloorHeight = p.applyfloormod;
|
||||
FloorHeightModification = p.floormod;
|
||||
//FloorBase = p.floorbase;
|
||||
CeilingHeight = p.applyceilingmod;
|
||||
CeilingHeightModification = p.ceilingmod;
|
||||
//CeilingBase = p.ceilingbase;
|
||||
|
||||
// Textures
|
||||
FloorFlat = p.applyfloortexture;
|
||||
FloorFlatTexture = p.floortexture;
|
||||
CeilingFlat = p.applyceilingtexture;
|
||||
CeilingFlatTexture = p.ceilingtexture;
|
||||
|
||||
UpperTexture = p.applyuppertexture;
|
||||
UpperTextureTexture = p.uppertexture;
|
||||
UpperUnpegged = p.upperunpegged;
|
||||
|
||||
MiddleTexture = p.applymiddletexture;
|
||||
MiddleTextureTexture = p.middletexture;
|
||||
|
||||
LowerTexture = p.applylowertexture;
|
||||
LowerTextureTexture = p.lowertexture;
|
||||
LowerUnpegged = p.lowerunpegged;
|
||||
|
||||
loadingprefab = false;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void prefabdelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (prefabs.SelectedIndices.Count == 0) return;
|
||||
|
||||
BuilderPlug.Me.Prefabs.RemoveAt(prefabs.SelectedIndices[0]);
|
||||
prefabs.Items.RemoveAt(prefabs.SelectedIndices[0]);
|
||||
}
|
||||
|
||||
private void distinctbaseheights_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (distinctbaseheights.Checked == true)
|
||||
{
|
||||
floorbase.Enabled = false;
|
||||
ceilingbase.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(floorheightmodification.Checked) floorbase.Enabled = true;
|
||||
if(ceilingheightmodification.Checked) ceilingbase.Enabled = true;
|
||||
}
|
||||
|
||||
ComputeHeights();
|
||||
}
|
||||
|
||||
private void autocurveflipping_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (autocurveflipping.SelectedIndex != splineflipping.SelectedIndex)
|
||||
splineflipping.SelectedIndex = autocurveflipping.SelectedIndex;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void splineflipping_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (splineflipping.SelectedIndex != autocurveflipping.SelectedIndex)
|
||||
autocurveflipping.SelectedIndex = splineflipping.SelectedIndex;
|
||||
|
||||
DoRedrawDisplay();
|
||||
}
|
||||
|
||||
private void floorheightmodification_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (floorheightmodification.Checked)
|
||||
{
|
||||
floorheightmod.Enabled = true;
|
||||
|
||||
if (StairType != 0 || distinctbaseheights.Checked == false) floorbase.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
floorheightmod.Enabled = false;
|
||||
|
||||
if (StairType != 0 || distinctbaseheights.Checked == false) floorbase.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ceilingheightmodification_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ceilingheightmodification.Checked)
|
||||
{
|
||||
ceilingheightmod.Enabled = true;
|
||||
|
||||
if (StairType != 0 || distinctbaseheights.Checked == false) ceilingbase.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ceilingheightmod.Enabled = false;
|
||||
|
||||
if (StairType != 0 || distinctbaseheights.Checked == false) ceilingbase.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void floorbasegetter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
floorbase.Text = originalfloorbase.ToString();
|
||||
}
|
||||
|
||||
private void ceilingbasegetter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
ceilingbase.Text = originalceilingbase.ToString();
|
||||
}
|
||||
}
|
||||
}
|
1151
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.designer.cs
generated
Normal file
1151
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
120
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.resx
Normal file
120
Source/Plugins/StairSectorBuilder/StairSectorBuilderForm.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
1671
Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs
Normal file
1671
Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
|
@ -55,6 +55,7 @@
|
|||
<ProjectReference Include="..\..\Core\Builder.csproj">
|
||||
<Project>{818B3D10-F791-4C3F-9AF5-BB2D0079B63C}</Project>
|
||||
<Name>Builder</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
<ProjectReference Include="..\..\Core\Builder.csproj">
|
||||
<Project>{818B3D10-F791-4C3F-9AF5-BB2D0079B63C}</Project>
|
||||
<Name>Builder</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
|
|
Loading…
Reference in a new issue