mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +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
5fe6c91ffc
commit
747f268af2
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 ================== Properties
|
||||
|
|
|
@ -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 ================== Properties
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -73,6 +73,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;
|
||||
private Font hintfont; //mxd
|
||||
|
||||
#endregion
|
||||
|
@ -189,7 +190,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
|
||||
{
|
||||
|
@ -368,14 +373,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();
|
||||
|
@ -396,8 +400,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