mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Added Find & Replace for Thing Angles
Added lots of new filter options for Things Filters Some interface polishing
This commit is contained in:
parent
446e3d40d0
commit
6c09634660
31 changed files with 1242 additions and 98 deletions
|
@ -34,7 +34,7 @@ using System.Drawing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public class ThingTypeInfo : IComparable<ThingTypeInfo>
|
||||
public class ThingTypeInfo : INumberedTitle, IComparable<ThingTypeInfo>
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.numberpanel);
|
||||
this.Controls.Add(this.list);
|
||||
this.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public partial class ArgumentBox : UserControl
|
||||
{
|
||||
#region ================== Variables
|
||||
|
||||
|
||||
private TypeHandler typehandler;
|
||||
private bool ignorebuttonchange = false;
|
||||
|
||||
|
|
|
@ -56,7 +56,14 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Variables
|
||||
private string elementname;
|
||||
private string lasteditfieldname;
|
||||
private bool autoinsertuserprefix;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public bool AutoInsertUserPrefix { get { return autoinsertuserprefix; } set { autoinsertuserprefix = value; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor
|
||||
|
@ -65,6 +72,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public FieldsEditorControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
autoinsertuserprefix = true;
|
||||
enumscombo.Location = new Point(-1000, 1);
|
||||
}
|
||||
|
||||
|
@ -110,6 +118,23 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
SetupNewRowStyle();
|
||||
}
|
||||
|
||||
// Use this in case you don't want the fixed fields
|
||||
public void ListNoFixedFields()
|
||||
{
|
||||
// Update new row
|
||||
SetupNewRowStyle();
|
||||
}
|
||||
|
||||
// Clear all fields
|
||||
public void ClearFields()
|
||||
{
|
||||
// Trash rows
|
||||
fieldslist.Rows.Clear();
|
||||
|
||||
// Update new row
|
||||
SetupNewRowStyle();
|
||||
}
|
||||
|
||||
// This sets up the fields and values from a UniFields object
|
||||
// When first is true, the values are applied unconditionally
|
||||
// When first is false, the values in the grid are erased when
|
||||
|
@ -368,7 +393,10 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Remove all text
|
||||
fieldslist.Rows[e.RowIndex].Cells[0].Style.ForeColor = SystemColors.WindowText;
|
||||
fieldslist.Rows[e.RowIndex].Cells[0].Value = FIELD_PREFIX_SUGGESTION;
|
||||
if(autoinsertuserprefix)
|
||||
fieldslist.Rows[e.RowIndex].Cells[0].Value = FIELD_PREFIX_SUGGESTION;
|
||||
else
|
||||
fieldslist.Rows[e.RowIndex].Cells[0].Value = "";
|
||||
}
|
||||
}
|
||||
// Value cell?
|
||||
|
|
|
@ -27,6 +27,7 @@ using System.Reflection;
|
|||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -46,13 +47,23 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Filter by category
|
||||
protected string categoryname;
|
||||
|
||||
// Filter by exact thing
|
||||
protected int thingtype;
|
||||
// Filter by properties
|
||||
protected int thingtype; // -1 indicates not used
|
||||
protected int thingangle; // -1 indicates not used
|
||||
protected int thingzheight; // int.MinValue indicates not used
|
||||
|
||||
// Filter by fields
|
||||
protected List<string> requiredfields;
|
||||
protected List<string> forbiddenfields;
|
||||
|
||||
// Filter by action/tag
|
||||
protected int thingaction; // -1 indicates not used
|
||||
protected int[] thingargs; // -1 indicates not used
|
||||
protected int thingtag; // -1 indicates not used
|
||||
|
||||
// Filter by custom fields
|
||||
protected UniFields customfields;
|
||||
|
||||
// List of things
|
||||
protected List<Thing> visiblethings;
|
||||
protected List<Thing> hiddenthings;
|
||||
|
@ -68,16 +79,22 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
public string Name { get { return name; } internal set { name = value; } }
|
||||
public string CategoryName { get { return categoryname; } internal set { categoryname = value; } }
|
||||
internal int ThingType { get { return thingtype; } set { thingtype = value; } }
|
||||
internal int ThingAngle { get { return thingangle; } set { thingangle = value; } }
|
||||
internal int ThingZHeight { get { return thingzheight; } set { thingzheight = value; } }
|
||||
internal int ThingAction { get { return thingaction; } set { thingaction = value; } }
|
||||
internal int[] ThingArgs { get { return thingargs; } set { Array.Copy(value, thingargs, Thing.NUM_ARGS); } }
|
||||
internal int ThingTag { get { return thingtag; } set { thingtag = value; } }
|
||||
internal UniFields ThingCustomFields { get { return customfields; } set { customfields = new UniFields(value); } }
|
||||
internal ICollection<string> RequiredFields { get { return requiredfields; } }
|
||||
internal ICollection<string> ForbiddenFields { get { return forbiddenfields; } }
|
||||
public ICollection<Thing> VisibleThings { get { return visiblethings; } }
|
||||
public ICollection<Thing> HiddenThings { get { return hiddenthings; } }
|
||||
internal bool IsDisposed { get { return isdisposed; } }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
|
||||
// Copy constructor
|
||||
internal ThingsFilter(ThingsFilter f)
|
||||
{
|
||||
|
@ -85,8 +102,17 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
name = f.name;
|
||||
categoryname = f.categoryname;
|
||||
thingtype = f.thingtype;
|
||||
thingzheight = f.thingzheight;
|
||||
thingangle = f.thingangle;
|
||||
thingaction = f.thingaction;
|
||||
thingargs = new int[Thing.NUM_ARGS];
|
||||
Array.Copy(f.thingargs, thingargs, Thing.NUM_ARGS);
|
||||
thingtag = f.thingtag;
|
||||
customfields = new UniFields(f.customfields);
|
||||
requiredfields = new List<string>(f.requiredfields);
|
||||
forbiddenfields = new List<string>(f.forbiddenfields);
|
||||
|
||||
AdjustForMapFormat();
|
||||
}
|
||||
|
||||
// Constructor for filter from configuration
|
||||
|
@ -97,11 +123,19 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Initialize
|
||||
requiredfields = new List<string>();
|
||||
forbiddenfields = new List<string>();
|
||||
thingargs = new int[Thing.NUM_ARGS];
|
||||
customfields = new UniFields();
|
||||
|
||||
// Read settings from config
|
||||
name = cfg.ReadSetting(path + ".name", "Unnamed filter");
|
||||
categoryname = cfg.ReadSetting(path + ".category", "");
|
||||
thingtype = cfg.ReadSetting(path + ".type", -1);
|
||||
thingangle = cfg.ReadSetting(path + ".angle", -1);
|
||||
thingzheight = cfg.ReadSetting(path + ".zheight", int.MinValue);
|
||||
thingaction = cfg.ReadSetting(path + ".action", -1);
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++)
|
||||
thingargs[i] = cfg.ReadSetting(path + ".arg" + i.ToString(CultureInfo.InvariantCulture), -1);
|
||||
thingtag = cfg.ReadSetting(path + ".tag", -1);
|
||||
|
||||
// Read flags
|
||||
// key is string, value must be boolean which indicates if
|
||||
|
@ -116,6 +150,16 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
forbiddenfields.Add(de.Key.ToString());
|
||||
}
|
||||
|
||||
// Custom fields
|
||||
IDictionary fieldvalues = cfg.ReadSetting(path + ".customfieldvalues", new Hashtable());
|
||||
foreach(DictionaryEntry fv in fieldvalues)
|
||||
{
|
||||
int ft = cfg.ReadSetting(path + ".customfieldtypes." + fv.Key.ToString(), 0);
|
||||
customfields.Add(fv.Key.ToString(), new UniValue(ft, fv.Value));
|
||||
}
|
||||
|
||||
AdjustForMapFormat();
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
@ -123,11 +167,18 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Constructor for a new filter
|
||||
internal ThingsFilter()
|
||||
{
|
||||
// Initialize
|
||||
// Initialize everything as <any>
|
||||
requiredfields = new List<string>();
|
||||
forbiddenfields = new List<string>();
|
||||
customfields = new UniFields();
|
||||
categoryname = "";
|
||||
thingtype = -1;
|
||||
thingangle = -1;
|
||||
thingzheight = int.MinValue;
|
||||
thingaction = -1;
|
||||
thingargs = new int[Thing.NUM_ARGS];
|
||||
for(int i = 0 ; i < Thing.NUM_ARGS; i++) thingargs[i] = -1;
|
||||
thingtag = -1;
|
||||
name = "Unnamed filter";
|
||||
|
||||
// We have no destructor
|
||||
|
@ -153,7 +204,24 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
|
||||
// This sets some fields to <any> when they are not valid for the current map format
|
||||
private void AdjustForMapFormat()
|
||||
{
|
||||
if((General.Map != null) && (General.Map.FormatInterface != null))
|
||||
{
|
||||
// Adjust as needed for map format
|
||||
if(!General.Map.FormatInterface.HasThingHeight) thingzheight = int.MinValue;
|
||||
if(!General.Map.FormatInterface.HasThingAction) thingaction = -1;
|
||||
if(!General.Map.FormatInterface.HasThingTag) thingtag = -1;
|
||||
if(!General.Map.FormatInterface.HasActionArgs)
|
||||
{
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++) thingargs[i] = -1;
|
||||
}
|
||||
if(!General.Map.FormatInterface.HasCustomFields) customfields.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This checks if a thing is visible. Throws an exception when the specified Thing does not exist in the map (filter not updated?).
|
||||
/// </summary>
|
||||
|
@ -169,7 +237,13 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
cfg.WriteSetting(path + ".name", name);
|
||||
cfg.WriteSetting(path + ".category", categoryname);
|
||||
cfg.WriteSetting(path + ".type", thingtype);
|
||||
|
||||
cfg.WriteSetting(path + ".angle", thingangle);
|
||||
cfg.WriteSetting(path + ".zheight", thingzheight);
|
||||
cfg.WriteSetting(path + ".action", thingaction);
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++)
|
||||
cfg.WriteSetting(path + ".arg" + i.ToString(CultureInfo.InvariantCulture), thingargs[i]);
|
||||
cfg.WriteSetting(path + ".tag", thingtag);
|
||||
|
||||
// Write required fields to config
|
||||
foreach(string s in requiredfields)
|
||||
cfg.WriteSetting(path + ".fields." + s, true);
|
||||
|
@ -177,6 +251,13 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Write forbidden fields to config
|
||||
foreach(string s in forbiddenfields)
|
||||
cfg.WriteSetting(path + ".fields." + s, false);
|
||||
|
||||
// Custom fields
|
||||
foreach(KeyValuePair<string, UniValue> u in customfields)
|
||||
{
|
||||
cfg.WriteSetting(path + ".customfieldtypes." + u.Key, u.Value.Type);
|
||||
cfg.WriteSetting(path + ".customfieldvalues." + u.Key, u.Value.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// This is called when the filter is activated
|
||||
|
@ -200,28 +281,36 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
/// </summary>
|
||||
public virtual void Update()
|
||||
{
|
||||
AdjustForMapFormat();
|
||||
|
||||
// Make new list
|
||||
visiblethings = new List<Thing>(General.Map.Map.Things.Count);
|
||||
hiddenthings = new List<Thing>(General.Map.Map.Things.Count);
|
||||
thingsvisiblestate = new Dictionary<Thing, bool>(General.Map.Map.Things.Count);
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
bool qualifies;
|
||||
|
||||
bool qualifies = true;
|
||||
|
||||
// Get thing info
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
|
||||
// Check if thing is in unknown category
|
||||
if(ti.Category == null)
|
||||
|
||||
// Check against simple properties
|
||||
qualifies &= (thingtype == -1) || (t.Type == thingtype);
|
||||
qualifies &= (thingangle == -1) || (Angle2D.RealToDoom(t.Angle) == thingangle);
|
||||
qualifies &= (thingzheight == int.MinValue) || ((int)(t.Position.z) == thingzheight);
|
||||
qualifies &= (thingaction == -1) || (t.Action == thingaction);
|
||||
qualifies &= (thingtag == -1) || (t.Tag == thingtag);
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++)
|
||||
qualifies &= (thingargs[i] == -1) || (t.Args[i] == thingargs[i]);
|
||||
|
||||
// Still qualifies?
|
||||
if(qualifies)
|
||||
{
|
||||
// Check if the thing matches id
|
||||
qualifies = ((t.Type == thingtype) || (thingtype == -1)) && (categoryname.Length == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if the thing matches category and id
|
||||
qualifies = ((t.Type == thingtype) || (thingtype == -1)) &&
|
||||
((ti.Category.Name == categoryname) || (categoryname.Length == 0));
|
||||
// Check thing category
|
||||
if(ti.Category == null)
|
||||
qualifies = (categoryname.Length == 0);
|
||||
else
|
||||
qualifies = ((ti.Category.Name == categoryname) || (categoryname.Length == 0));
|
||||
}
|
||||
|
||||
// Still qualifies?
|
||||
|
@ -233,7 +322,6 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
if(t.Flags.ContainsKey(s))
|
||||
{
|
||||
qualifies = (t.Flags[s] == true);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -250,8 +338,23 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
foreach(string s in forbiddenfields)
|
||||
{
|
||||
if(t.Flags.ContainsKey(s))
|
||||
{
|
||||
qualifies = (t.Flags[s] == false);
|
||||
}
|
||||
}
|
||||
|
||||
// Still qualifies?
|
||||
if(qualifies)
|
||||
{
|
||||
// Go for all required custom fields
|
||||
foreach(KeyValuePair<string, UniValue> kv in customfields)
|
||||
{
|
||||
if(t.Fields.ContainsKey(kv.Key))
|
||||
{
|
||||
qualifies = (t.Fields[kv.Key].Type == kv.Value.Type) && (t.Fields[kv.Key].Value.Equals(kv.Value.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
qualifies = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
29
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
29
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
|
@ -58,6 +58,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.hexenpanel = new System.Windows.Forms.Panel();
|
||||
this.activation = new System.Windows.Forms.ComboBox();
|
||||
this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
|
||||
this.browseaction = new System.Windows.Forms.Button();
|
||||
this.udmfpanel = new System.Windows.Forms.Panel();
|
||||
this.udmfactivates = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
|
||||
this.newtag = new System.Windows.Forms.Button();
|
||||
|
@ -92,7 +93,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
|
||||
this.heightpanel1 = new System.Windows.Forms.Panel();
|
||||
this.heightpanel2 = new System.Windows.Forms.Panel();
|
||||
this.browseaction = new System.Windows.Forms.Button();
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
taglabel = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
|
@ -420,6 +420,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.action.Value = 402;
|
||||
this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges);
|
||||
//
|
||||
// browseaction
|
||||
//
|
||||
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browseaction.Location = new System.Drawing.Point(469, 25);
|
||||
this.browseaction.Name = "browseaction";
|
||||
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseaction.Size = new System.Drawing.Size(28, 25);
|
||||
this.browseaction.TabIndex = 1;
|
||||
this.browseaction.Text = " ";
|
||||
this.browseaction.UseVisualStyleBackColor = true;
|
||||
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
|
||||
//
|
||||
// udmfpanel
|
||||
//
|
||||
this.udmfpanel.Controls.Add(this.udmfactivates);
|
||||
|
@ -811,6 +824,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fieldslist.AutoInsertUserPrefix = true;
|
||||
this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.fieldslist.Location = new System.Drawing.Point(11, 11);
|
||||
|
@ -837,19 +851,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.heightpanel2.TabIndex = 4;
|
||||
this.heightpanel2.Visible = false;
|
||||
//
|
||||
// browseaction
|
||||
//
|
||||
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browseaction.Location = new System.Drawing.Point(469, 26);
|
||||
this.browseaction.Name = "browseaction";
|
||||
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseaction.Size = new System.Drawing.Size(28, 23);
|
||||
this.browseaction.TabIndex = 1;
|
||||
this.browseaction.Text = " ";
|
||||
this.browseaction.UseVisualStyleBackColor = true;
|
||||
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
|
||||
//
|
||||
// LinedefEditForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
|
|
5
Source/Core/Windows/SectorEditForm.Designer.cs
generated
5
Source/Core/Windows/SectorEditForm.Designer.cs
generated
|
@ -174,10 +174,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.browseeffect.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browseeffect.Location = new System.Drawing.Point(385, 27);
|
||||
this.browseeffect.Location = new System.Drawing.Point(385, 26);
|
||||
this.browseeffect.Name = "browseeffect";
|
||||
this.browseeffect.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseeffect.Size = new System.Drawing.Size(28, 23);
|
||||
this.browseeffect.Size = new System.Drawing.Size(28, 25);
|
||||
this.browseeffect.TabIndex = 1;
|
||||
this.browseeffect.Text = " ";
|
||||
this.browseeffect.UseVisualStyleBackColor = true;
|
||||
|
@ -400,6 +400,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fieldslist.AutoInsertUserPrefix = true;
|
||||
this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.fieldslist.Location = new System.Drawing.Point(11, 11);
|
||||
|
|
5
Source/Core/Windows/ThingEditForm.Designer.cs
generated
5
Source/Core/Windows/ThingEditForm.Designer.cs
generated
|
@ -420,10 +420,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browseaction.Location = new System.Drawing.Point(530, 26);
|
||||
this.browseaction.Location = new System.Drawing.Point(530, 25);
|
||||
this.browseaction.Name = "browseaction";
|
||||
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseaction.Size = new System.Drawing.Size(28, 23);
|
||||
this.browseaction.Size = new System.Drawing.Size(28, 25);
|
||||
this.browseaction.TabIndex = 1;
|
||||
this.browseaction.Text = " ";
|
||||
this.browseaction.UseVisualStyleBackColor = true;
|
||||
|
@ -489,6 +489,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fieldslist.AutoInsertUserPrefix = true;
|
||||
this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.fieldslist.Location = new System.Drawing.Point(8, 9);
|
||||
|
|
541
Source/Core/Windows/ThingsFiltersForm.Designer.cs
generated
541
Source/Core/Windows/ThingsFiltersForm.Designer.cs
generated
|
@ -33,15 +33,53 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.addfilter = new System.Windows.Forms.Button();
|
||||
this.deletefilter = new System.Windows.Forms.Button();
|
||||
this.filtergroup = new System.Windows.Forms.GroupBox();
|
||||
this.filterfields = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.tabs = new System.Windows.Forms.TabControl();
|
||||
this.tabbasic = new System.Windows.Forms.TabPage();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.labelzheight = new System.Windows.Forms.Label();
|
||||
this.filterzheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.browseangle = new System.Windows.Forms.Button();
|
||||
this.filterangle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.filtertype = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.browsetype = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.filtercategory = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.tabflags = new System.Windows.Forms.TabPage();
|
||||
this.filterfields = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.tabaction = new System.Windows.Forms.TabPage();
|
||||
this.argumentspanel = new System.Windows.Forms.Panel();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox();
|
||||
this.arg1 = new CodeImp.DoomBuilder.Controls.ArgumentBox();
|
||||
this.arg0 = new CodeImp.DoomBuilder.Controls.ArgumentBox();
|
||||
this.arg3 = new CodeImp.DoomBuilder.Controls.ArgumentBox();
|
||||
this.arg4 = new CodeImp.DoomBuilder.Controls.ArgumentBox();
|
||||
this.arg1label = new System.Windows.Forms.Label();
|
||||
this.arg0label = new System.Windows.Forms.Label();
|
||||
this.arg3label = new System.Windows.Forms.Label();
|
||||
this.arg2label = new System.Windows.Forms.Label();
|
||||
this.arg4label = new System.Windows.Forms.Label();
|
||||
this.filteraction = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
|
||||
this.browseaction = new System.Windows.Forms.Button();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.filtertag = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
|
||||
this.labeltag = new System.Windows.Forms.Label();
|
||||
this.tabcustom = new System.Windows.Forms.TabPage();
|
||||
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
|
||||
this.filtername = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.filtergroup.SuspendLayout();
|
||||
this.tabs.SuspendLayout();
|
||||
this.tabbasic.SuspendLayout();
|
||||
this.tabflags.SuspendLayout();
|
||||
this.tabaction.SuspendLayout();
|
||||
this.argumentspanel.SuspendLayout();
|
||||
this.tabcustom.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listfilters
|
||||
|
@ -57,7 +95,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.listfilters.MultiSelect = false;
|
||||
this.listfilters.Name = "listfilters";
|
||||
this.listfilters.ShowGroups = false;
|
||||
this.listfilters.Size = new System.Drawing.Size(202, 323);
|
||||
this.listfilters.Size = new System.Drawing.Size(202, 354);
|
||||
this.listfilters.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||
this.listfilters.TabIndex = 0;
|
||||
this.listfilters.UseCompatibleStateImageBehavior = false;
|
||||
|
@ -72,7 +110,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// addfilter
|
||||
//
|
||||
this.addfilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.addfilter.Location = new System.Drawing.Point(12, 341);
|
||||
this.addfilter.Location = new System.Drawing.Point(12, 372);
|
||||
this.addfilter.Name = "addfilter";
|
||||
this.addfilter.Size = new System.Drawing.Size(98, 25);
|
||||
this.addfilter.TabIndex = 1;
|
||||
|
@ -84,7 +122,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.deletefilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.deletefilter.Enabled = false;
|
||||
this.deletefilter.Location = new System.Drawing.Point(116, 341);
|
||||
this.deletefilter.Location = new System.Drawing.Point(116, 372);
|
||||
this.deletefilter.Name = "deletefilter";
|
||||
this.deletefilter.Size = new System.Drawing.Size(98, 25);
|
||||
this.deletefilter.TabIndex = 2;
|
||||
|
@ -97,60 +135,453 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.filtergroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.filtergroup.Controls.Add(this.filterfields);
|
||||
this.filtergroup.Controls.Add(this.label3);
|
||||
this.filtergroup.Controls.Add(this.filtercategory);
|
||||
this.filtergroup.Controls.Add(this.label2);
|
||||
this.filtergroup.Controls.Add(this.tabs);
|
||||
this.filtergroup.Controls.Add(this.filtername);
|
||||
this.filtergroup.Controls.Add(this.label1);
|
||||
this.filtergroup.Enabled = false;
|
||||
this.filtergroup.Location = new System.Drawing.Point(232, 12);
|
||||
this.filtergroup.Name = "filtergroup";
|
||||
this.filtergroup.Size = new System.Drawing.Size(382, 354);
|
||||
this.filtergroup.Size = new System.Drawing.Size(465, 385);
|
||||
this.filtergroup.TabIndex = 3;
|
||||
this.filtergroup.TabStop = false;
|
||||
this.filtergroup.Text = " Filter settings ";
|
||||
this.filtergroup.Text = " Selected Filter ";
|
||||
//
|
||||
// filterfields
|
||||
// tabs
|
||||
//
|
||||
this.filterfields.AutoScroll = true;
|
||||
this.filterfields.Columns = 2;
|
||||
this.filterfields.Location = new System.Drawing.Point(18, 125);
|
||||
this.filterfields.Name = "filterfields";
|
||||
this.filterfields.Size = new System.Drawing.Size(329, 198);
|
||||
this.filterfields.TabIndex = 2;
|
||||
this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabs.Controls.Add(this.tabbasic);
|
||||
this.tabs.Controls.Add(this.tabflags);
|
||||
this.tabs.Controls.Add(this.tabaction);
|
||||
this.tabs.Controls.Add(this.tabcustom);
|
||||
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabs.Location = new System.Drawing.Point(6, 63);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(453, 316);
|
||||
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabs.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
// tabbasic
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(15, 106);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(89, 14);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "Filter by settings:";
|
||||
this.tabbasic.Controls.Add(this.label6);
|
||||
this.tabbasic.Controls.Add(this.labelzheight);
|
||||
this.tabbasic.Controls.Add(this.filterzheight);
|
||||
this.tabbasic.Controls.Add(this.browseangle);
|
||||
this.tabbasic.Controls.Add(this.filterangle);
|
||||
this.tabbasic.Controls.Add(this.filtertype);
|
||||
this.tabbasic.Controls.Add(this.label5);
|
||||
this.tabbasic.Controls.Add(this.browsetype);
|
||||
this.tabbasic.Controls.Add(this.label4);
|
||||
this.tabbasic.Controls.Add(this.filtercategory);
|
||||
this.tabbasic.Controls.Add(this.label2);
|
||||
this.tabbasic.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabbasic.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabbasic.Name = "tabbasic";
|
||||
this.tabbasic.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabbasic.Size = new System.Drawing.Size(445, 289);
|
||||
this.tabbasic.TabIndex = 0;
|
||||
this.tabbasic.Text = "Properties";
|
||||
this.tabbasic.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(34, 235);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(342, 14);
|
||||
this.label6.TabIndex = 15;
|
||||
this.label6.Text = "Note: Clear the input fields which you do not want to use in this filter.";
|
||||
//
|
||||
// labelzheight
|
||||
//
|
||||
this.labelzheight.AutoSize = true;
|
||||
this.labelzheight.Location = new System.Drawing.Point(19, 167);
|
||||
this.labelzheight.Name = "labelzheight";
|
||||
this.labelzheight.Size = new System.Drawing.Size(90, 14);
|
||||
this.labelzheight.TabIndex = 14;
|
||||
this.labelzheight.Text = "Filter by Z height:";
|
||||
//
|
||||
// filterzheight
|
||||
//
|
||||
this.filterzheight.AllowDecimal = false;
|
||||
this.filterzheight.AllowNegative = true;
|
||||
this.filterzheight.AllowRelative = false;
|
||||
this.filterzheight.ButtonStep = 1;
|
||||
this.filterzheight.Location = new System.Drawing.Point(123, 162);
|
||||
this.filterzheight.Name = "filterzheight";
|
||||
this.filterzheight.Size = new System.Drawing.Size(72, 24);
|
||||
this.filterzheight.StepValues = null;
|
||||
this.filterzheight.TabIndex = 13;
|
||||
this.filterzheight.WhenTextChanged += new System.EventHandler(this.filterzheight_WhenTextChanged);
|
||||
//
|
||||
// browseangle
|
||||
//
|
||||
this.browseangle.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseangle.Image = global::CodeImp.DoomBuilder.Properties.Resources.Angle;
|
||||
this.browseangle.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.browseangle.Location = new System.Drawing.Point(201, 119);
|
||||
this.browseangle.Name = "browseangle";
|
||||
this.browseangle.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseangle.Size = new System.Drawing.Size(28, 25);
|
||||
this.browseangle.TabIndex = 12;
|
||||
this.browseangle.Text = " ";
|
||||
this.browseangle.UseVisualStyleBackColor = true;
|
||||
this.browseangle.Click += new System.EventHandler(this.browseangle_Click);
|
||||
//
|
||||
// filterangle
|
||||
//
|
||||
this.filterangle.AllowDecimal = false;
|
||||
this.filterangle.AllowNegative = true;
|
||||
this.filterangle.AllowRelative = false;
|
||||
this.filterangle.ButtonStep = 45;
|
||||
this.filterangle.Location = new System.Drawing.Point(123, 119);
|
||||
this.filterangle.Name = "filterangle";
|
||||
this.filterangle.Size = new System.Drawing.Size(72, 24);
|
||||
this.filterangle.StepValues = null;
|
||||
this.filterangle.TabIndex = 11;
|
||||
this.filterangle.WhenTextChanged += new System.EventHandler(this.filterangle_WhenTextChanged);
|
||||
//
|
||||
// filtertype
|
||||
//
|
||||
this.filtertype.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.filtertype.BackColor = System.Drawing.Color.Transparent;
|
||||
this.filtertype.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.filtertype.Empty = false;
|
||||
this.filtertype.GeneralizedCategories = null;
|
||||
this.filtertype.Location = new System.Drawing.Point(123, 76);
|
||||
this.filtertype.Name = "filtertype";
|
||||
this.filtertype.Size = new System.Drawing.Size(268, 21);
|
||||
this.filtertype.TabIndex = 7;
|
||||
this.filtertype.Value = 402;
|
||||
this.filtertype.ValueChanges += new System.EventHandler(this.filtertype_ValueChanges);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(32, 124);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(77, 14);
|
||||
this.label5.TabIndex = 6;
|
||||
this.label5.Text = "Filter by angle:";
|
||||
//
|
||||
// browsetype
|
||||
//
|
||||
this.browsetype.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.browsetype.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browsetype.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browsetype.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.browsetype.Location = new System.Drawing.Point(397, 74);
|
||||
this.browsetype.Name = "browsetype";
|
||||
this.browsetype.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browsetype.Size = new System.Drawing.Size(28, 25);
|
||||
this.browsetype.TabIndex = 5;
|
||||
this.browsetype.UseVisualStyleBackColor = true;
|
||||
this.browsetype.Click += new System.EventHandler(this.browsetype_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(37, 79);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(72, 14);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "Filter by type:";
|
||||
//
|
||||
// filtercategory
|
||||
//
|
||||
this.filtercategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.filtercategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.filtercategory.FormattingEnabled = true;
|
||||
this.filtercategory.Location = new System.Drawing.Point(115, 66);
|
||||
this.filtercategory.Location = new System.Drawing.Point(123, 30);
|
||||
this.filtercategory.Name = "filtercategory";
|
||||
this.filtercategory.Size = new System.Drawing.Size(232, 22);
|
||||
this.filtercategory.Size = new System.Drawing.Size(302, 22);
|
||||
this.filtercategory.TabIndex = 1;
|
||||
this.filtercategory.SelectedIndexChanged += new System.EventHandler(this.filtercategory_SelectedIndexChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(15, 69);
|
||||
this.label2.Location = new System.Drawing.Point(15, 33);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(94, 14);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Filter by category:";
|
||||
//
|
||||
// tabflags
|
||||
//
|
||||
this.tabflags.Controls.Add(this.filterfields);
|
||||
this.tabflags.Controls.Add(this.label3);
|
||||
this.tabflags.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabflags.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabflags.Name = "tabflags";
|
||||
this.tabflags.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabflags.Size = new System.Drawing.Size(445, 289);
|
||||
this.tabflags.TabIndex = 1;
|
||||
this.tabflags.Text = "Flags";
|
||||
this.tabflags.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// filterfields
|
||||
//
|
||||
this.filterfields.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.filterfields.AutoScroll = true;
|
||||
this.filterfields.Columns = 2;
|
||||
this.filterfields.Location = new System.Drawing.Point(20, 39);
|
||||
this.filterfields.Name = "filterfields";
|
||||
this.filterfields.Size = new System.Drawing.Size(402, 229);
|
||||
this.filterfields.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(17, 20);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(89, 14);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Filter by settings:";
|
||||
//
|
||||
// tabaction
|
||||
//
|
||||
this.tabaction.Controls.Add(this.argumentspanel);
|
||||
this.tabaction.Controls.Add(this.filteraction);
|
||||
this.tabaction.Controls.Add(this.browseaction);
|
||||
this.tabaction.Controls.Add(this.label7);
|
||||
this.tabaction.Controls.Add(this.filtertag);
|
||||
this.tabaction.Controls.Add(this.labeltag);
|
||||
this.tabaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabaction.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabaction.Name = "tabaction";
|
||||
this.tabaction.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabaction.Size = new System.Drawing.Size(445, 289);
|
||||
this.tabaction.TabIndex = 2;
|
||||
this.tabaction.Text = "Action";
|
||||
this.tabaction.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// argumentspanel
|
||||
//
|
||||
this.argumentspanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.argumentspanel.Controls.Add(this.label8);
|
||||
this.argumentspanel.Controls.Add(this.arg2);
|
||||
this.argumentspanel.Controls.Add(this.arg1);
|
||||
this.argumentspanel.Controls.Add(this.arg0);
|
||||
this.argumentspanel.Controls.Add(this.arg3);
|
||||
this.argumentspanel.Controls.Add(this.arg4);
|
||||
this.argumentspanel.Controls.Add(this.arg1label);
|
||||
this.argumentspanel.Controls.Add(this.arg0label);
|
||||
this.argumentspanel.Controls.Add(this.arg3label);
|
||||
this.argumentspanel.Controls.Add(this.arg2label);
|
||||
this.argumentspanel.Controls.Add(this.arg4label);
|
||||
this.argumentspanel.Location = new System.Drawing.Point(6, 70);
|
||||
this.argumentspanel.Name = "argumentspanel";
|
||||
this.argumentspanel.Size = new System.Drawing.Size(418, 163);
|
||||
this.argumentspanel.TabIndex = 17;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(22, 4);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(102, 14);
|
||||
this.label8.TabIndex = 21;
|
||||
this.label8.Text = "Filter by arguments:";
|
||||
//
|
||||
// arg2
|
||||
//
|
||||
this.arg2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.arg2.Location = new System.Drawing.Point(236, 75);
|
||||
this.arg2.Name = "arg2";
|
||||
this.arg2.Size = new System.Drawing.Size(93, 24);
|
||||
this.arg2.TabIndex = 2;
|
||||
this.arg2.Tag = "2";
|
||||
this.arg2.Validated += new System.EventHandler(this.arg_Validated);
|
||||
//
|
||||
// arg1
|
||||
//
|
||||
this.arg1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.arg1.Location = new System.Drawing.Point(236, 49);
|
||||
this.arg1.Name = "arg1";
|
||||
this.arg1.Size = new System.Drawing.Size(93, 24);
|
||||
this.arg1.TabIndex = 1;
|
||||
this.arg1.Tag = "1";
|
||||
this.arg1.Validated += new System.EventHandler(this.arg_Validated);
|
||||
//
|
||||
// arg0
|
||||
//
|
||||
this.arg0.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.arg0.Location = new System.Drawing.Point(236, 23);
|
||||
this.arg0.Name = "arg0";
|
||||
this.arg0.Size = new System.Drawing.Size(93, 24);
|
||||
this.arg0.TabIndex = 0;
|
||||
this.arg0.Tag = "0";
|
||||
this.arg0.Validated += new System.EventHandler(this.arg_Validated);
|
||||
//
|
||||
// arg3
|
||||
//
|
||||
this.arg3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.arg3.Location = new System.Drawing.Point(236, 102);
|
||||
this.arg3.Name = "arg3";
|
||||
this.arg3.Size = new System.Drawing.Size(93, 24);
|
||||
this.arg3.TabIndex = 3;
|
||||
this.arg3.Tag = "3";
|
||||
this.arg3.Validated += new System.EventHandler(this.arg_Validated);
|
||||
//
|
||||
// arg4
|
||||
//
|
||||
this.arg4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.arg4.Location = new System.Drawing.Point(236, 128);
|
||||
this.arg4.Name = "arg4";
|
||||
this.arg4.Size = new System.Drawing.Size(93, 24);
|
||||
this.arg4.TabIndex = 4;
|
||||
this.arg4.Tag = "4";
|
||||
this.arg4.Validated += new System.EventHandler(this.arg_Validated);
|
||||
//
|
||||
// arg1label
|
||||
//
|
||||
this.arg1label.Location = new System.Drawing.Point(33, 54);
|
||||
this.arg1label.Name = "arg1label";
|
||||
this.arg1label.Size = new System.Drawing.Size(197, 14);
|
||||
this.arg1label.TabIndex = 14;
|
||||
this.arg1label.Text = "Argument 2:";
|
||||
this.arg1label.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.arg1label.UseMnemonic = false;
|
||||
//
|
||||
// arg0label
|
||||
//
|
||||
this.arg0label.Location = new System.Drawing.Point(33, 28);
|
||||
this.arg0label.Name = "arg0label";
|
||||
this.arg0label.Size = new System.Drawing.Size(197, 14);
|
||||
this.arg0label.TabIndex = 12;
|
||||
this.arg0label.Text = "Argument 1:";
|
||||
this.arg0label.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.arg0label.UseMnemonic = false;
|
||||
//
|
||||
// arg3label
|
||||
//
|
||||
this.arg3label.Location = new System.Drawing.Point(33, 107);
|
||||
this.arg3label.Name = "arg3label";
|
||||
this.arg3label.Size = new System.Drawing.Size(197, 14);
|
||||
this.arg3label.TabIndex = 20;
|
||||
this.arg3label.Text = "Argument 4:";
|
||||
this.arg3label.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.arg3label.UseMnemonic = false;
|
||||
//
|
||||
// arg2label
|
||||
//
|
||||
this.arg2label.Location = new System.Drawing.Point(33, 80);
|
||||
this.arg2label.Name = "arg2label";
|
||||
this.arg2label.Size = new System.Drawing.Size(197, 14);
|
||||
this.arg2label.TabIndex = 18;
|
||||
this.arg2label.Text = "Argument 3:";
|
||||
this.arg2label.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.arg2label.UseMnemonic = false;
|
||||
//
|
||||
// arg4label
|
||||
//
|
||||
this.arg4label.Location = new System.Drawing.Point(33, 133);
|
||||
this.arg4label.Name = "arg4label";
|
||||
this.arg4label.Size = new System.Drawing.Size(197, 14);
|
||||
this.arg4label.TabIndex = 16;
|
||||
this.arg4label.Text = "Argument 5:";
|
||||
this.arg4label.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.arg4label.UseMnemonic = false;
|
||||
//
|
||||
// filteraction
|
||||
//
|
||||
this.filteraction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.filteraction.BackColor = System.Drawing.Color.Transparent;
|
||||
this.filteraction.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.filteraction.Empty = false;
|
||||
this.filteraction.GeneralizedCategories = null;
|
||||
this.filteraction.Location = new System.Drawing.Point(122, 30);
|
||||
this.filteraction.Name = "filteraction";
|
||||
this.filteraction.Size = new System.Drawing.Size(268, 21);
|
||||
this.filteraction.TabIndex = 16;
|
||||
this.filteraction.Value = 402;
|
||||
this.filteraction.ValueChanges += new System.EventHandler(this.filteraction_ValueChanges);
|
||||
//
|
||||
// browseaction
|
||||
//
|
||||
this.browseaction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
|
||||
this.browseaction.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.browseaction.Location = new System.Drawing.Point(396, 28);
|
||||
this.browseaction.Name = "browseaction";
|
||||
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browseaction.Size = new System.Drawing.Size(28, 25);
|
||||
this.browseaction.TabIndex = 15;
|
||||
this.browseaction.UseVisualStyleBackColor = true;
|
||||
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(28, 33);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(80, 14);
|
||||
this.label7.TabIndex = 14;
|
||||
this.label7.Text = "Filter by action:";
|
||||
//
|
||||
// filtertag
|
||||
//
|
||||
this.filtertag.AllowDecimal = false;
|
||||
this.filtertag.AllowNegative = true;
|
||||
this.filtertag.AllowRelative = false;
|
||||
this.filtertag.ButtonStep = 1;
|
||||
this.filtertag.Location = new System.Drawing.Point(122, 244);
|
||||
this.filtertag.Name = "filtertag";
|
||||
this.filtertag.Size = new System.Drawing.Size(72, 24);
|
||||
this.filtertag.StepValues = null;
|
||||
this.filtertag.TabIndex = 13;
|
||||
this.filtertag.WhenTextChanged += new System.EventHandler(this.filtertag_WhenTextChanged);
|
||||
//
|
||||
// labeltag
|
||||
//
|
||||
this.labeltag.AutoSize = true;
|
||||
this.labeltag.Location = new System.Drawing.Point(42, 249);
|
||||
this.labeltag.Name = "labeltag";
|
||||
this.labeltag.Size = new System.Drawing.Size(66, 14);
|
||||
this.labeltag.TabIndex = 12;
|
||||
this.labeltag.Text = "Filter by tag:";
|
||||
//
|
||||
// tabcustom
|
||||
//
|
||||
this.tabcustom.Controls.Add(this.fieldslist);
|
||||
this.tabcustom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabcustom.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabcustom.Name = "tabcustom";
|
||||
this.tabcustom.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabcustom.Size = new System.Drawing.Size(445, 289);
|
||||
this.tabcustom.TabIndex = 3;
|
||||
this.tabcustom.Text = "Custom";
|
||||
this.tabcustom.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// fieldslist
|
||||
//
|
||||
this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fieldslist.AutoInsertUserPrefix = false;
|
||||
this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.fieldslist.Location = new System.Drawing.Point(8, 9);
|
||||
this.fieldslist.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
|
||||
this.fieldslist.Name = "fieldslist";
|
||||
this.fieldslist.Size = new System.Drawing.Size(426, 271);
|
||||
this.fieldslist.TabIndex = 2;
|
||||
this.fieldslist.Validated += new System.EventHandler(this.fieldslist_Validated);
|
||||
//
|
||||
// filtername
|
||||
//
|
||||
this.filtername.Location = new System.Drawing.Point(115, 28);
|
||||
this.filtername.Location = new System.Drawing.Point(70, 27);
|
||||
this.filtername.MaxLength = 50;
|
||||
this.filtername.Name = "filtername";
|
||||
this.filtername.Size = new System.Drawing.Size(232, 20);
|
||||
|
@ -160,7 +591,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(72, 31);
|
||||
this.label1.Location = new System.Drawing.Point(27, 30);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(37, 14);
|
||||
this.label1.TabIndex = 0;
|
||||
|
@ -170,7 +601,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancel.Location = new System.Drawing.Point(502, 383);
|
||||
this.cancel.Location = new System.Drawing.Point(585, 414);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(112, 25);
|
||||
this.cancel.TabIndex = 5;
|
||||
|
@ -181,7 +612,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// apply
|
||||
//
|
||||
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.apply.Location = new System.Drawing.Point(384, 383);
|
||||
this.apply.Location = new System.Drawing.Point(467, 414);
|
||||
this.apply.Name = "apply";
|
||||
this.apply.Size = new System.Drawing.Size(112, 25);
|
||||
this.apply.TabIndex = 4;
|
||||
|
@ -195,7 +626,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.CancelButton = this.cancel;
|
||||
this.ClientSize = new System.Drawing.Size(624, 418);
|
||||
this.ClientSize = new System.Drawing.Size(707, 449);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.filtergroup);
|
||||
|
@ -214,6 +645,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ThingsFiltersForm_HelpRequested);
|
||||
this.filtergroup.ResumeLayout(false);
|
||||
this.filtergroup.PerformLayout();
|
||||
this.tabs.ResumeLayout(false);
|
||||
this.tabbasic.ResumeLayout(false);
|
||||
this.tabbasic.PerformLayout();
|
||||
this.tabflags.ResumeLayout(false);
|
||||
this.tabflags.PerformLayout();
|
||||
this.tabaction.ResumeLayout(false);
|
||||
this.tabaction.PerformLayout();
|
||||
this.argumentspanel.ResumeLayout(false);
|
||||
this.argumentspanel.PerformLayout();
|
||||
this.tabcustom.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -231,7 +672,39 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox filtercategory;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TabControl tabs;
|
||||
private System.Windows.Forms.TabPage tabbasic;
|
||||
private System.Windows.Forms.TabPage tabflags;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl filterfields;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button browsetype;
|
||||
private System.Windows.Forms.TabPage tabaction;
|
||||
private System.Windows.Forms.TabPage tabcustom;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private CodeImp.DoomBuilder.Controls.ActionSelectorControl filtertype;
|
||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox filterangle;
|
||||
private System.Windows.Forms.Button browseangle;
|
||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox filterzheight;
|
||||
private System.Windows.Forms.Label labelzheight;
|
||||
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox filtertag;
|
||||
private System.Windows.Forms.Label labeltag;
|
||||
private CodeImp.DoomBuilder.Controls.ActionSelectorControl filteraction;
|
||||
private System.Windows.Forms.Button browseaction;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Panel argumentspanel;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private CodeImp.DoomBuilder.Controls.ArgumentBox arg2;
|
||||
private CodeImp.DoomBuilder.Controls.ArgumentBox arg1;
|
||||
private CodeImp.DoomBuilder.Controls.ArgumentBox arg0;
|
||||
private CodeImp.DoomBuilder.Controls.ArgumentBox arg3;
|
||||
private CodeImp.DoomBuilder.Controls.ArgumentBox arg4;
|
||||
private System.Windows.Forms.Label arg1label;
|
||||
private System.Windows.Forms.Label arg0label;
|
||||
private System.Windows.Forms.Label arg3label;
|
||||
private System.Windows.Forms.Label arg2label;
|
||||
private System.Windows.Forms.Label arg4label;
|
||||
private CodeImp.DoomBuilder.Controls.FieldsEditorControl fieldslist;
|
||||
private System.Windows.Forms.Label label6;
|
||||
}
|
||||
}
|
|
@ -52,11 +52,25 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
// Fill types list
|
||||
List<ThingTypeInfo> thingtypes = new List<ThingTypeInfo>(General.Map.Data.ThingTypes);
|
||||
INumberedTitle[] typeitems = new INumberedTitle[thingtypes.Count];
|
||||
for(int i = 0; i < thingtypes.Count; i++) typeitems[i] = thingtypes[i];
|
||||
filtertype.AddInfo(typeitems);
|
||||
|
||||
// Fill the categories combobox
|
||||
filtercategory.Items.Add("(any category)");
|
||||
filtercategory.Items.AddRange(General.Map.Data.ThingCategories.ToArray());
|
||||
|
||||
|
||||
// Fill actions list
|
||||
filteraction.GeneralizedCategories = General.Map.Config.GenActionCategories;
|
||||
filteraction.AddInfo(General.Map.Config.SortedLinedefActions.ToArray());
|
||||
|
||||
// Initialize custom fields editor
|
||||
fieldslist.ListNoFixedFields();
|
||||
fieldslist.Setup("thing");
|
||||
|
||||
// Fill checkboxes list
|
||||
foreach(KeyValuePair<string, string> flag in General.Map.Config.ThingFlags)
|
||||
{
|
||||
|
@ -70,19 +84,30 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
// Make a copy (we don't want to modify the filters until OK is clicked)
|
||||
ThingsFilter nf = new ThingsFilter(f);
|
||||
|
||||
|
||||
// Make item in list
|
||||
ListViewItem item = new ListViewItem(nf.Name);
|
||||
item.Tag = nf;
|
||||
listfilters.Items.Add(item);
|
||||
|
||||
|
||||
// Select item if this is the current filter
|
||||
if(General.Map.ThingsFilter == f) item.Selected = true;
|
||||
}
|
||||
|
||||
|
||||
// Sort the list
|
||||
listfilters.Sort();
|
||||
|
||||
|
||||
// Map format specific fields
|
||||
filterzheight.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
labelzheight.Visible = General.Map.FormatInterface.HasThingHeight;
|
||||
argumentspanel.Visible = General.Map.FormatInterface.HasActionArgs;
|
||||
labeltag.Visible = General.Map.FormatInterface.HasThingTag;
|
||||
filtertag.Visible = General.Map.FormatInterface.HasThingTag;
|
||||
if(!General.Map.FormatInterface.HasCustomFields)
|
||||
tabs.TabPages.Remove(tabcustom);
|
||||
if(!General.Map.FormatInterface.HasThingAction && !General.Map.FormatInterface.HasThingTag)
|
||||
tabs.TabPages.Remove(tabaction);
|
||||
|
||||
// Done
|
||||
settingup = false;
|
||||
}
|
||||
|
@ -156,11 +181,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
settingup = true;
|
||||
deletefilter.Enabled = true;
|
||||
filtergroup.Enabled = true;
|
||||
|
||||
|
||||
// Show name
|
||||
filtername.Text = f.Name;
|
||||
|
||||
// Show category
|
||||
// Properties
|
||||
foreach(object c in filtercategory.Items)
|
||||
{
|
||||
ThingCategory tc = (c as ThingCategory);
|
||||
|
@ -168,7 +193,39 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
if(filtercategory.SelectedIndex == -1) filtercategory.SelectedIndex = 0;
|
||||
|
||||
// Show fields
|
||||
if(f.ThingType > -1)
|
||||
filtertype.Value = f.ThingType;
|
||||
else
|
||||
filtertype.Empty = true;
|
||||
|
||||
if(f.ThingAngle > -1)
|
||||
filterangle.Text = f.ThingAngle.ToString();
|
||||
else
|
||||
filterangle.Text = "";
|
||||
|
||||
if(f.ThingZHeight > int.MinValue)
|
||||
filterzheight.Text = f.ThingZHeight.ToString();
|
||||
else
|
||||
filterzheight.Text = "";
|
||||
|
||||
// Action
|
||||
if(f.ThingAction > -1)
|
||||
filteraction.Value = f.ThingAction;
|
||||
else
|
||||
filteraction.Empty = true;
|
||||
|
||||
if(f.ThingArgs[0] > -1) arg0.SetValue(f.ThingArgs[0]); else arg0.ClearValue();
|
||||
if(f.ThingArgs[1] > -1) arg1.SetValue(f.ThingArgs[1]); else arg1.ClearValue();
|
||||
if(f.ThingArgs[2] > -1) arg2.SetValue(f.ThingArgs[2]); else arg2.ClearValue();
|
||||
if(f.ThingArgs[3] > -1) arg3.SetValue(f.ThingArgs[3]); else arg3.ClearValue();
|
||||
if(f.ThingArgs[4] > -1) arg4.SetValue(f.ThingArgs[4]); else arg4.ClearValue();
|
||||
|
||||
if(f.ThingTag > -1)
|
||||
filtertag.Text = f.ThingTag.ToString();
|
||||
else
|
||||
filtertag.Text = "";
|
||||
|
||||
// Flags
|
||||
foreach(CheckBox b in filterfields.Checkboxes)
|
||||
{
|
||||
// Field name forbidden?
|
||||
|
@ -186,7 +243,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
b.CheckState = CheckState.Indeterminate;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Custom fields
|
||||
fieldslist.ClearFields();
|
||||
fieldslist.Setup("thing");
|
||||
fieldslist.SetValues(f.ThingCustomFields, true);
|
||||
|
||||
// Done
|
||||
settingup = false;
|
||||
}
|
||||
|
@ -291,6 +353,140 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
}
|
||||
|
||||
private void filtertype_ValueChanges(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
if(filtertype.Empty)
|
||||
f.ThingType = -1;
|
||||
else
|
||||
f.ThingType = filtertype.GetValue();
|
||||
}
|
||||
}
|
||||
|
||||
private void browsetype_Click(object sender, EventArgs e)
|
||||
{
|
||||
filtertype.Value = ThingBrowserForm.BrowseThing(this, filtertype.Value);
|
||||
}
|
||||
|
||||
private void filterangle_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
f.ThingAngle = filterangle.GetResult(-1);
|
||||
}
|
||||
}
|
||||
|
||||
private void browseangle_Click(object sender, EventArgs e)
|
||||
{
|
||||
AngleForm af = new AngleForm();
|
||||
af.Setup(filterangle.GetResult(-1));
|
||||
if(af.ShowDialog() == DialogResult.OK)
|
||||
filterangle.Text = af.Value.ToString();
|
||||
}
|
||||
|
||||
private void filterzheight_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
f.ThingZHeight = filterzheight.GetResult(int.MinValue);
|
||||
}
|
||||
}
|
||||
|
||||
private void filteraction_ValueChanges(object sender, EventArgs e)
|
||||
{
|
||||
int showaction = 0;
|
||||
ArgumentInfo[] arginfo;
|
||||
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
if(filteraction.Empty)
|
||||
f.ThingAction = -1;
|
||||
else
|
||||
f.ThingAction = filteraction.GetValue();
|
||||
}
|
||||
|
||||
// Only when line type is known, otherwise use the thing arguments
|
||||
if(General.Map.Config.LinedefActions.ContainsKey(filteraction.Value)) showaction = filteraction.Value;
|
||||
arginfo = General.Map.Config.LinedefActions[showaction].Args;
|
||||
|
||||
// Change the argument descriptions
|
||||
arg0label.Text = arginfo[0].Title + ":";
|
||||
arg1label.Text = arginfo[1].Title + ":";
|
||||
arg2label.Text = arginfo[2].Title + ":";
|
||||
arg3label.Text = arginfo[3].Title + ":";
|
||||
arg4label.Text = arginfo[4].Title + ":";
|
||||
arg0label.Enabled = arginfo[0].Used;
|
||||
arg1label.Enabled = arginfo[1].Used;
|
||||
arg2label.Enabled = arginfo[2].Used;
|
||||
arg3label.Enabled = arginfo[3].Used;
|
||||
arg4label.Enabled = arginfo[4].Used;
|
||||
if(arg0label.Enabled) arg0.ForeColor = SystemColors.WindowText; else arg0.ForeColor = SystemColors.GrayText;
|
||||
if(arg1label.Enabled) arg1.ForeColor = SystemColors.WindowText; else arg1.ForeColor = SystemColors.GrayText;
|
||||
if(arg2label.Enabled) arg2.ForeColor = SystemColors.WindowText; else arg2.ForeColor = SystemColors.GrayText;
|
||||
if(arg3label.Enabled) arg3.ForeColor = SystemColors.WindowText; else arg3.ForeColor = SystemColors.GrayText;
|
||||
if(arg4label.Enabled) arg4.ForeColor = SystemColors.WindowText; else arg4.ForeColor = SystemColors.GrayText;
|
||||
arg0.Setup(arginfo[0]);
|
||||
arg1.Setup(arginfo[1]);
|
||||
arg2.Setup(arginfo[2]);
|
||||
arg3.Setup(arginfo[3]);
|
||||
arg4.Setup(arginfo[4]);
|
||||
}
|
||||
|
||||
private void browseaction_Click(object sender, EventArgs e)
|
||||
{
|
||||
filteraction.Value = ActionBrowserForm.BrowseAction(this, filteraction.Value);
|
||||
}
|
||||
|
||||
private void filtertag_WhenTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
f.ThingTag = filtertag.GetResult(-1);
|
||||
}
|
||||
}
|
||||
|
||||
private void arg_Validated(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
|
||||
int index;
|
||||
int.TryParse((sender as Control).Tag.ToString(), out index);
|
||||
ArgumentBox filterarg = (sender as ArgumentBox);
|
||||
f.ThingArgs[index] = filterarg.GetResult(-1);
|
||||
}
|
||||
}
|
||||
|
||||
private void fieldslist_Validated(object sender, EventArgs e)
|
||||
{
|
||||
// Anything selected?
|
||||
if(listfilters.SelectedItems.Count > 0)
|
||||
{
|
||||
// Get selected filter
|
||||
ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter;
|
||||
fieldslist.Apply(f.ThingCustomFields);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -129,10 +129,37 @@
|
|||
<metadata name="filtergroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filterfields.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="tabbasic.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelzheight.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filterzheight.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browseangle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filterangle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filtertype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browsetype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filtercategory.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
@ -141,6 +168,75 @@
|
|||
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabflags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filterfields.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabaction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="argumentspanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label8.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg0.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg1label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg0label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg3label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg2label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="arg4label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filteraction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browseaction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filtertag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labeltag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="filtername.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
|
@ -243,6 +243,7 @@
|
|||
<Compile Include="ErrorChecks\ResultTextureMissing.cs" />
|
||||
<Compile Include="ErrorChecks\ResultUnknownFlat.cs" />
|
||||
<Compile Include="ErrorChecks\ResultUnknownTexture.cs" />
|
||||
<Compile Include="FindReplace\FindThingAngle.cs" />
|
||||
<Compile Include="FindReplace\FindAnyTextureFlat.cs" />
|
||||
<Compile Include="FindReplace\FindThingSectorRef.cs" />
|
||||
<Compile Include="FindReplace\FindThingTag.cs" />
|
||||
|
@ -294,6 +295,21 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\PasteProperties.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Angle.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ColorPick.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\List.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\List_Images.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Text.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -49,7 +49,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List_Images; } }
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#region ================== Properties
|
||||
|
||||
public FindReplaceAttribute Attributes { get { return attribs; } }
|
||||
public virtual Image BrowseImage { get { return null; } }
|
||||
public bool AllowDelete { get { return false; } }
|
||||
public virtual Presentation RenderPresentation { get { return Presentation.Standard; } }
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List_Images; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#region ================== Properties
|
||||
|
||||
public override Presentation RenderPresentation { get { return Presentation.Things; } }
|
||||
public override Image BrowseImage { get { return Properties.Resources.List; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
165
Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs
Normal file
165
Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs
Normal file
|
@ -0,0 +1,165 @@
|
|||
|
||||
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
||||
* This program is released under GNU General Public License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Drawing;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
[FindReplace("Thing Angle", BrowseButton = true)]
|
||||
internal class FindThingAngle : FindReplaceType
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public override Presentation RenderPresentation { get { return Presentation.Things; } }
|
||||
public override Image BrowseImage { get { return Properties.Resources.Angle; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
||||
// Constructor
|
||||
public FindThingAngle()
|
||||
{
|
||||
// Initialize
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
~FindThingAngle()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This is called when the browse button is pressed
|
||||
public override string Browse(string initialvalue)
|
||||
{
|
||||
int initangle;
|
||||
int.TryParse(initialvalue, out initangle);
|
||||
return AngleForm.ShowDialog(Form.ActiveForm, initangle).ToString();
|
||||
}
|
||||
|
||||
|
||||
// This is called to perform a search (and replace)
|
||||
// Returns a list of items to show in the results list
|
||||
// replacewith is null when not replacing
|
||||
public override FindReplaceObject[] Find(string value, bool withinselection, string replacewith, bool keepselection)
|
||||
{
|
||||
List<FindReplaceObject> objs = new List<FindReplaceObject>();
|
||||
|
||||
// Interpret the replacement
|
||||
int replaceangle = 0;
|
||||
if(replacewith != null)
|
||||
{
|
||||
// If it cannot be interpreted, set replacewith to null (not replacing at all)
|
||||
if(!int.TryParse(replacewith, out replaceangle)) replacewith = null;
|
||||
if(replacewith == null)
|
||||
{
|
||||
MessageBox.Show("Invalid replace value for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return objs.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
// Interpret the number given
|
||||
int angle = 0;
|
||||
if(int.TryParse(value, out angle))
|
||||
{
|
||||
// Where to search?
|
||||
ICollection<Thing> list = withinselection ? General.Map.Map.GetSelectedThings(true) : General.Map.Map.Things;
|
||||
|
||||
// Go for all things
|
||||
foreach(Thing t in list)
|
||||
{
|
||||
// Match?
|
||||
if(Angle2D.RealToDoom(t.Angle) == angle)
|
||||
{
|
||||
// Replace
|
||||
if(replacewith != null) t.Rotate(Angle2D.DoomToReal(replaceangle));
|
||||
|
||||
// Add to list
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
|
||||
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objs.ToArray();
|
||||
}
|
||||
|
||||
// This is called when a specific object is selected from the list
|
||||
public override void ObjectSelected(FindReplaceObject[] selection)
|
||||
{
|
||||
if(selection.Length == 1)
|
||||
{
|
||||
ZoomToSelection(selection);
|
||||
General.Interface.ShowThingInfo(selection[0].Thing);
|
||||
}
|
||||
else
|
||||
General.Interface.HideInfo();
|
||||
|
||||
General.Map.Map.ClearAllSelected();
|
||||
foreach(FindReplaceObject obj in selection) obj.Thing.Selected = true;
|
||||
}
|
||||
|
||||
// Render selection
|
||||
public override void RenderThingsSelection(IRenderer2D renderer, FindReplaceObject[] selection)
|
||||
{
|
||||
foreach(FindReplaceObject o in selection)
|
||||
{
|
||||
renderer.RenderThing(o.Thing, General.Colors.Selection, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
// Edit objects
|
||||
public override void EditObjects(FindReplaceObject[] selection)
|
||||
{
|
||||
List<Thing> things = new List<Thing>(selection.Length);
|
||||
foreach(FindReplaceObject o in selection) things.Add(o.Thing);
|
||||
General.Interface.ShowEditThings(things);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -51,7 +51,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#region ================== Properties
|
||||
|
||||
public override Presentation RenderPresentation { get { return Presentation.Things; } }
|
||||
|
||||
public override Image BrowseImage { get { return Properties.Resources.List; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
|
|
@ -101,10 +101,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//
|
||||
this.browsefind.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browsefind.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.treeview;
|
||||
this.browsefind.Location = new System.Drawing.Point(212, 47);
|
||||
this.browsefind.Location = new System.Drawing.Point(212, 46);
|
||||
this.browsefind.Name = "browsefind";
|
||||
this.browsefind.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browsefind.Size = new System.Drawing.Size(27, 23);
|
||||
this.browsefind.Size = new System.Drawing.Size(28, 25);
|
||||
this.browsefind.TabIndex = 2;
|
||||
this.browsefind.UseVisualStyleBackColor = true;
|
||||
this.browsefind.Click += new System.EventHandler(this.browsefind_Click);
|
||||
|
@ -123,10 +123,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//
|
||||
this.browsereplace.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browsereplace.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.treeview;
|
||||
this.browsereplace.Location = new System.Drawing.Point(203, 24);
|
||||
this.browsereplace.Location = new System.Drawing.Point(203, 23);
|
||||
this.browsereplace.Name = "browsereplace";
|
||||
this.browsereplace.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browsereplace.Size = new System.Drawing.Size(27, 23);
|
||||
this.browsereplace.Size = new System.Drawing.Size(28, 25);
|
||||
this.browsereplace.TabIndex = 1;
|
||||
this.browsereplace.UseVisualStyleBackColor = true;
|
||||
this.browsereplace.Click += new System.EventHandler(this.browsereplace_Click);
|
||||
|
|
|
@ -130,7 +130,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Now setup the interface
|
||||
browsefind.Enabled = newfinder.Attributes.BrowseButton;
|
||||
browsefind.Image = newfinder.BrowseImage;
|
||||
browsereplace.Enabled = newfinder.Attributes.BrowseButton;
|
||||
browsereplace.Image = newfinder.BrowseImage;
|
||||
if(!newfinder.Attributes.Replacable) doreplace.Checked = false;
|
||||
doreplace.Enabled = newfinder.Attributes.Replacable;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3615
|
||||
// Runtime Version:2.0.50727.4206
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -60,6 +60,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Angle {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Angle", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap BrightnessGradient {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("BrightnessGradient", resourceCulture);
|
||||
|
@ -74,6 +81,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ColorPick {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ColorPick", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap CopyProperties {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CopyProperties", resourceCulture);
|
||||
|
@ -109,6 +123,20 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap List {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("List", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap List_Images {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("List_Images", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap PasteProperties {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PasteProperties", resourceCulture);
|
||||
|
@ -116,6 +144,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Text {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Text", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap treeview {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("treeview", resourceCulture);
|
||||
|
|
|
@ -148,4 +148,19 @@
|
|||
<data name="PasteProperties" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PasteProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Angle.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">
|
||||
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="List" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\List.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="List_Images" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\List_Images.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Source/Plugins/BuilderModes/Resources/Angle.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/Angle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 303 B |
BIN
Source/Plugins/BuilderModes/Resources/ColorPick.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/ColorPick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
Source/Plugins/BuilderModes/Resources/List.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/List.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 473 B |
BIN
Source/Plugins/BuilderModes/Resources/List_Images.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/List_Images.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 510 B |
BIN
Source/Plugins/BuilderModes/Resources/Text.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/Text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 595 B |
Binary file not shown.
Loading…
Reference in a new issue