mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-12-11 21:01:22 +00:00
Fixed, "Check Polyobjects" error check: an error is no longer added when "Mirror Polyobject Number" of "Polyobj_Startline" is 0.
Fixed, "Find and Replace" mode: "Find and Replace" window no longer closes when no results are found and Replace mode is enabled. Changed, "Find and Replace" mode: renamed some search modes for better grouping.
This commit is contained in:
parent
cc9d118f5b
commit
5fd79cd7a2
12 changed files with 30 additions and 23 deletions
|
@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
#region ================== Variables
|
||||
|
||||
// Attributes
|
||||
private EditModeAttribute attributes;
|
||||
protected EditModeAttribute attributes; //mxd. private -> protected
|
||||
|
||||
// Disposing
|
||||
protected bool isdisposed;
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
internal bool Volatile { get { return attributes.Volatile; } set { attributes.Volatile = value; } } //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
@ -89,7 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// Show toolbox window
|
||||
BuilderPlug.Me.FindReplaceForm.Show((Form)General.Interface);
|
||||
BuilderPlug.Me.FindReplaceForm.Show((Form)General.Interface, this);
|
||||
}
|
||||
|
||||
// Disenagaging
|
||||
|
|
|
@ -10,7 +10,7 @@ using System.Threading;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[ErrorChecker("Check Polyobjects", true, 100)]
|
||||
[ErrorChecker("Check polyobjects", true, 100)]
|
||||
public class CheckPolyobjects : ErrorChecker
|
||||
{
|
||||
#region ================== Constants
|
||||
|
@ -124,7 +124,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Check if Mirror Polyobject Number exists
|
||||
foreach(Linedef linedef in linesbytype.Value)
|
||||
{
|
||||
if(!startspots.ContainsKey(linedef.Args[1]))
|
||||
// The value of 0 can mean either "No mirror polyobj" or "Polyobj 0" here...
|
||||
if(linedef.Args[1] > 0 && !startspots.ContainsKey(linedef.Args[1]))
|
||||
SubmitResult(new ResultInvalidPolyobjectLines(new List<Linedef> { linedef }, "\"" + Polyobj_StartLine + "\" action have non-existing Mirror Polyobject Number assigned (" + linedef.Args[1] + "). It won't function correctly ingame."));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Sector Ceiling Flat", BrowseButton = true)]
|
||||
[FindReplace("Sector Flat (Ceiling)", BrowseButton = true)]
|
||||
internal class FindSectorCeilingFlat : FindSectorFlat
|
||||
{
|
||||
#region ================== Methods
|
||||
|
|
|
@ -8,7 +8,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
|
||||
{
|
||||
[FindReplace("Sector Ceiling Height", BrowseButton = false)]
|
||||
[FindReplace("Sector Height (Ceiling)", BrowseButton = false)]
|
||||
internal class FindSectorCeilingHeight : BaseFindSector
|
||||
{
|
||||
#region ================== Methods
|
||||
|
|
|
@ -10,7 +10,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Sector Floor Flat", BrowseButton = true)]
|
||||
[FindReplace("Sector Flat (Floor)", BrowseButton = true)]
|
||||
internal class FindSectorFloorFlat : FindSectorFlat
|
||||
{
|
||||
#region ================== Methods
|
||||
|
|
|
@ -8,7 +8,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
|
||||
{
|
||||
[FindReplace("Sector Floor Height", BrowseButton = false)]
|
||||
[FindReplace("Sector Height (Floor)", BrowseButton = false)]
|
||||
internal class FindSectorFloorHeight : BaseFindSector
|
||||
{
|
||||
#region ================== Methods
|
||||
|
|
|
@ -11,7 +11,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Sidedef Lower Texture", BrowseButton = true)]
|
||||
[FindReplace("Sidedef Texture (Lower)", BrowseButton = true)]
|
||||
internal class FindSidedefLowerTexture : BaseFindSidedef
|
||||
{
|
||||
#region ================== Properties
|
||||
|
|
|
@ -11,7 +11,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Sidedef Middle Texture", BrowseButton = true)]
|
||||
[FindReplace("Sidedef Texture (Middle)", BrowseButton = true)]
|
||||
internal class FindSidedefMiddleTexture : BaseFindSidedef
|
||||
{
|
||||
#region ================== Properties
|
||||
|
|
|
@ -11,7 +11,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Sidedef Upper Texture", BrowseButton = true)]
|
||||
[FindReplace("Sidedef Texture (Upper)", BrowseButton = true)]
|
||||
internal class FindSidedefUpperTexture : BaseFindSidedef
|
||||
{
|
||||
#region ================== Properties
|
||||
|
|
|
@ -72,6 +72,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.searchtypes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.searchtypes.FormattingEnabled = true;
|
||||
this.searchtypes.Location = new System.Drawing.Point(109, 12);
|
||||
this.searchtypes.MaxDropDownItems = 40;
|
||||
this.searchtypes.Name = "searchtypes";
|
||||
this.searchtypes.Size = new System.Drawing.Size(156, 21);
|
||||
this.searchtypes.Sorted = true;
|
||||
|
|
|
@ -36,12 +36,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Variables
|
||||
|
||||
private FindReplaceMode mode; //mxd
|
||||
private FindReplaceType newfinder;
|
||||
private FindReplaceType finder;
|
||||
private List<FindReplaceType> findtypeslist;
|
||||
bool controlpressed;
|
||||
bool shiftpressed;
|
||||
bool suppressevents;
|
||||
private bool controlpressed;
|
||||
private bool shiftpressed;
|
||||
private bool suppressevents;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -169,7 +170,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Withdraw the undo step if nothing was replaced
|
||||
if(resultslist.Items.Count < 1)
|
||||
{
|
||||
mode.Volatile = false; //mxd. Otherwice UndoManager.PerformUndo will cancel the mode...
|
||||
General.Map.UndoRedo.WithdrawUndo();
|
||||
mode.Volatile = true; //mxd
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -345,14 +350,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#region ================== Methods
|
||||
|
||||
// This shows the window
|
||||
public void Show(Form owner)
|
||||
public void Show(Form owner, FindReplaceMode mode)
|
||||
{
|
||||
// First time showing?
|
||||
//if((this.Location.X == 0) && (this.Location.Y == 0))
|
||||
{
|
||||
// Position at left-top of owner
|
||||
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
|
||||
}
|
||||
//mxd
|
||||
this.mode = mode;
|
||||
|
||||
// Position at left-top of owner
|
||||
this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90);
|
||||
|
||||
// Re-fill the search types list
|
||||
searchtypes.Items.Clear();
|
||||
|
@ -373,8 +377,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// Select first if none was selected
|
||||
if(searchtypes.SelectedIndex < 0)
|
||||
searchtypes.SelectedIndex = 0;
|
||||
if(searchtypes.SelectedIndex < 0) searchtypes.SelectedIndex = 0;
|
||||
|
||||
// Close results part
|
||||
resultspanel.Visible = false;
|
||||
|
|
Loading…
Reference in a new issue