mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
Map Analysis mode: results can now be hidden individually.
Updated documentation.
This commit is contained in:
parent
9b3b04d895
commit
99f6a9a5a8
28 changed files with 487 additions and 144 deletions
|
@ -289,15 +289,16 @@
|
||||||
<li>
|
<li>
|
||||||
<h3><a name="mapanalysis" id="mapanalysis"></a>Map Analysis mode:</h3>
|
<h3><a name="mapanalysis" id="mapanalysis"></a>Map Analysis mode:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><span class="style1"><strong>[new]</strong></span> Analysis results can be hidden per result type and individually via results list's context menu.</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for unconnected vertices.</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for unconnected vertices.</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> "Check overlapping lines" finds duplicate linedefs (e.g. when 2 lines have the same start and end positions).</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for overlapping lines. This will check if 2 lines have the same start and end positions.</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for overlapping vertices. This will check if a vertex is on top of a linedef or another vertex.</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for overlapping vertices. This will check if a vertex is on top of a linedef or another vertex.</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for invalid sectors (sectors with less than 3 sidedefs or sectors without area).</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for invalid sectors (sectors with less than 3 sidedefs or sectors without area).</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for unused textures.</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for unused textures.</li>
|
||||||
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for missing flats.</li>
|
<li><span class="style1"><strong>[new]</strong></span> Map Analysis mode can check the map for missing flats.</li>
|
||||||
<li>Map Analysis mode can check the map for unknown things (things, which type is not defined in DECORATE or current game configuration).</li>
|
<li>Map Analysis mode can check the map for unknown things (things, which type is not defined in DECORATE or current game configuration).</li>
|
||||||
<li>Map Analysis window now have "<strong>Apply to all errors of this type</strong>" checkbox.</li>
|
<li>Map Analysis window now has "<strong>Apply to all errors of this type</strong>" checkbox.</li>
|
||||||
<li>Analysis results can be saved to a text file.</li>
|
<li>Analysis results can be saved to a text file or copied to clipboard.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -44,6 +44,9 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
// Disposing
|
// Disposing
|
||||||
protected bool isdisposed;
|
protected bool isdisposed;
|
||||||
|
|
||||||
|
// Error Ignoring (mxd)
|
||||||
|
private List<Type> ignorederrorchecks;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Properties
|
#region ================== Properties
|
||||||
|
@ -52,6 +55,7 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
public UniFields Fields { get { return fields; } }
|
public UniFields Fields { get { return fields; } }
|
||||||
public bool Marked { get { return marked; } set { marked = value; } }
|
public bool Marked { get { return marked; } set { marked = value; } }
|
||||||
public bool IsDisposed { get { return isdisposed; } }
|
public bool IsDisposed { get { return isdisposed; } }
|
||||||
|
public List<Type> IgnoredErrorChecks { get { return ignorederrorchecks; } } //mxd
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -62,6 +66,7 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
fields = new UniFields(this);
|
fields = new UniFields(this);
|
||||||
|
ignorederrorchecks = new List<Type>(); //mxd
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disposer
|
// Disposer
|
||||||
|
|
|
@ -27,12 +27,13 @@ using System.Drawing;
|
||||||
|
|
||||||
namespace CodeImp.DoomBuilder.BuilderModes
|
namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
public class ErrorResult
|
public abstract class ErrorResult
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
protected string description;
|
protected string description;
|
||||||
protected List<MapElement> viewobjects;
|
protected readonly List<MapElement> viewobjects;
|
||||||
|
protected bool hidden;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -45,13 +46,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public virtual string Button1Text { get { return ""; } }
|
public virtual string Button1Text { get { return ""; } }
|
||||||
public virtual string Button2Text { get { return ""; } }
|
public virtual string Button2Text { get { return ""; } }
|
||||||
public virtual string Button3Text { get { return ""; } }
|
public virtual string Button3Text { get { return ""; } }
|
||||||
|
public bool IsHidden { get { return hidden; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Constructor / Destructor
|
#region ================== Constructor / Destructor
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
public ErrorResult()
|
protected ErrorResult()
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
viewobjects = new List<MapElement>(1);
|
viewobjects = new List<MapElement>(1);
|
||||||
|
@ -177,7 +179,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
ClassicMode editmode = (General.Editing.Mode as ClassicMode);
|
ClassicMode editmode = (General.Editing.Mode as ClassicMode);
|
||||||
editmode.CenterOnArea(area, 0.6f);
|
editmode.CenterOnArea(area, 0.6f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal abstract void Hide(bool hide); //mxd. Marks map elements of this result as hidden in ErrorCheckForm
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
@ -29,9 +30,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line;
|
private readonly Linedef line;
|
||||||
private int buttons;
|
private readonly int buttons;
|
||||||
private Sidedef copysidedef;
|
private readonly Sidedef copysidedef;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -49,11 +50,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultLineMissingFront(Linedef l)
|
public ResultLineMissingFront(Linedef l)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line = l;
|
line = l;
|
||||||
this.viewobjects.Add(l);
|
viewobjects.Add(l);
|
||||||
this.description = "This linedef has a back sidedef, but is missing a front sidedef. " +
|
hidden = l.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
"A line must have at least a front side and optionally a back side! " +
|
description = "This linedef has a back sidedef, but is missing a front sidedef. " +
|
||||||
"Click 'Flip Linedef' button if the line is supposed to be single-sided.";
|
"A line must have at least a front side and optionally a back side! " +
|
||||||
|
"Click 'Flip Linedef' button if the line is supposed to be single-sided.";
|
||||||
|
|
||||||
// One solution is to flip the sidedefs
|
// One solution is to flip the sidedefs
|
||||||
buttons = 1;
|
buttons = 1;
|
||||||
|
@ -73,7 +75,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
fixable = true;
|
fixable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(!sd.Front && (sd.Line.Back != null))
|
|
||||||
|
if(!sd.Front && (sd.Line.Back != null))
|
||||||
{
|
{
|
||||||
copysidedef = sd.Line.Back;
|
copysidedef = sd.Line.Back;
|
||||||
fixable = true;
|
fixable = true;
|
||||||
|
@ -93,6 +96,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if (hide) line.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
@ -29,10 +30,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line;
|
private readonly Linedef line;
|
||||||
private int buttons;
|
private readonly int buttons;
|
||||||
private Sidedef copysidedeffront;
|
private readonly Sidedef copysidedeffront;
|
||||||
private Sidedef copysidedefback;
|
private readonly Sidedef copysidedefback;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -49,20 +50,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Constructor
|
// Constructor
|
||||||
public ResultLineMissingSides(Linedef l)
|
public ResultLineMissingSides(Linedef l)
|
||||||
{
|
{
|
||||||
List<LinedefSide> sides;
|
|
||||||
bool fixable;
|
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line = l;
|
line = l;
|
||||||
this.viewobjects.Add(l);
|
viewobjects.Add(l);
|
||||||
this.description = "This linedef is missing front and back sidedefs." +
|
hidden = l.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
"A line must have at least a front side and optionally a back side!";
|
description = "This linedef is missing front and back sidedefs." +
|
||||||
|
"A line must have at least a front side and optionally a back side!";
|
||||||
|
|
||||||
buttons = 0;
|
buttons = 0;
|
||||||
|
|
||||||
// Check if we can join a sector on the front side
|
// Check if we can join a sector on the front side
|
||||||
fixable = false;
|
bool fixable = false;
|
||||||
sides = Tools.FindPotentialSectorAt(l, true);
|
List<LinedefSide> sides = Tools.FindPotentialSectorAt(l, true);
|
||||||
|
|
||||||
if(sides != null)
|
if(sides != null)
|
||||||
{
|
{
|
||||||
foreach(LinedefSide sd in sides)
|
foreach(LinedefSide sd in sides)
|
||||||
|
@ -75,7 +75,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
fixable = true;
|
fixable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(!sd.Front && (sd.Line.Back != null))
|
|
||||||
|
if(!sd.Front && (sd.Line.Back != null))
|
||||||
{
|
{
|
||||||
copysidedeffront = sd.Line.Back;
|
copysidedeffront = sd.Line.Back;
|
||||||
fixable = true;
|
fixable = true;
|
||||||
|
@ -102,7 +103,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
fixable = true;
|
fixable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(!sd.Front && (sd.Line.Back != null))
|
|
||||||
|
if(!sd.Front && (sd.Line.Back != null))
|
||||||
{
|
{
|
||||||
copysidedefback = sd.Line.Back;
|
copysidedefback = sd.Line.Back;
|
||||||
fixable = true;
|
fixable = true;
|
||||||
|
@ -126,6 +128,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) line.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
@ -29,9 +30,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line;
|
private readonly Linedef line;
|
||||||
private int buttons;
|
private readonly int buttons;
|
||||||
private Sidedef copysidedef;
|
private readonly Sidedef copysidedef;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -49,9 +50,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultLineNotDoubleSided(Linedef l)
|
public ResultLineNotDoubleSided(Linedef l)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line = l;
|
line = l;
|
||||||
this.viewobjects.Add(l);
|
viewobjects.Add(l);
|
||||||
this.description = "This linedef is marked as double-sided, but is missing the back sidedef. Click 'Make Single-Sided' button to remove the double-sided flag from the line.";
|
hidden = l.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This linedef is marked as double-sided, but is missing the back sidedef. Click 'Make Single-Sided' button to remove the double-sided flag from the line.";
|
||||||
|
|
||||||
// One solution is to remove the double-sided flag
|
// One solution is to remove the double-sided flag
|
||||||
buttons = 1;
|
buttons = 1;
|
||||||
|
@ -71,7 +73,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
fixable = true;
|
fixable = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(!sd.Front && (sd.Line.Back != null))
|
|
||||||
|
if(!sd.Front && (sd.Line.Back != null))
|
||||||
{
|
{
|
||||||
copysidedef = sd.Line.Back;
|
copysidedef = sd.Line.Back;
|
||||||
fixable = true;
|
fixable = true;
|
||||||
|
@ -91,6 +94,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) line.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line;
|
private readonly Linedef line;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -45,15 +46,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultLineNotSingleSided(Linedef l)
|
public ResultLineNotSingleSided(Linedef l)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line = l;
|
line = l;
|
||||||
this.viewobjects.Add(l);
|
viewobjects.Add(l);
|
||||||
this.description = "This linedef is marked as single-sided, but has both a front and a back sidedef. Click 'Make Double-Sided' button to flag the line as double-sided." +
|
hidden = l.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This linedef is marked as single-sided, but has both a front and a back sidedef. Click 'Make Double-Sided' button to flag the line as double-sided." +
|
||||||
" Or click 'Remove Sidedef' button to remove the sidedef on the back side (making the line really single-sided).";
|
" Or click 'Remove Sidedef' button to remove the sidedef on the back side (making the line really single-sided).";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) line.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,8 +28,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line1;
|
private readonly Linedef line1;
|
||||||
private Linedef line2;
|
private readonly Linedef line2;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -44,16 +45,32 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultLineOverlapping(Linedef l1, Linedef l2)
|
public ResultLineOverlapping(Linedef l1, Linedef l2)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line1 = l1;
|
line1 = l1;
|
||||||
this.line2 = l2;
|
line2 = l2;
|
||||||
this.viewobjects.Add(l1);
|
viewobjects.Add(l1);
|
||||||
this.viewobjects.Add(l2);
|
viewobjects.Add(l2);
|
||||||
this.description = "These linedefs are overlapping and they do not reference the same sector on all sides. Overlapping lines is only allowed when they reference the same sector on all sides.";
|
hidden = (l1.IgnoredErrorChecks.Contains(this.GetType()) && l2.IgnoredErrorChecks.Contains(this.GetType())); //mxd
|
||||||
|
description = "These linedefs are overlapping and they do not reference the same sector on all sides. Overlapping lines is only allowed when they reference the same sector on all sides.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide) {
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if (hide) {
|
||||||
|
line1.IgnoredErrorChecks.Add(t);
|
||||||
|
line2.IgnoredErrorChecks.Add(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (line1.IgnoredErrorChecks.Contains(t)) line1.IgnoredErrorChecks.Remove(t);
|
||||||
|
if (line2.IgnoredErrorChecks.Contains(t)) line2.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -11,8 +12,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sector sector;
|
private readonly Sector sector;
|
||||||
private bool ceiling;
|
private readonly bool ceiling;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.sector = s;
|
this.sector = s;
|
||||||
this.ceiling = ceiling;
|
this.ceiling = ceiling;
|
||||||
this.viewobjects.Add(s);
|
this.viewobjects.Add(s);
|
||||||
|
this.hidden = s.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
|
||||||
string objname = ceiling ? "ceiling" : "floor";
|
string objname = ceiling ? "ceiling" : "floor";
|
||||||
this.description = "This sector's " + objname + " is missing a flat where it is required and could cause a 'Hall Of Mirrors' visual problem in the map. Click the 'Add Default Flat' button to add a flat to the sector.";
|
this.description = "This sector's " + objname + " is missing a flat where it is required and could cause a 'Hall Of Mirrors' visual problem in the map. Click the 'Add Default Flat' button to add a flat to the sector.";
|
||||||
|
@ -40,6 +42,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if (hide) sector.IgnoredErrorChecks.Add(t);
|
||||||
|
else if (sector.IgnoredErrorChecks.Contains(t)) sector.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,8 +28,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sidedef side;
|
private readonly Sidedef side;
|
||||||
private SidedefPart part;
|
private readonly SidedefPart part;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.side = sd;
|
this.side = sd;
|
||||||
this.part = part;
|
this.part = part;
|
||||||
this.viewobjects.Add(sd);
|
this.viewobjects.Add(sd);
|
||||||
|
this.hidden = sd.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
this.description = "This sidedef is missing a texture where it is required and could cause a 'Hall Of Mirrors' visual problem in the map. Click the 'Add Default Texture' button to add a texture to the line.";
|
this.description = "This sidedef is missing a texture where it is required and could cause a 'Hall Of Mirrors' visual problem in the map. Click the 'Add Default Texture' button to add a texture to the line.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +57,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) side.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(side.IgnoredErrorChecks.Contains(t)) side.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide) { }
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Geometry;
|
using CodeImp.DoomBuilder.Geometry;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
@ -30,14 +31,24 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultSectorInvalid(Sector s)
|
public ResultSectorInvalid(Sector s)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.sector = s;
|
sector = s;
|
||||||
this.viewobjects.Add(s);
|
viewobjects.Add(s);
|
||||||
this.description = "This sector has invalid geometry (it has less than 3 sidedefs or it's area is 0). This could cause problems with clipping and rendering in the game.";
|
hidden = s.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This sector has invalid geometry (it has less than 3 sidedefs or it's area is 0). This could cause problems with clipping and rendering in the game.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) sector.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(sector.IgnoredErrorChecks.Contains(t)) sector.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
@ -28,9 +29,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sector sector;
|
private readonly Sector sector;
|
||||||
private List<Vertex> vertices;
|
private readonly List<Vertex> vertices;
|
||||||
private int index;
|
private readonly int index;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -44,17 +45,27 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultSectorUnclosed(Sector s, List<Vertex> v)
|
public ResultSectorUnclosed(Sector s, List<Vertex> v)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.sector = s;
|
sector = s;
|
||||||
this.vertices = new List<Vertex>(v);
|
vertices = new List<Vertex>(v);
|
||||||
this.viewobjects.Add(s);
|
viewobjects.Add(s);
|
||||||
|
hidden = s.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
foreach(Vertex vv in v) this.viewobjects.Add(vv);
|
foreach(Vertex vv in v) this.viewobjects.Add(vv);
|
||||||
this.description = "This sector is not a closed region and could cause problems with clipping and rendering in the game. The 'leaks' in the sector are indicated by the colored vertices.";
|
description = "This sector is not a closed region and could cause problems with clipping and rendering in the game. The 'leaks' in the sector are indicated by the colored vertices.";
|
||||||
this.index = s.Index;
|
index = s.Index;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) sector.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(sector.IgnoredErrorChecks.Contains(t)) sector.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -1,41 +1,75 @@
|
||||||
using CodeImp.DoomBuilder.Map;
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks
|
namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks
|
||||||
{
|
{
|
||||||
public class ResultStrayVertex : ErrorResult
|
public class ResultStrayVertex : ErrorResult
|
||||||
{
|
{
|
||||||
|
#region ================== Variables
|
||||||
|
|
||||||
|
private readonly Vertex vertex;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Properties
|
||||||
|
|
||||||
public override int Buttons { get { return 1; } }
|
public override int Buttons { get { return 1; } }
|
||||||
public override string Button1Text { get { return "Delete Vertex"; } }
|
public override string Button1Text { get { return "Delete Vertex"; } }
|
||||||
|
|
||||||
private Vertex vertex;
|
#endregion
|
||||||
|
|
||||||
// Constructor
|
#region ================== Constructor / Destructor
|
||||||
public ResultStrayVertex(Vertex v) {
|
|
||||||
|
public ResultStrayVertex(Vertex v)
|
||||||
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.vertex = v;
|
vertex = v;
|
||||||
this.viewobjects.Add(v);
|
viewobjects.Add(v);
|
||||||
this.description = "This vertex is not connected to any linedef.";
|
hidden = v.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This vertex is not connected to any linedef.";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) vertex.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(vertex.IgnoredErrorChecks.Contains(t)) vertex.IgnoredErrorChecks.Remove(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString() {
|
public override string ToString()
|
||||||
|
{
|
||||||
return "Vertex " + vertex.Index + " at " + vertex.Position.x + ", " + vertex.Position.y + " is not connected to any linedef.";
|
return "Vertex " + vertex.Index + " at " + vertex.Position.x + ", " + vertex.Position.y + " is not connected to any linedef.";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
public override void RenderOverlaySelection(IRenderer2D renderer) {
|
public override void RenderOverlaySelection(IRenderer2D renderer)
|
||||||
|
{
|
||||||
renderer.RenderRectangleFilled(new RectangleF(vertex.Position.x - 3, vertex.Position.y - 3, 6f, 6f), General.Colors.Selection, true);
|
renderer.RenderRectangleFilled(new RectangleF(vertex.Position.x - 3, vertex.Position.y - 3, 6f, 6f), General.Colors.Selection, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This removes the vertex
|
// This removes the vertex
|
||||||
public override bool Button1Click(bool batchMode) {
|
public override bool Button1Click(bool batchMode)
|
||||||
|
{
|
||||||
if(!batchMode) General.Map.UndoRedo.CreateUndo("Delete vertex");
|
if(!batchMode) General.Map.UndoRedo.CreateUndo("Delete vertex");
|
||||||
vertex.Dispose();
|
vertex.Dispose();
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
General.Map.ThingsFilter.Update();
|
General.Map.ThingsFilter.Update();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Thing thing;
|
private readonly Thing thing;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -44,14 +45,24 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultStuckThingInLine(Thing t)
|
public ResultStuckThingInLine(Thing t)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.thing = t;
|
thing = t;
|
||||||
this.viewobjects.Add(t);
|
viewobjects.Add(t);
|
||||||
this.description = "This thing is stuck in a wall (single-sided line) and will likely not be able to move around.";
|
hidden = t.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This thing is stuck in a wall (single-sided line) and will likely not be able to move around.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) thing.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(thing.IgnoredErrorChecks.Contains(t)) thing.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,8 +28,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Thing thing1;
|
private readonly Thing thing1;
|
||||||
private Thing thing2; //mxd
|
private readonly Thing thing2; //mxd
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.thing1 = t1;
|
this.thing1 = t1;
|
||||||
this.thing2 = t2; //mxd
|
this.thing2 = t2; //mxd
|
||||||
this.viewobjects.Add(t1);
|
this.viewobjects.Add(t1);
|
||||||
|
hidden = (t1.IgnoredErrorChecks.Contains(this.GetType()) && t2.IgnoredErrorChecks.Contains(this.GetType())); //mxd
|
||||||
this.description = "This thing is stuck in another thing. Both will likely not be able to move around.";
|
this.description = "This thing is stuck in another thing. Both will likely not be able to move around.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +57,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide)
|
||||||
|
{
|
||||||
|
thing1.IgnoredErrorChecks.Add(t);
|
||||||
|
thing2.IgnoredErrorChecks.Add(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(thing1.IgnoredErrorChecks.Contains(t)) thing1.IgnoredErrorChecks.Remove(t);
|
||||||
|
if(thing2.IgnoredErrorChecks.Contains(t)) thing2.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Thing thing;
|
private readonly Thing thing;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -44,15 +45,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultThingOutside(Thing t)
|
public ResultThingOutside(Thing t)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.thing = t;
|
thing = t;
|
||||||
this.viewobjects.Add(t);
|
viewobjects.Add(t);
|
||||||
this.description = "This thing is completely outside the map.";
|
hidden = t.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This thing is completely outside the map.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) thing.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(thing.IgnoredErrorChecks.Contains(t)) thing.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,8 +28,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sector sector;
|
private readonly Sector sector;
|
||||||
private bool ceiling;
|
private readonly bool ceiling;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.sector = s;
|
this.sector = s;
|
||||||
this.ceiling = ceiling;
|
this.ceiling = ceiling;
|
||||||
this.viewobjects.Add(s);
|
this.viewobjects.Add(s);
|
||||||
|
this.hidden = s.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
string objname = ceiling ? "ceiling" : "floor";
|
string objname = ceiling ? "ceiling" : "floor";
|
||||||
this.description = "This sector's " + objname + " uses an unknown flat. This could be the result of missing resources, or a mistyped flat name. Click the 'Add Default Flat' button to use a known flat instead.";
|
this.description = "This sector's " + objname + " uses an unknown flat. This could be the result of missing resources, or a mistyped flat name. Click the 'Add Default Flat' button to use a known flat instead.";
|
||||||
}
|
}
|
||||||
|
@ -56,6 +57,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) sector.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(sector.IgnoredErrorChecks.Contains(t)) sector.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -27,8 +28,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sidedef side;
|
private readonly Sidedef side;
|
||||||
private SidedefPart part;
|
private readonly SidedefPart part;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -49,12 +50,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.side = sd;
|
this.side = sd;
|
||||||
this.part = part;
|
this.part = part;
|
||||||
this.viewobjects.Add(sd);
|
this.viewobjects.Add(sd);
|
||||||
|
this.hidden = sd.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
this.description = "This sidedef uses an unknown texture. This could be the result of missing resources, or a mistyped texture name. Click the 'Remove Texture' button to remove the texture or click on 'Add Default Texture' to use a known texture instead.";
|
this.description = "This sidedef uses an unknown texture. This could be the result of missing resources, or a mistyped texture name. Click the 'Remove Texture' button to remove the texture or click on 'Add Default Texture' to use a known texture instead.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) side.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(side.IgnoredErrorChecks.Contains(t)) side.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -1,38 +1,74 @@
|
||||||
using CodeImp.DoomBuilder.Map;
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks {
|
namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks {
|
||||||
public class ResultUnknownThing : ErrorResult {
|
public class ResultUnknownThing : ErrorResult
|
||||||
|
{
|
||||||
|
|
||||||
|
#region ================== Variables
|
||||||
|
|
||||||
|
private readonly Thing thing;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Properties
|
||||||
|
|
||||||
public override int Buttons { get { return 1; } }
|
public override int Buttons { get { return 1; } }
|
||||||
public override string Button1Text { get { return "Delete Thing"; } }
|
public override string Button1Text { get { return "Delete Thing"; } }
|
||||||
|
|
||||||
private Thing thing;
|
#endregion
|
||||||
|
|
||||||
// Constructor
|
#region ================== Constructor / Destructor
|
||||||
public ResultUnknownThing(Thing t) {
|
|
||||||
|
public ResultUnknownThing(Thing t)
|
||||||
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.thing = t;
|
thing = t;
|
||||||
this.viewobjects.Add(t);
|
viewobjects.Add(t);
|
||||||
this.description = "This thing has unknown type (eg. it's not defined in DECORATE or current game configuration).";
|
hidden = t.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
|
description = "This thing has unknown type (eg. it's not defined in DECORATE or current game configuration).";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) thing.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(thing.IgnoredErrorChecks.Contains(t)) thing.IgnoredErrorChecks.Remove(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString() {
|
public override string ToString()
|
||||||
|
{
|
||||||
return "Thing " + thing.Index + " at " + thing.Position.x + ", " + thing.Position.y + " has unknown type (" + thing.Type + ").";
|
return "Thing " + thing.Index + " at " + thing.Position.x + ", " + thing.Position.y + " has unknown type (" + thing.Type + ").";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
public override void RenderOverlaySelection(IRenderer2D renderer) {
|
public override void RenderOverlaySelection(IRenderer2D renderer)
|
||||||
|
{
|
||||||
renderer.RenderThing(thing, renderer.DetermineThingColor(thing), 1.0f);
|
renderer.RenderThing(thing, renderer.DetermineThingColor(thing), 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This removes the thing
|
// This removes the thing
|
||||||
public override bool Button1Click(bool batchMode) {
|
public override bool Button1Click(bool batchMode)
|
||||||
|
{
|
||||||
if(!batchMode) General.Map.UndoRedo.CreateUndo("Delete thing");
|
if(!batchMode) General.Map.UndoRedo.CreateUndo("Delete thing");
|
||||||
thing.Dispose();
|
thing.Dispose();
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
General.Map.ThingsFilter.Update();
|
General.Map.ThingsFilter.Update();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
||||||
|
@ -12,8 +13,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Sidedef side;
|
private readonly Sidedef side;
|
||||||
private SidedefPart part;
|
private readonly SidedefPart part;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -33,12 +34,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.side = sd;
|
this.side = sd;
|
||||||
this.part = part;
|
this.part = part;
|
||||||
this.viewobjects.Add(sd);
|
this.viewobjects.Add(sd);
|
||||||
|
this.hidden = sd.IgnoredErrorChecks.Contains(this.GetType()); //mxd
|
||||||
this.description = "This sidedef uses an upper or lower texture, which is not required (it will never be visible ingame). Click the Remove Texture button to remove the texture (this will also reset texture offsets and scale in UDMF map format).";
|
this.description = "This sidedef uses an upper or lower texture, which is not required (it will never be visible ingame). Click the Remove Texture button to remove the texture (this will also reset texture offsets and scale in UDMF map format).";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide) side.IgnoredErrorChecks.Add(t);
|
||||||
|
else if(side.IgnoredErrorChecks.Contains(t)) side.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
@ -12,8 +13,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Linedef line;
|
private readonly Linedef line;
|
||||||
private Vertex vertex;
|
private readonly Vertex vertex;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -30,24 +31,44 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultVertexOverlappingLine(Vertex v, Linedef l)
|
public ResultVertexOverlappingLine(Vertex v, Linedef l)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.line = l;
|
line = l;
|
||||||
this.vertex = v;
|
vertex = v;
|
||||||
this.viewobjects.Add(l);
|
viewobjects.Add(l);
|
||||||
this.viewobjects.Add(v);
|
viewobjects.Add(v);
|
||||||
this.description = "This vertex overlaps this linedef without splitting it.";
|
hidden = (l.IgnoredErrorChecks.Contains(this.GetType()) && v.IgnoredErrorChecks.Contains(this.GetType())); //mxd
|
||||||
|
description = "This vertex overlaps this linedef without splitting it.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide)
|
||||||
|
{
|
||||||
|
vertex.IgnoredErrorChecks.Add(t);
|
||||||
|
line.IgnoredErrorChecks.Add(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(vertex.IgnoredErrorChecks.Contains(t)) vertex.IgnoredErrorChecks.Remove(t);
|
||||||
|
if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString() {
|
public override string ToString()
|
||||||
|
{
|
||||||
return "Vertex " + vertex.Index + " overlaps line " + line.Index + " without splitting it";
|
return "Vertex " + vertex.Index + " overlaps line " + line.Index + " without splitting it";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
public override void PlotSelection(IRenderer2D renderer) {
|
public override void PlotSelection(IRenderer2D renderer)
|
||||||
|
{
|
||||||
renderer.PlotLinedef(line, General.Colors.Selection);
|
renderer.PlotLinedef(line, General.Colors.Selection);
|
||||||
renderer.PlotVertex(line.Start, ColorCollection.VERTICES);
|
renderer.PlotVertex(line.Start, ColorCollection.VERTICES);
|
||||||
renderer.PlotVertex(line.End, ColorCollection.VERTICES);
|
renderer.PlotVertex(line.End, ColorCollection.VERTICES);
|
||||||
|
@ -56,7 +77,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix by splitting the line
|
// Fix by splitting the line
|
||||||
public override bool Button1Click(bool batchMode) {
|
public override bool Button1Click(bool batchMode)
|
||||||
|
{
|
||||||
if(!batchMode) General.Map.UndoRedo.CreateUndo("Split Linedef");
|
if(!batchMode) General.Map.UndoRedo.CreateUndo("Split Linedef");
|
||||||
line.Split(vertex);
|
line.Split(vertex);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using System;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using CodeImp.DoomBuilder.Rendering;
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
|
||||||
|
@ -11,8 +12,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
#region ================== Variables
|
#region ================== Variables
|
||||||
|
|
||||||
private Vertex vertex1;
|
private readonly Vertex vertex1;
|
||||||
private Vertex vertex2;
|
private readonly Vertex vertex2;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -29,29 +30,50 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ResultVertexOverlappingVertex(Vertex v1, Vertex v2)
|
public ResultVertexOverlappingVertex(Vertex v1, Vertex v2)
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
this.vertex1 = v1;
|
vertex1 = v1;
|
||||||
this.vertex2 = v2;
|
vertex2 = v2;
|
||||||
this.viewobjects.Add(v1);
|
viewobjects.Add(v1);
|
||||||
this.viewobjects.Add(v2);
|
viewobjects.Add(v2);
|
||||||
this.description = "These vertices have the same position.";
|
hidden = (v1.IgnoredErrorChecks.Contains(this.GetType()) && v2.IgnoredErrorChecks.Contains(this.GetType())); //mxd
|
||||||
|
description = "These vertices have the same position.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Methods
|
#region ================== Methods
|
||||||
|
|
||||||
|
// This sets if this result is displayed in ErrorCheckForm (mxd)
|
||||||
|
internal override void Hide(bool hide)
|
||||||
|
{
|
||||||
|
hidden = hide;
|
||||||
|
Type t = this.GetType();
|
||||||
|
if(hide)
|
||||||
|
{
|
||||||
|
vertex1.IgnoredErrorChecks.Add(t);
|
||||||
|
vertex2.IgnoredErrorChecks.Add(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(vertex1.IgnoredErrorChecks.Contains(t)) vertex1.IgnoredErrorChecks.Remove(t);
|
||||||
|
if(vertex2.IgnoredErrorChecks.Contains(t)) vertex2.IgnoredErrorChecks.Remove(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This must return the string that is displayed in the listbox
|
// This must return the string that is displayed in the listbox
|
||||||
public override string ToString() {
|
public override string ToString()
|
||||||
|
{
|
||||||
return "Vertices " + vertex1.Index + " and " + vertex2.Index + " have the same position";
|
return "Vertices " + vertex1.Index + " and " + vertex2.Index + " have the same position";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
public override void PlotSelection(IRenderer2D renderer) {
|
public override void PlotSelection(IRenderer2D renderer)
|
||||||
|
{
|
||||||
renderer.PlotVertex(vertex1, ColorCollection.SELECTION);
|
renderer.PlotVertex(vertex1, ColorCollection.SELECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix by splitting the line
|
// Fix by splitting the line
|
||||||
public override bool Button1Click(bool batchMode) {
|
public override bool Button1Click(bool batchMode)
|
||||||
|
{
|
||||||
if(!batchMode) General.Map.UndoRedo.CreateUndo("Merge vertices");
|
if(!batchMode) General.Map.UndoRedo.CreateUndo("Merge vertices");
|
||||||
vertex2.Join(vertex1);
|
vertex2.Join(vertex1);
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.resultcontextmenustrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.resultcontextmenustrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.resultshowall = new System.Windows.Forms.ToolStripMenuItem();
|
this.resultshowall = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.resulthidecurrent = new System.Windows.Forms.ToolStripMenuItem();
|
this.resulthidecurrent = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.resulthidecurrenttype = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.resultshowonlycurrent = new System.Windows.Forms.ToolStripMenuItem();
|
this.resultshowonlycurrent = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.resultcopytoclipboard = new System.Windows.Forms.ToolStripMenuItem();
|
this.resultcopytoclipboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -107,11 +108,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.resultcontextmenustrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.resultcontextmenustrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.resultshowall,
|
this.resultshowall,
|
||||||
this.resulthidecurrent,
|
this.resulthidecurrent,
|
||||||
|
this.resulthidecurrenttype,
|
||||||
this.resultshowonlycurrent,
|
this.resultshowonlycurrent,
|
||||||
this.toolStripSeparator1,
|
this.toolStripSeparator1,
|
||||||
this.resultcopytoclipboard});
|
this.resultcopytoclipboard});
|
||||||
this.resultcontextmenustrip.Name = "resultcontextmenustrip";
|
this.resultcontextmenustrip.Name = "resultcontextmenustrip";
|
||||||
this.resultcontextmenustrip.Size = new System.Drawing.Size(232, 120);
|
this.resultcontextmenustrip.Size = new System.Drawing.Size(232, 142);
|
||||||
this.resultcontextmenustrip.Opening += new System.ComponentModel.CancelEventHandler(this.resultcontextmenustrip_Opening);
|
this.resultcontextmenustrip.Opening += new System.ComponentModel.CancelEventHandler(this.resultcontextmenustrip_Opening);
|
||||||
//
|
//
|
||||||
// resultshowall
|
// resultshowall
|
||||||
|
@ -119,7 +121,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.resultshowall.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Show;
|
this.resultshowall.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Show;
|
||||||
this.resultshowall.Name = "resultshowall";
|
this.resultshowall.Name = "resultshowall";
|
||||||
this.resultshowall.Size = new System.Drawing.Size(231, 22);
|
this.resultshowall.Size = new System.Drawing.Size(231, 22);
|
||||||
this.resultshowall.Text = "Show All Results";
|
this.resultshowall.Text = "Show all results";
|
||||||
this.resultshowall.Click += new System.EventHandler(this.resultshowall_Click);
|
this.resultshowall.Click += new System.EventHandler(this.resultshowall_Click);
|
||||||
//
|
//
|
||||||
// resulthidecurrent
|
// resulthidecurrent
|
||||||
|
@ -127,9 +129,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.resulthidecurrent.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Hide;
|
this.resulthidecurrent.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Hide;
|
||||||
this.resulthidecurrent.Name = "resulthidecurrent";
|
this.resulthidecurrent.Name = "resulthidecurrent";
|
||||||
this.resulthidecurrent.Size = new System.Drawing.Size(231, 22);
|
this.resulthidecurrent.Size = new System.Drawing.Size(231, 22);
|
||||||
this.resulthidecurrent.Text = "Hide results of this type";
|
this.resulthidecurrent.Text = "Hide result";
|
||||||
this.resulthidecurrent.Click += new System.EventHandler(this.resulthidecurrent_Click);
|
this.resulthidecurrent.Click += new System.EventHandler(this.resulthidecurrent_Click);
|
||||||
//
|
//
|
||||||
|
// resulthidecurrenttype
|
||||||
|
//
|
||||||
|
this.resulthidecurrenttype.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.HideAll;
|
||||||
|
this.resulthidecurrenttype.Name = "resulthidecurrenttype";
|
||||||
|
this.resulthidecurrenttype.Size = new System.Drawing.Size(231, 22);
|
||||||
|
this.resulthidecurrenttype.Text = "Hide results of this type";
|
||||||
|
this.resulthidecurrenttype.Click += new System.EventHandler(this.resulthidecurrenttype_Click);
|
||||||
|
//
|
||||||
// resultshowonlycurrent
|
// resultshowonlycurrent
|
||||||
//
|
//
|
||||||
this.resultshowonlycurrent.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Show2;
|
this.resultshowonlycurrent.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Show2;
|
||||||
|
@ -255,22 +265,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.exporttofile,
|
this.exporttofile,
|
||||||
this.copytoclipboard});
|
this.copytoclipboard});
|
||||||
this.exporttrsultsmenustrip.Name = "exporttrsultsmenustrip";
|
this.exporttrsultsmenustrip.Name = "exporttrsultsmenustrip";
|
||||||
this.exporttrsultsmenustrip.Size = new System.Drawing.Size(172, 48);
|
this.exporttrsultsmenustrip.Size = new System.Drawing.Size(207, 48);
|
||||||
//
|
//
|
||||||
// exporttofile
|
// exporttofile
|
||||||
//
|
//
|
||||||
this.exporttofile.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Save;
|
this.exporttofile.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Save;
|
||||||
this.exporttofile.Name = "exporttofile";
|
this.exporttofile.Name = "exporttofile";
|
||||||
this.exporttofile.Size = new System.Drawing.Size(171, 22);
|
this.exporttofile.Size = new System.Drawing.Size(206, 22);
|
||||||
this.exporttofile.Text = "Export to File";
|
this.exporttofile.Text = "Export results to file";
|
||||||
this.exporttofile.Click += new System.EventHandler(this.exporttofile_Click);
|
this.exporttofile.Click += new System.EventHandler(this.exporttofile_Click);
|
||||||
//
|
//
|
||||||
// copytoclipboard
|
// copytoclipboard
|
||||||
//
|
//
|
||||||
this.copytoclipboard.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Copy;
|
this.copytoclipboard.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Copy;
|
||||||
this.copytoclipboard.Name = "copytoclipboard";
|
this.copytoclipboard.Name = "copytoclipboard";
|
||||||
this.copytoclipboard.Size = new System.Drawing.Size(171, 22);
|
this.copytoclipboard.Size = new System.Drawing.Size(206, 22);
|
||||||
this.copytoclipboard.Text = "Copy to Clipboard";
|
this.copytoclipboard.Text = "Copy results to clipboard";
|
||||||
this.copytoclipboard.Click += new System.EventHandler(this.copytoclipboard_Click);
|
this.copytoclipboard.Click += new System.EventHandler(this.copytoclipboard_Click);
|
||||||
//
|
//
|
||||||
// saveFileDialog
|
// saveFileDialog
|
||||||
|
@ -288,7 +298,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.exportresults.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.exportresults.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
this.exportresults.Location = new System.Drawing.Point(10, 89);
|
this.exportresults.Location = new System.Drawing.Point(10, 89);
|
||||||
this.exportresults.Name = "exportresults";
|
this.exportresults.Name = "exportresults";
|
||||||
this.exportresults.Size = new System.Drawing.Size(140, 25);
|
this.exportresults.Size = new System.Drawing.Size(160, 25);
|
||||||
this.exportresults.SplitMenuStrip = this.exporttrsultsmenustrip;
|
this.exportresults.SplitMenuStrip = this.exporttrsultsmenustrip;
|
||||||
this.exportresults.TabIndex = 0;
|
this.exportresults.TabIndex = 0;
|
||||||
this.exportresults.Text = "Export to File";
|
this.exportresults.Text = "Export to File";
|
||||||
|
@ -347,9 +357,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
private System.Windows.Forms.SaveFileDialog saveFileDialog;
|
private System.Windows.Forms.SaveFileDialog saveFileDialog;
|
||||||
private System.Windows.Forms.ContextMenuStrip resultcontextmenustrip;
|
private System.Windows.Forms.ContextMenuStrip resultcontextmenustrip;
|
||||||
private System.Windows.Forms.ToolStripMenuItem resultshowall;
|
private System.Windows.Forms.ToolStripMenuItem resultshowall;
|
||||||
private System.Windows.Forms.ToolStripMenuItem resulthidecurrent;
|
private System.Windows.Forms.ToolStripMenuItem resulthidecurrenttype;
|
||||||
private System.Windows.Forms.ToolStripMenuItem resultshowonlycurrent;
|
private System.Windows.Forms.ToolStripMenuItem resultshowonlycurrent;
|
||||||
private System.Windows.Forms.ToolStripMenuItem resultcopytoclipboard;
|
private System.Windows.Forms.ToolStripMenuItem resultcopytoclipboard;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem resulthidecurrent;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -137,7 +137,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!hiddentresulttypes.Contains(result.GetType())) //mxd
|
if (!result.IsHidden && !hiddentresulttypes.Contains(result.GetType())) //mxd
|
||||||
{
|
{
|
||||||
results.Items.Add(result);
|
results.Items.Add(result);
|
||||||
}
|
}
|
||||||
|
@ -596,7 +596,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region =================== Results Context Menu (mxd)
|
#region ================== Results Context Menu (mxd)
|
||||||
|
|
||||||
private void resultcontextmenustrip_Opening(object sender, System.ComponentModel.CancelEventArgs e)
|
private void resultcontextmenustrip_Opening(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -605,11 +605,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
resultshowall.Enabled = (resultslist.Count > 0 && resultslist.Count > results.Items.Count);
|
resultshowall.Enabled = (resultslist.Count > 0 && resultslist.Count > results.Items.Count);
|
||||||
resultcopytoclipboard.Enabled = haveresult;
|
resultcopytoclipboard.Enabled = haveresult;
|
||||||
resulthidecurrent.Enabled = haveresult;
|
resulthidecurrent.Enabled = haveresult;
|
||||||
|
resulthidecurrenttype.Enabled = haveresult;
|
||||||
resultshowonlycurrent.Enabled = haveresult;
|
resultshowonlycurrent.Enabled = haveresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resultshowall_Click(object sender, EventArgs e)
|
private void resultshowall_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// Reset ignored items
|
||||||
|
foreach(ErrorResult result in resultslist) result.Hide(false);
|
||||||
|
|
||||||
// Restore items
|
// Restore items
|
||||||
results.Items.Clear();
|
results.Items.Clear();
|
||||||
results.Items.AddRange(resultslist.ToArray());
|
results.Items.AddRange(resultslist.ToArray());
|
||||||
|
@ -619,7 +623,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resulthidecurrent_Click(object sender, EventArgs e)
|
private void resulthidecurrent_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ErrorResult r = results.SelectedItem as ErrorResult;
|
||||||
|
if(r == null) return;
|
||||||
|
r.Hide(true);
|
||||||
|
results.Items.Remove(r);
|
||||||
|
|
||||||
|
// Do the obvious
|
||||||
|
UpdateTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resulthidecurrenttype_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ErrorResult r = results.SelectedItem as ErrorResult;
|
ErrorResult r = results.SelectedItem as ErrorResult;
|
||||||
if(r == null) return;
|
if(r == null) return;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.5420
|
// Runtime Version:2.0.50727.5466
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
@ -214,6 +214,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap HideAll {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("HideAll", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap List {
|
internal static System.Drawing.Bitmap List {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("List", resourceCulture);
|
object obj = ResourceManager.GetObject("List", resourceCulture);
|
||||||
|
|
|
@ -142,6 +142,9 @@
|
||||||
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Similar" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Similar.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -160,8 +163,8 @@
|
||||||
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Similar" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Similar.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FloorsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="FloorsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\FloorsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\FloorsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -193,9 +196,6 @@
|
||||||
<data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Door" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Door" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Door.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Door.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -217,6 +217,9 @@
|
||||||
<data name="DrawCurveMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="DrawCurveMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\DrawCurveMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\DrawCurveMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Show2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Show2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -238,7 +241,7 @@
|
||||||
<data name="FilterThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="FilterThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\FilterThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\FilterThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Show2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="HideAll" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Show2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\HideAll.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
BIN
Source/Plugins/BuilderModes/Resources/HideAll.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/HideAll.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in a new issue