Thing, Linedef, Sector Edit forms: in some cases flags were set to "enabled" state when they should have been set to "mixed" state when editing multiple map elements.

This commit is contained in:
MaxED 2014-08-05 08:22:49 +00:00
parent a29cfe5a53
commit 566ff2855e
6 changed files with 893 additions and 69 deletions

View file

@ -436,13 +436,11 @@ namespace CodeImp.DoomBuilder.Windows
// Flags
foreach(CheckBox c in flags.Checkboxes)
{
if(l.Flags.ContainsKey(c.Tag.ToString()))
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
if(l.IsFlagSet(c.Tag.ToString()) != c.Checked)
{
if(l.Flags[c.Tag.ToString()] != c.Checked)
{
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
@ -458,14 +456,13 @@ namespace CodeImp.DoomBuilder.Windows
// UDMF Activations
foreach(CheckBox c in udmfactivates.Checkboxes)
{
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo);
if(l.Flags.ContainsKey(ai.Key))
if(l.IsFlagSet(ai.Key) != c.Checked)
{
if(c.Checked != l.Flags[ai.Key])
{
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
@ -555,12 +552,9 @@ namespace CodeImp.DoomBuilder.Windows
//flags
foreach(CheckBox c in flagsFront.Checkboxes) {
if(c.CheckState == CheckState.Indeterminate) continue;
if(l.Front.Flags.ContainsKey(c.Tag.ToString())) {
if(l.Front.Flags[c.Tag.ToString()] != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
if(l.Front.IsFlagSet(c.Tag.ToString()) != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
}
@ -608,12 +602,9 @@ namespace CodeImp.DoomBuilder.Windows
//flags
foreach(CheckBox c in flagsBack.Checkboxes) {
if(c.CheckState == CheckState.Indeterminate) continue;
if(l.Back.Flags.ContainsKey(c.Tag.ToString())) {
if(l.Back.Flags[c.Tag.ToString()] != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
if(l.Back.IsFlagSet(c.Tag.ToString()) != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
}

View file

@ -83,6 +83,35 @@
this.ceilScale = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
this.ceilOffsets = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
this.ceilingtex = new CodeImp.DoomBuilder.Controls.FlatSelectorControl();
this.tabslopes = new System.Windows.Forms.TabPage();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.floorslopeangle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label23 = new System.Windows.Forms.Label();
this.floorsloperotation = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label24 = new System.Windows.Forms.Label();
this.resetfloorslope = new System.Windows.Forms.Button();
this.floorslopeoffset = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label18 = new System.Windows.Forms.Label();
this.floorslopez = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label17 = new System.Windows.Forms.Label();
this.floorslopey = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label16 = new System.Windows.Forms.Label();
this.floorslopex = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label15 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.ceilslopeanglelabel = new System.Windows.Forms.Label();
this.ceilsloperolllabel = new System.Windows.Forms.Label();
this.ceilslopeangle = new System.Windows.Forms.TrackBar();
this.ceilsloperoll = new System.Windows.Forms.TrackBar();
this.resetceilslope = new System.Windows.Forms.Button();
this.ceilslopeoffset = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.ceilslopex = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label19 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.ceilslopez = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label21 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.ceilslopey = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tabcustom = new System.Windows.Forms.TabPage();
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
this.cancel = new System.Windows.Forms.Button();
@ -106,6 +135,11 @@
this.tabSurfaces.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabslopes.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ceilslopeangle)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ceilsloperoll)).BeginInit();
this.tabcustom.SuspendLayout();
this.SuspendLayout();
//
@ -150,7 +184,7 @@
groupeffect.Size = new System.Drawing.Size(436, 175);
groupeffect.TabIndex = 1;
groupeffect.TabStop = false;
groupeffect.Text = " Effects:";
groupeffect.Text = " Effects: ";
//
// fadeColor
//
@ -306,7 +340,7 @@
groupfloorceiling.Size = new System.Drawing.Size(188, 148);
groupfloorceiling.TabIndex = 0;
groupfloorceiling.TabStop = false;
groupfloorceiling.Text = " Heights:";
groupfloorceiling.Text = " Heights: ";
//
// ceilingheight
//
@ -379,6 +413,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Controls.Add(this.tabproperties);
this.tabs.Controls.Add(this.tabSurfaces);
this.tabs.Controls.Add(this.tabslopes);
this.tabs.Controls.Add(this.tabcustom);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.Location = new System.Drawing.Point(10, 10);
@ -412,7 +447,7 @@
this.groupBox3.Size = new System.Drawing.Size(242, 148);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Flags:";
this.groupBox3.Text = " Flags: ";
//
// flags
//
@ -459,7 +494,7 @@
this.groupBox2.Size = new System.Drawing.Size(443, 203);
this.groupBox2.TabIndex = 55;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Floor:";
this.groupBox2.Text = " Floor: ";
//
// cbUseFloorLineAngles
//
@ -655,7 +690,7 @@
this.groupBox1.Size = new System.Drawing.Size(443, 203);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = " Ceiling:";
this.groupBox1.Text = " Ceiling: ";
//
// cbUseCeilLineAngles
//
@ -829,6 +864,352 @@
this.ceilingtex.TextureName = "";
this.ceilingtex.OnValueChanged += new System.EventHandler(this.ceilingtex_OnValueChanged);
//
// tabslopes
//
this.tabslopes.Controls.Add(this.groupBox5);
this.tabslopes.Controls.Add(this.groupBox4);
this.tabslopes.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabslopes.Location = new System.Drawing.Point(4, 23);
this.tabslopes.Name = "tabslopes";
this.tabslopes.Size = new System.Drawing.Size(449, 418);
this.tabslopes.TabIndex = 3;
this.tabslopes.Text = "Slopes";
this.tabslopes.UseVisualStyleBackColor = true;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.floorslopeangle);
this.groupBox5.Controls.Add(this.label23);
this.groupBox5.Controls.Add(this.floorsloperotation);
this.groupBox5.Controls.Add(this.label24);
this.groupBox5.Controls.Add(this.resetfloorslope);
this.groupBox5.Controls.Add(this.floorslopeoffset);
this.groupBox5.Controls.Add(this.label18);
this.groupBox5.Controls.Add(this.floorslopez);
this.groupBox5.Controls.Add(this.label17);
this.groupBox5.Controls.Add(this.floorslopey);
this.groupBox5.Controls.Add(this.label16);
this.groupBox5.Controls.Add(this.floorslopex);
this.groupBox5.Controls.Add(this.label15);
this.groupBox5.Location = new System.Drawing.Point(3, 212);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(443, 203);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = " Floor: ";
//
// floorslopeangle
//
this.floorslopeangle.AllowDecimal = true;
this.floorslopeangle.AllowNegative = true;
this.floorslopeangle.AllowRelative = true;
this.floorslopeangle.ButtonStep = 1;
this.floorslopeangle.ButtonStepFloat = 1F;
this.floorslopeangle.Location = new System.Drawing.Point(282, 52);
this.floorslopeangle.Name = "floorslopeangle";
this.floorslopeangle.Size = new System.Drawing.Size(82, 24);
this.floorslopeangle.StepValues = null;
this.floorslopeangle.TabIndex = 22;
this.floorslopeangle.WhenTextChanged += new System.EventHandler(this.floorslopeangle_WhenTextChanged);
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(223, 57);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(38, 14);
this.label23.TabIndex = 21;
this.label23.Text = "Angle:";
//
// floorsloperotation
//
this.floorsloperotation.AllowDecimal = true;
this.floorsloperotation.AllowNegative = true;
this.floorsloperotation.AllowRelative = true;
this.floorsloperotation.ButtonStep = 1;
this.floorsloperotation.ButtonStepFloat = 1F;
this.floorsloperotation.Location = new System.Drawing.Point(282, 22);
this.floorsloperotation.Name = "floorsloperotation";
this.floorsloperotation.Size = new System.Drawing.Size(82, 24);
this.floorsloperotation.StepValues = null;
this.floorsloperotation.TabIndex = 20;
this.floorsloperotation.WhenTextChanged += new System.EventHandler(this.floorsloperotation_WhenTextChanged);
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(223, 27);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(49, 14);
this.label24.TabIndex = 19;
this.label24.Text = "Rotation:";
//
// resetfloorslope
//
this.resetfloorslope.Location = new System.Drawing.Point(74, 142);
this.resetfloorslope.Name = "resetfloorslope";
this.resetfloorslope.Size = new System.Drawing.Size(82, 23);
this.resetfloorslope.TabIndex = 18;
this.resetfloorslope.Text = "Reset";
this.resetfloorslope.UseVisualStyleBackColor = true;
this.resetfloorslope.Click += new System.EventHandler(this.resetfloorslope_Click);
//
// floorslopeoffset
//
this.floorslopeoffset.AllowDecimal = true;
this.floorslopeoffset.AllowNegative = true;
this.floorslopeoffset.AllowRelative = true;
this.floorslopeoffset.ButtonStep = 1;
this.floorslopeoffset.ButtonStepFloat = 16F;
this.floorslopeoffset.Location = new System.Drawing.Point(74, 112);
this.floorslopeoffset.Name = "floorslopeoffset";
this.floorslopeoffset.Size = new System.Drawing.Size(82, 24);
this.floorslopeoffset.StepValues = null;
this.floorslopeoffset.TabIndex = 8;
this.floorslopeoffset.WhenTextChanged += new System.EventHandler(this.floorslopeoffset_WhenTextChanged);
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(27, 117);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(41, 14);
this.label18.TabIndex = 7;
this.label18.Text = "Offset:";
//
// floorslopez
//
this.floorslopez.AllowDecimal = true;
this.floorslopez.AllowNegative = true;
this.floorslopez.AllowRelative = true;
this.floorslopez.ButtonStep = 1;
this.floorslopez.ButtonStepFloat = 0.1F;
this.floorslopez.Location = new System.Drawing.Point(74, 82);
this.floorslopez.Name = "floorslopez";
this.floorslopez.Size = new System.Drawing.Size(82, 24);
this.floorslopez.StepValues = null;
this.floorslopez.TabIndex = 6;
this.floorslopez.WhenTextChanged += new System.EventHandler(this.floorslopez_WhenTextChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(15, 87);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(53, 14);
this.label17.TabIndex = 5;
this.label17.Text = "Normal Z:";
//
// floorslopey
//
this.floorslopey.AllowDecimal = true;
this.floorslopey.AllowNegative = true;
this.floorslopey.AllowRelative = true;
this.floorslopey.ButtonStep = 1;
this.floorslopey.ButtonStepFloat = 0.1F;
this.floorslopey.Location = new System.Drawing.Point(74, 52);
this.floorslopey.Name = "floorslopey";
this.floorslopey.Size = new System.Drawing.Size(82, 24);
this.floorslopey.StepValues = null;
this.floorslopey.TabIndex = 4;
this.floorslopey.WhenTextChanged += new System.EventHandler(this.floorslopey_WhenTextChanged);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(15, 57);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(53, 14);
this.label16.TabIndex = 3;
this.label16.Text = "Normal Y:";
//
// floorslopex
//
this.floorslopex.AllowDecimal = true;
this.floorslopex.AllowNegative = true;
this.floorslopex.AllowRelative = true;
this.floorslopex.ButtonStep = 1;
this.floorslopex.ButtonStepFloat = 0.1F;
this.floorslopex.Location = new System.Drawing.Point(74, 22);
this.floorslopex.Name = "floorslopex";
this.floorslopex.Size = new System.Drawing.Size(82, 24);
this.floorslopex.StepValues = null;
this.floorslopex.TabIndex = 2;
this.floorslopex.WhenTextChanged += new System.EventHandler(this.floorslopex_WhenTextChanged);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(15, 27);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(53, 14);
this.label15.TabIndex = 0;
this.label15.Text = "Normal X:";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.ceilslopeanglelabel);
this.groupBox4.Controls.Add(this.ceilsloperolllabel);
this.groupBox4.Controls.Add(this.ceilslopeangle);
this.groupBox4.Controls.Add(this.ceilsloperoll);
this.groupBox4.Controls.Add(this.resetceilslope);
this.groupBox4.Controls.Add(this.ceilslopeoffset);
this.groupBox4.Controls.Add(this.ceilslopex);
this.groupBox4.Controls.Add(this.label19);
this.groupBox4.Controls.Add(this.label22);
this.groupBox4.Controls.Add(this.ceilslopez);
this.groupBox4.Controls.Add(this.label21);
this.groupBox4.Controls.Add(this.label20);
this.groupBox4.Controls.Add(this.ceilslopey);
this.groupBox4.Location = new System.Drawing.Point(3, 3);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(443, 203);
this.groupBox4.TabIndex = 0;
this.groupBox4.TabStop = false;
this.groupBox4.Text = " Ceiling: ";
//
// ceilslopeanglelabel
//
this.ceilslopeanglelabel.AutoSize = true;
this.ceilslopeanglelabel.Location = new System.Drawing.Point(387, 73);
this.ceilslopeanglelabel.Name = "ceilslopeanglelabel";
this.ceilslopeanglelabel.Size = new System.Drawing.Size(50, 14);
this.ceilslopeanglelabel.TabIndex = 21;
this.ceilslopeanglelabel.Text = "0 \\u00B0";
//
// ceilsloperolllabel
//
this.ceilsloperolllabel.AutoSize = true;
this.ceilsloperolllabel.Location = new System.Drawing.Point(387, 23);
this.ceilsloperolllabel.Name = "ceilsloperolllabel";
this.ceilsloperolllabel.Size = new System.Drawing.Size(50, 14);
this.ceilsloperolllabel.TabIndex = 20;
this.ceilsloperolllabel.Text = "0 \\u00B0";
//
// ceilslopeangle
//
this.ceilslopeangle.Location = new System.Drawing.Point(226, 73);
this.ceilslopeangle.Maximum = 359;
this.ceilslopeangle.Name = "ceilslopeangle";
this.ceilslopeangle.Size = new System.Drawing.Size(155, 45);
this.ceilslopeangle.TabIndex = 19;
this.ceilslopeangle.TickFrequency = 15;
this.ceilslopeangle.Scroll += new System.EventHandler(this.ceilslopeangle_Scroll);
//
// ceilsloperoll
//
this.ceilsloperoll.Location = new System.Drawing.Point(226, 22);
this.ceilsloperoll.Maximum = 85;
this.ceilsloperoll.Minimum = -85;
this.ceilsloperoll.Name = "ceilsloperoll";
this.ceilsloperoll.Size = new System.Drawing.Size(155, 45);
this.ceilsloperoll.SmallChange = 5;
this.ceilsloperoll.TabIndex = 18;
this.ceilsloperoll.TickFrequency = 5;
this.ceilsloperoll.Scroll += new System.EventHandler(this.ceilsloperoll_Scroll);
//
// resetceilslope
//
this.resetceilslope.Location = new System.Drawing.Point(74, 142);
this.resetceilslope.Name = "resetceilslope";
this.resetceilslope.Size = new System.Drawing.Size(82, 23);
this.resetceilslope.TabIndex = 17;
this.resetceilslope.Text = "Reset";
this.resetceilslope.UseVisualStyleBackColor = true;
this.resetceilslope.Click += new System.EventHandler(this.resetceilslope_Click);
//
// ceilslopeoffset
//
this.ceilslopeoffset.AllowDecimal = true;
this.ceilslopeoffset.AllowNegative = true;
this.ceilslopeoffset.AllowRelative = true;
this.ceilslopeoffset.ButtonStep = 1;
this.ceilslopeoffset.ButtonStepFloat = 16F;
this.ceilslopeoffset.Location = new System.Drawing.Point(74, 112);
this.ceilslopeoffset.Name = "ceilslopeoffset";
this.ceilslopeoffset.Size = new System.Drawing.Size(82, 24);
this.ceilslopeoffset.StepValues = null;
this.ceilslopeoffset.TabIndex = 16;
this.ceilslopeoffset.WhenTextChanged += new System.EventHandler(this.ceilslopeoffset_WhenTextChanged);
//
// ceilslopex
//
this.ceilslopex.AllowDecimal = true;
this.ceilslopex.AllowNegative = true;
this.ceilslopex.AllowRelative = true;
this.ceilslopex.ButtonStep = 1;
this.ceilslopex.ButtonStepFloat = 0.1F;
this.ceilslopex.Location = new System.Drawing.Point(74, 22);
this.ceilslopex.Name = "ceilslopex";
this.ceilslopex.Size = new System.Drawing.Size(82, 24);
this.ceilslopex.StepValues = null;
this.ceilslopex.TabIndex = 10;
this.ceilslopex.WhenTextChanged += new System.EventHandler(this.ceilslopex_WhenTextChanged);
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(27, 117);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(41, 14);
this.label19.TabIndex = 15;
this.label19.Text = "Offset:";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(15, 27);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(53, 14);
this.label22.TabIndex = 9;
this.label22.Text = "Normal X:";
//
// ceilslopez
//
this.ceilslopez.AllowDecimal = true;
this.ceilslopez.AllowNegative = true;
this.ceilslopez.AllowRelative = true;
this.ceilslopez.ButtonStep = 1;
this.ceilslopez.ButtonStepFloat = 0.1F;
this.ceilslopez.Location = new System.Drawing.Point(74, 82);
this.ceilslopez.Name = "ceilslopez";
this.ceilslopez.Size = new System.Drawing.Size(82, 24);
this.ceilslopez.StepValues = null;
this.ceilslopez.TabIndex = 14;
this.ceilslopez.WhenTextChanged += new System.EventHandler(this.ceilslopez_WhenTextChanged);
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(15, 57);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(53, 14);
this.label21.TabIndex = 11;
this.label21.Text = "Normal Y:";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(15, 87);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(53, 14);
this.label20.TabIndex = 13;
this.label20.Text = "Normal Z:";
//
// ceilslopey
//
this.ceilslopey.AllowDecimal = true;
this.ceilslopey.AllowNegative = true;
this.ceilslopey.AllowRelative = true;
this.ceilslopey.ButtonStep = 1;
this.ceilslopey.ButtonStepFloat = 0.1F;
this.ceilslopey.Location = new System.Drawing.Point(74, 52);
this.ceilslopey.Name = "ceilslopey";
this.ceilslopey.Size = new System.Drawing.Size(82, 24);
this.ceilslopey.StepValues = null;
this.ceilslopey.TabIndex = 12;
this.ceilslopey.WhenTextChanged += new System.EventHandler(this.ceilslopey_WhenTextChanged);
//
// tabcustom
//
this.tabcustom.Controls.Add(this.fieldslist);
@ -920,6 +1301,13 @@
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabslopes.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ceilslopeangle)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ceilsloperoll)).EndInit();
this.tabcustom.ResumeLayout(false);
this.ResumeLayout(false);
@ -979,5 +1367,34 @@
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flags;
private System.Windows.Forms.CheckBox cbUseFloorLineAngles;
private System.Windows.Forms.CheckBox cbUseCeilLineAngles;
private System.Windows.Forms.TabPage tabslopes;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label15;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorslopeoffset;
private System.Windows.Forms.Label label18;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorslopez;
private System.Windows.Forms.Label label17;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorslopey;
private System.Windows.Forms.Label label16;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorslopex;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilslopeoffset;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilslopex;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label22;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilslopez;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label20;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox ceilslopey;
private System.Windows.Forms.Button resetceilslope;
private System.Windows.Forms.Button resetfloorslope;
private System.Windows.Forms.TrackBar ceilslopeangle;
private System.Windows.Forms.TrackBar ceilsloperoll;
private System.Windows.Forms.Label ceilslopeanglelabel;
private System.Windows.Forms.Label ceilsloperolllabel;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorslopeangle;
private System.Windows.Forms.Label label23;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox floorsloperotation;
private System.Windows.Forms.Label label24;
}
}

View file

@ -5,6 +5,7 @@ using System.Windows.Forms;
using CodeImp.DoomBuilder.GZBuilder.Tools;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Types;
using CodeImp.DoomBuilder.Geometry;
namespace CodeImp.DoomBuilder.Windows
{
@ -33,6 +34,20 @@ namespace CodeImp.DoomBuilder.Windows
private static Point location = Point.Empty;
private static int activeTab;
//mxd. Slope stuff
private static readonly string[] floorslopekeys = { "floorplane_a", "floorplane_b", "floorplane_c", "floorplane_d" };
private static readonly string[] ceilslopekeys = { "ceilingplane_a", "ceilingplane_b", "ceilingplane_c", "ceilingplane_d" };
//mxd. Slope pivots
//private Vector3D ceilslopenormal;
//private Vector3D floorslopenormal;
private Vector3D globalceilslopepivot;
private Vector3D globalfloorslopepivot;
private List<Vector3D> ceilslopepivots;
private List<Vector3D> floorslopepivots;
//private static SlopePivotMode ceilpivotmode = SlopePivotMode.LOCAL; //dbg?
//private static SlopePivotMode floorpivotmode = SlopePivotMode.LOCAL;
private struct SectorProperties //mxd
{
public readonly int Brightness;
@ -66,6 +81,18 @@ namespace CodeImp.DoomBuilder.Windows
public readonly int FloorBrightness;
public readonly bool FloorLightAbsoulte;
//UDMF floor slope
public readonly float FloorSlopeX;
public readonly float FloorSlopeY;
public readonly float FloorSlopeZ;
public readonly float FloorSlopeOffset;
//UDMF ceiling slope
public readonly float CeilSlopeX;
public readonly float CeilSlopeY;
public readonly float CeilSlopeZ;
public readonly float CeilSlopeOffset;
public SectorProperties(Sector s) {
Brightness = s.Brightness;
FloorHeight = s.FloorHeight;
@ -96,6 +123,18 @@ namespace CodeImp.DoomBuilder.Windows
FloorRotation = s.Fields.GetValue("rotationfloor", 0.0f);
FloorBrightness = s.Fields.GetValue("lightfloor", 0);
FloorLightAbsoulte = s.Fields.GetValue("lightfloorabsolute", false);
//UDMF Ceiling slope
CeilSlopeX = UDMFTools.GetFloat(s.Fields, "ceilingplane_a", 0f);
CeilSlopeY = UDMFTools.GetFloat(s.Fields, "ceilingplane_b", 0f);
CeilSlopeZ = UDMFTools.GetFloat(s.Fields, "ceilingplane_c", 0f);
CeilSlopeOffset = UDMFTools.GetFloat(s.Fields, "ceilingplane_d", 0f);
//UDMF Floor slope
FloorSlopeX = UDMFTools.GetFloat(s.Fields, "floorplane_a", 0f);
FloorSlopeY = UDMFTools.GetFloat(s.Fields, "floorplane_b", 0f);
FloorSlopeZ = UDMFTools.GetFloat(s.Fields, "floorplane_c", 0f);
FloorSlopeOffset = UDMFTools.GetFloat(s.Fields, "floorplane_d", 0f);
}
}
@ -106,6 +145,10 @@ namespace CodeImp.DoomBuilder.Windows
public SectorEditFormUDMF() {
InitializeComponent();
#if !DEBUG //TODO: implement this!
tabs.TabPages.Remove(tabslopes);
#endif
//mxd. Widow setup
if(location != Point.Empty) {
this.StartPosition = FormStartPosition.Manual;
@ -145,6 +188,14 @@ namespace CodeImp.DoomBuilder.Windows
cbUseCeilLineAngles.Checked = useCeilLineAngles;
cbUseFloorLineAngles.Checked = useFloorLineAngles;
// Slopes stuff
//ceilslopenormal = new Vector3D(0f, 0f, -1f);
//floorslopenormal = new Vector3D(0f, 0f, 1f);
globalceilslopepivot = new Vector3D();
globalfloorslopepivot = new Vector3D();
//TODO: set stored pivot mode
}
#endregion
@ -236,6 +287,17 @@ namespace CodeImp.DoomBuilder.Windows
fadeColor.SetValueFrom(sc.Fields);
lightColor.SetValueFrom(sc.Fields);
//Slopes
ceilslopex.Text = sc.Fields.GetValue("ceilingplane_a", 0f).ToString();
ceilslopey.Text = sc.Fields.GetValue("ceilingplane_b", 0f).ToString();
ceilslopez.Text = sc.Fields.GetValue("ceilingplane_c", 0f).ToString();
ceilslopeoffset.Text = sc.Fields.GetValue("ceilingplane_d", 0f).ToString();
floorslopex.Text = sc.Fields.GetValue("floorplane_a", 0f).ToString();
floorslopey.Text = sc.Fields.GetValue("floorplane_b", 0f).ToString();
floorslopez.Text = sc.Fields.GetValue("floorplane_c", 0f).ToString();
floorslopeoffset.Text = sc.Fields.GetValue("floorplane_d", 0f).ToString();
// Action
tagSelector.Setup(UniversalType.SectorTag); //mxd
tagSelector.SetTag(sc.Tag);//mxd
@ -245,6 +307,9 @@ namespace CodeImp.DoomBuilder.Windows
angleSteps = new StepsList();
floorslopepivots = new List<Vector3D>(sectors.Count);
ceilslopepivots = new List<Vector3D>(sectors.Count);
////////////////////////////////////////////////////////////////////////
// Now go for all sectors and change the options when a setting is different
////////////////////////////////////////////////////////////////////////
@ -253,11 +318,10 @@ namespace CodeImp.DoomBuilder.Windows
foreach(Sector s in sectors) {
// Flags
foreach(CheckBox c in flags.Checkboxes) {
if(s.Flags.ContainsKey(c.Tag.ToString())) {
if(s.Flags[c.Tag.ToString()] != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
if(s.IsFlagSet(c.Tag.ToString()) != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}
@ -330,6 +394,17 @@ namespace CodeImp.DoomBuilder.Windows
fadeColor.SetValueFrom(s.Fields);
lightColor.SetValueFrom(s.Fields);
//Slopes
if(s.Fields.GetValue("ceilingplane_a", 0f).ToString() != ceilslopex.Text) ceilslopex.Text = "";
if(s.Fields.GetValue("ceilingplane_b", 0f).ToString() != ceilslopey.Text) ceilslopey.Text = "";
if(s.Fields.GetValue("ceilingplane_c", 0f).ToString() != ceilslopez.Text) ceilslopez.Text = "";
if(s.Fields.GetValue("ceilingplane_d", 0f).ToString() != ceilslopeoffset.Text) ceilslopeoffset.Text = "";
if(s.Fields.GetValue("floorplane_a", 0f).ToString() != floorslopex.Text) floorslopex.Text = "";
if(s.Fields.GetValue("floorplane_b", 0f).ToString() != floorslopey.Text) floorslopey.Text = "";
if(s.Fields.GetValue("floorplane_c", 0f).ToString() != floorslopez.Text) floorslopez.Text = "";
if(s.Fields.GetValue("floorplane_d", 0f).ToString() != floorslopeoffset.Text) floorslopeoffset.Text = "";
// Action
if(s.Tag != sc.Tag) tagSelector.ClearTag(); //mxd
@ -350,6 +425,43 @@ namespace CodeImp.DoomBuilder.Windows
if(!angleSteps.Contains(angle)) angleSteps.Add(angle);
}
//Slope pivots
Vector3D ceilpivot = new Vector3D(s.BBox.X + s.BBox.Width / 2, s.BBox.Y + s.BBox.Height / 2, s.CeilHeight);
Vector3D floorpivot = new Vector3D(s.BBox.X + s.BBox.Width / 2, s.BBox.Y + s.BBox.Height / 2, s.FloorHeight);
globalfloorslopepivot += floorpivot;
globalceilslopepivot += ceilpivot;
floorslopepivots.Add(floorpivot);
ceilslopepivots.Add(ceilpivot);
}
globalfloorslopepivot /= sectors.Count;
globalceilslopepivot /= sectors.Count;
//mxd. Set ceiling slope controls
if (!string.IsNullOrEmpty(ceilslopex.Text) && !string.IsNullOrEmpty(ceilslopey.Text) && !string.IsNullOrEmpty(ceilslopez.Text)) {
Vector3D v = new Vector3D(ceilslopex.GetResultFloat(0f), ceilslopey.GetResultFloat(0f), ceilslopez.GetResultFloat(0f));
if (v.x != 0 || v.y != 0 || v.z != 0) {
ceilslopeangle.Value = (int) Math.Round(Angle2D.RadToDeg(v.GetAngleXY()));
ceilsloperoll.Value = (int) Math.Round(Angle2D.RadToDeg(v.GetAngleZ()));
ceilslopeanglelabel.Text = ceilslopeangle.Value + "\u00B0";
ceilsloperolllabel.Text = ceilsloperoll.Value + "\u00B0";
}
}
//mxd. Set floor slope controls
if(!string.IsNullOrEmpty(floorslopex.Text) && !string.IsNullOrEmpty(floorslopey.Text) && !string.IsNullOrEmpty(floorslopez.Text)) {
Vector3D v = new Vector3D(floorslopex.GetResultFloat(0f), floorslopey.GetResultFloat(0f), floorslopez.GetResultFloat(0f));
if(v.x != 0 || v.y != 0 || v.z != 0) {
/*ceilslopeangle.Value = General.ClampAngle((int)Math.Round(Angle2D.RadToDeg(v.GetAngleXY())));
ceilsloperoll.Value = (int)Math.Round(Angle2D.RadToDeg(v.GetAngleZ()));
ceilslopeanglelabel.Text = ceilslopeangle.Value + "\u00B0";
ceilsloperolllabel.Text = ceilsloperoll.Value + "\u00B0";*/
floorsloperotation.Text = ((int)Math.Round(Angle2D.RadToDeg(v.GetAngleXY()))).ToString();
floorslopeangle.Text = ((int)Math.Round(Angle2D.RadToDeg(v.GetAngleZ()))).ToString();
}
}
// Show sector height
@ -470,6 +582,19 @@ namespace CodeImp.DoomBuilder.Windows
float val = General.Clamp(desaturation.GetResultFloat(s.Fields.GetValue("desaturation", 0f)), 0f, 1f);
UDMFTools.SetFloat(s.Fields, "desaturation", val, 0f);
}
//clear slope props if all values are 0
if(UDMFTools.GetFloat(s.Fields, ceilslopekeys[0]) == 0 && UDMFTools.GetFloat(s.Fields, ceilslopekeys[1]) == 0
&& UDMFTools.GetFloat(s.Fields, ceilslopekeys[2]) == 0) {
UDMFTools.ClearFields(s.Fields, ceilslopekeys);
s.UpdateNeeded = true;
}
if(UDMFTools.GetFloat(s.Fields, floorslopekeys[0]) == 0 && UDMFTools.GetFloat(s.Fields, floorslopekeys[1]) == 0
&& UDMFTools.GetFloat(s.Fields, floorslopekeys[2]) == 0) {
UDMFTools.ClearFields(s.Fields, floorslopekeys);
s.UpdateNeeded = true;
}
}
// Update the used textures
@ -909,5 +1034,322 @@ namespace CodeImp.DoomBuilder.Windows
#endregion
#region mxd. Floor slope realtime events
private void resetfloorslope_Click(object sender, EventArgs e) {
foreach(Sector s in sectors) {
UDMFTools.ClearFields(s.Fields, floorslopekeys);
s.UpdateNeeded = true;
}
blockUpdate = true;
floorslopex.Text = "0";
floorslopey.Text = "0";
floorslopez.Text = "0";
floorslopeoffset.Text = "0";
blockUpdate = false;
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void floorslopex_WhenTextChanged(object sender, EventArgs e) {
/*if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(floorslopex.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_a", sectorProps[i++].FloorSlopeX, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_a", floorslopex.GetResultFloat(sectorProps[i++].FloorSlopeX), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);*/
}
private void floorslopey_WhenTextChanged(object sender, EventArgs e) {
/*if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(floorslopey.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_b", sectorProps[i++].FloorSlopeY, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_b", floorslopey.GetResultFloat(sectorProps[i++].FloorSlopeY), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);*/
}
private void floorslopez_WhenTextChanged(object sender, EventArgs e) {
/*if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(floorslopez.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_c", sectorProps[i++].FloorSlopeZ, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_c", floorslopez.GetResultFloat(sectorProps[i++].FloorSlopeZ), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);*/
}
private void floorslopeoffset_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(floorslopeoffset.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_d", sectorProps[i++].FloorSlopeOffset, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "floorplane_d", floorslopeoffset.GetResultFloat(sectorProps[i++].FloorSlopeOffset), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void floorsloperotation_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
float anglexy = floorsloperotation.GetResultFloat(float.NaN);
float anglez = floorslopeangle.GetResultFloat(float.NaN);
if(float.IsNaN(anglexy) || float.IsNaN(anglez)) return;
applySlopeTransform(Angle2D.DegToRad(anglexy), Angle2D.DegToRad(anglez), floorslopekeys);
}
private void floorslopeangle_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
float anglexy = floorsloperotation.GetResultFloat(float.NaN);
float anglez = floorslopeangle.GetResultFloat(float.NaN);
if(float.IsNaN(anglexy) || float.IsNaN(anglez)) return;
applySlopeTransform(Angle2D.DegToRad(anglexy), Angle2D.DegToRad(anglez), floorslopekeys);
}
private void applySlopeTransform(float anglexy, float anglez, string[] keys) {
Vector3D v = Vector3D.FromAngleXYZ(anglexy + Angle2D.PI, anglez);
//restore or set values
if(v.x == 0 && v.y == 0 && v.z == 0) {
foreach(Sector s in sectors) {
UDMFTools.ClearFields(s.Fields, keys);
s.UpdateNeeded = true;
}
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, keys[0], v.x, float.MinValue);
UDMFTools.SetFloat(s.Fields, keys[1], v.y, float.MinValue);
UDMFTools.SetFloat(s.Fields, keys[2], v.z, float.MinValue);
//TODO: set offset based on current SlopePivotMode
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
#endregion
#region mxd. Ceiling slope realtime events
private void resetceilslope_Click(object sender, EventArgs e) {
foreach(Sector s in sectors) {
UDMFTools.ClearFields(s.Fields, ceilslopekeys);
s.UpdateNeeded = true;
}
blockUpdate = true;
ceilslopex.Text = "0";
ceilslopey.Text = "0";
ceilslopez.Text = "0";
ceilslopeoffset.Text = "0";
ceilslopeangle.Value = 0;
ceilslopeanglelabel.Text = "0";
ceilsloperoll.Value = 0;
ceilsloperolllabel.Text = "0";
blockUpdate = false;
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void ceilslopex_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(ceilslopex.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_a", sectorProps[i++].CeilSlopeX, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_a", ceilslopex.GetResultFloat(sectorProps[i++].CeilSlopeX), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void ceilslopey_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(ceilslopey.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_b", sectorProps[i++].CeilSlopeY, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_b", ceilslopey.GetResultFloat(sectorProps[i++].CeilSlopeY), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void ceilslopez_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(ceilslopez.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_c", sectorProps[i++].CeilSlopeZ, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_c", ceilslopez.GetResultFloat(sectorProps[i++].CeilSlopeZ), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void ceilslopeoffset_WhenTextChanged(object sender, EventArgs e) {
if(blockUpdate) return;
int i = 0;
//restore values
if(string.IsNullOrEmpty(ceilslopeoffset.Text)) {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_d", sectorProps[i++].CeilSlopeOffset, float.MinValue);
s.UpdateNeeded = true;
}
//update values
} else {
foreach(Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, "ceilingplane_d", ceilslopeoffset.GetResultFloat(sectorProps[i++].CeilSlopeOffset), float.MinValue);
s.UpdateNeeded = true;
}
}
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
#endregion
private void ceilslopeangle_Scroll(object sender, EventArgs e) {
if(blockUpdate) return;
//ceilslopeanglelabel.Text = ceilslopeangle.Value + "\u00B0";
//applySlopeValues(Angle2D.DegToRad(ceilslopeangle.Value), Angle2D.DegToRad(ceilsloperoll.Value), ceilslopekeys);
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
private void ceilsloperoll_Scroll(object sender, EventArgs e) {
if(blockUpdate) return;
//ceilsloperolllabel.Text = ceilsloperoll.Value + "\u00B0";
//applySlopeValues(Angle2D.DegToRad(ceilslopeangle.Value), Angle2D.DegToRad(ceilsloperoll.Value), ceilslopekeys);
General.Map.IsChanged = true;
if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty);
}
//TODO: remove this
/*private void applySlopeValues(float anglexy, float anglez, string[] keys) {
Vector3D v = Vector3D.FromAngleXYZ(anglexy, anglez); //normalize?
//restore or set values
if (v.x == 0 && v.y == 0 && v.z == 0) {
foreach(Sector s in sectors) {
UDMFTools.ClearFields(s.Fields, keys);
s.UpdateNeeded = true;
}
//update offset text
blockUpdate = true;
ceilslopeoffset.Text = "0";
blockUpdate = false;
} else {
foreach (Sector s in sectors) {
UDMFTools.SetFloat(s.Fields, keys[0], v.x, float.MinValue);
UDMFTools.SetFloat(s.Fields, keys[1], v.y, float.MinValue);
UDMFTools.SetFloat(s.Fields, keys[2], v.z, float.MinValue);
//TODO: set offset based on current SlopePivotMode
s.UpdateNeeded = true;
}
}
//update xyz text
blockUpdate = true;
ceilslopex.Text = v.x.ToString();
ceilslopey.Text = v.y.ToString();
ceilslopez.Text = v.z.ToString();
blockUpdate = false;
}*/
}
}

View file

@ -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>

View file

@ -207,13 +207,11 @@ namespace CodeImp.DoomBuilder.Windows
// Flags
foreach(CheckBox c in flags.Checkboxes)
{
if(t.Flags.ContainsKey(c.Tag.ToString()))
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
if(t.IsFlagSet(c.Tag.ToString()) != c.Checked)
{
if(t.Flags[c.Tag.ToString()] != c.Checked)
{
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}

View file

@ -252,11 +252,11 @@ namespace CodeImp.DoomBuilder.Windows
// Flags
foreach(CheckBox c in flags.Checkboxes) {
if(t.Flags.ContainsKey(c.Tag.ToString())) {
if(t.Flags[c.Tag.ToString()] != c.Checked) {
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
if(t.IsFlagSet(c.Tag.ToString()) != c.Checked)
{
c.ThreeState = true;
c.CheckState = CheckState.Indeterminate;
}
}