Added "Apply to all errors of this type" checkbox to Map Analysis window.

Updated ZDoom ACC to r3889.
This commit is contained in:
MaxED 2012-11-30 14:43:11 +00:00
parent 94dce70ada
commit ad46513126
6 changed files with 229 additions and 192 deletions

Binary file not shown.

View file

@ -214,6 +214,9 @@
// HUD message.
#define HUDMSG_ADDBLEND 0x20000000
// OR this with one of the above to use the extra alpha parameter
#define HUDMSG_ALPHA 0x10000000
// HUD message layers; these are not flags
#define HUDMSG_LAYER_OVERHUD 0x00000000
#define HUDMSG_LAYER_UNDERHUD 0x00001000

View file

@ -289,6 +289,9 @@ special
-45:ACS_NamedExecuteAlways(2,5),
-46:UniqueTID(0,2),
-47:IsTIDUsed(1),
-48:Sqrt(1),
-49:FixedSqrt(1),
-50:VectorLength(2),
-1000:__EndOfList__(10);

View file

@ -38,6 +38,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.fix1 = new System.Windows.Forms.Button();
this.progress = new System.Windows.Forms.ProgressBar();
this.closebutton = new System.Windows.Forms.Button();
this.cbApplyToAll = new System.Windows.Forms.CheckBox();
this.resultspanel.SuspendLayout();
this.SuspendLayout();
//
@ -77,12 +78,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.results.Location = new System.Drawing.Point(10, 34);
this.results.Margin = new System.Windows.Forms.Padding(1);
this.results.Name = "results";
this.results.Size = new System.Drawing.Size(360, 175);
this.results.Size = new System.Drawing.Size(360, 168);
this.results.TabIndex = 0;
this.results.SelectedIndexChanged += new System.EventHandler(this.results_SelectedIndexChanged);
//
// resultspanel
//
this.resultspanel.Controls.Add(this.cbApplyToAll);
this.resultspanel.Controls.Add(this.fix3);
this.resultspanel.Controls.Add(this.fix2);
this.resultspanel.Controls.Add(this.resultinfo);
@ -91,13 +93,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.resultspanel.Controls.Add(this.results);
this.resultspanel.Location = new System.Drawing.Point(0, 124);
this.resultspanel.Name = "resultspanel";
this.resultspanel.Size = new System.Drawing.Size(383, 329);
this.resultspanel.Size = new System.Drawing.Size(383, 343);
this.resultspanel.TabIndex = 2;
//
// fix3
//
this.fix3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.fix3.Location = new System.Drawing.Point(256, 292);
this.fix3.Location = new System.Drawing.Point(256, 285);
this.fix3.Name = "fix3";
this.fix3.Size = new System.Drawing.Size(114, 26);
this.fix3.TabIndex = 3;
@ -109,7 +111,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// fix2
//
this.fix2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.fix2.Location = new System.Drawing.Point(133, 292);
this.fix2.Location = new System.Drawing.Point(133, 285);
this.fix2.Name = "fix2";
this.fix2.Size = new System.Drawing.Size(114, 26);
this.fix2.TabIndex = 2;
@ -123,7 +125,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.resultinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.resultinfo.Enabled = false;
this.resultinfo.Location = new System.Drawing.Point(12, 215);
this.resultinfo.Location = new System.Drawing.Point(12, 208);
this.resultinfo.Name = "resultinfo";
this.resultinfo.Size = new System.Drawing.Size(358, 74);
this.resultinfo.TabIndex = 5;
@ -132,7 +134,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// fix1
//
this.fix1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.fix1.Location = new System.Drawing.Point(10, 292);
this.fix1.Location = new System.Drawing.Point(10, 285);
this.fix1.Name = "fix1";
this.fix1.Size = new System.Drawing.Size(114, 26);
this.fix1.TabIndex = 1;
@ -163,13 +165,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.closebutton.UseVisualStyleBackColor = true;
this.closebutton.Click += new System.EventHandler(this.closebutton_Click);
//
// cbApplyToAll
//
this.cbApplyToAll.AutoSize = true;
this.cbApplyToAll.Location = new System.Drawing.Point(12, 317);
this.cbApplyToAll.Name = "cbApplyToAll";
this.cbApplyToAll.Size = new System.Drawing.Size(169, 18);
this.cbApplyToAll.TabIndex = 6;
this.cbApplyToAll.Text = "Apply to all errors of this type";
this.cbApplyToAll.UseVisualStyleBackColor = true;
//
// ErrorCheckForm
//
this.AcceptButton = this.buttoncheck;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.closebutton;
this.ClientSize = new System.Drawing.Size(380, 453);
this.ClientSize = new System.Drawing.Size(380, 468);
this.Controls.Add(this.closebutton);
this.Controls.Add(this.resultspanel);
this.Controls.Add(this.buttoncheck);
@ -187,6 +199,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ErrorCheckForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ErrorCheckForm_HelpRequested);
this.resultspanel.ResumeLayout(false);
this.resultspanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -204,5 +217,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.Label resultinfo;
private System.Windows.Forms.Button fix1;
private System.Windows.Forms.Button closebutton;
private System.Windows.Forms.CheckBox cbApplyToAll;
}
}

View file

@ -56,6 +56,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private volatile bool running = false;
private Thread checksthread;
private BlockMap<BlockEntry> blockmap;
private static bool applyToAll; //mxd
#endregion
@ -98,12 +99,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
buttoncheck.Top = checks.Bottom + 14;
resultspanel.Top = buttoncheck.Bottom + 14;
// First time showing?
//if((this.Location.X == 0) && (this.Location.Y == 0))
{
//mxd
cbApplyToAll.Checked = applyToAll;
// Position at left-top of owner
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
}
// Close results part
resultspanel.Visible = false;
@ -236,6 +236,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
ClearSelectedResult();
//mxd
applyToAll = cbApplyToAll.Checked;
this.Hide();
}
@ -248,6 +252,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
fix1.Visible = false;
fix2.Visible = false;
fix3.Visible = false;
cbApplyToAll.Visible = false;//mxd
}
// This runs in a seperate thread to manage the checking threads
@ -405,6 +410,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
fix1.Visible = (r.Buttons >= 1);
fix2.Visible = (r.Buttons >= 2);
fix3.Visible = (r.Buttons >= 3);
cbApplyToAll.Visible = true;//mxd
r.ZoomToObject();
}
else
@ -428,7 +434,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
{
ErrorResult r = (results.SelectedItem as ErrorResult);
if(r.Button1Click()) StartChecking(); else General.Interface.RedrawDisplay();
if (r.Button1Click()) {
if (cbApplyToAll.Checked) fixSimilarErrors(r.GetType(), 1); //mxd
StartChecking();
} else {
General.Interface.RedrawDisplay();
}
}
}
}
@ -446,7 +457,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
{
ErrorResult r = (results.SelectedItem as ErrorResult);
if(r.Button2Click()) StartChecking(); else General.Interface.RedrawDisplay();
if (r.Button2Click()) {
if (cbApplyToAll.Checked) fixSimilarErrors(r.GetType(), 2); //mxd
StartChecking();
} else {
General.Interface.RedrawDisplay();
}
}
}
}
@ -464,10 +480,32 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
{
ErrorResult r = (results.SelectedItem as ErrorResult);
if(r.Button3Click()) StartChecking(); else General.Interface.RedrawDisplay();
if (r.Button3Click()) {
if (cbApplyToAll.Checked) fixSimilarErrors(r.GetType(), 3); //mxd
StartChecking();
} else {
General.Interface.RedrawDisplay();
}
}
}
}
//mxd
private void fixSimilarErrors(Type type, int fixIndex) {
foreach (Object item in results.Items) {
if (item == results.SelectedItem) continue;
if (item.GetType() != type) continue;
ErrorResult r = item as ErrorResult;
if (fixIndex == 1)
r.Button1Click();
else if (fixIndex == 2)
r.Button2Click();
else if (fixIndex == 3)
r.Button3Click();
}
}
private void ErrorCheckForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{

View file

@ -123,31 +123,10 @@
<metadata name="buttoncheck.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="results.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="resultspanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fix3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fix2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="resultinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fix1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="progress.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="closebutton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>