mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Added options for pasting and inserting prefabs
This commit is contained in:
parent
efb7e4a43a
commit
ee8d88c3dc
25 changed files with 1063 additions and 162 deletions
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{818B3D10-F791-4C3F-9AF5-BB2D0079B63C}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
|
@ -660,6 +660,13 @@
|
|||
<None Include="Resources\Close.png" />
|
||||
<Compile Include="Config\AllTexturesSet.cs" />
|
||||
<Compile Include="Config\FlagTranslation.cs" />
|
||||
<Compile Include="Config\PasteOptions.cs" />
|
||||
<Compile Include="Controls\PasteOptionsControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\PasteOptionsControl.Designer.cs">
|
||||
<DependentUpon>PasteOptionsControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ThingBrowserControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -722,6 +729,10 @@
|
|||
<Compile Include="ZDoom\DecorateParser.cs" />
|
||||
<Compile Include="ZDoom\StateStructure.cs" />
|
||||
<Compile Include="Editing\EditingManager.cs" />
|
||||
<EmbeddedResource Include="Controls\PasteOptionsControl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>PasteOptionsControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ThingBrowserControl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ThingBrowserControl.cs</DependentUpon>
|
||||
|
|
104
Source/Core/Config/PasteOptions.cs
Normal file
104
Source/Core/Config/PasteOptions.cs
Normal file
|
@ -0,0 +1,104 @@
|
|||
|
||||
#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 CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Compilers;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public class PasteOptions
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
public const int TAGS_KEEP = 0;
|
||||
public const int TAGS_RENUMBER = 1;
|
||||
public const int TAGS_REMOVE = 2;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
private int changetags; // See TAGS_ constants
|
||||
private bool removeactions;
|
||||
private bool adjustheights;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public int ChangeTags { get { return changetags; } set { changetags = value; } }
|
||||
public bool RemoveActions { get { return removeactions; } set { removeactions = value; } }
|
||||
public bool AdjustHeights { get { return adjustheights; } set { adjustheights = value; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
public PasteOptions()
|
||||
{
|
||||
}
|
||||
|
||||
// Copy Constructor
|
||||
public PasteOptions(PasteOptions p)
|
||||
{
|
||||
this.changetags = p.changetags;
|
||||
this.removeactions = p.removeactions;
|
||||
this.adjustheights = p.adjustheights;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// Make a copy
|
||||
public PasteOptions Copy()
|
||||
{
|
||||
return new PasteOptions(this);
|
||||
}
|
||||
|
||||
// This reads from configuration
|
||||
internal void ReadConfiguration(Configuration cfg, string path)
|
||||
{
|
||||
changetags = cfg.ReadSetting(path + ".changetags", 0);
|
||||
removeactions = cfg.ReadSetting(path + ".removeactions", false);
|
||||
adjustheights = cfg.ReadSetting(path + ".adjustheights", true);
|
||||
}
|
||||
|
||||
// This writes to configuration
|
||||
internal void WriteConfiguration(Configuration cfg, string path)
|
||||
{
|
||||
cfg.WriteSetting(path + ".changetags", changetags);
|
||||
cfg.WriteSetting(path + ".removeactions", removeactions);
|
||||
cfg.WriteSetting(path + ".adjustheights", adjustheights);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -78,6 +78,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private bool showerrorswindow;
|
||||
private bool animatevisualselection;
|
||||
private int previousversion;
|
||||
private PasteOptions pasteoptions;
|
||||
|
||||
// These are not stored in the configuration, only used at runtime
|
||||
private string defaulttexture;
|
||||
|
@ -125,6 +126,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public int ScriptTabWidth { get { return scripttabwidth; } internal set { scripttabwidth = value; } }
|
||||
public bool ScriptAutoIndent { get { return scriptautoindent; } internal set { scriptautoindent = value; } }
|
||||
internal int PreviousVersion { get { return previousversion; } }
|
||||
internal PasteOptions PasteOptions { get { return pasteoptions; } set { pasteoptions = value; } }
|
||||
|
||||
public string DefaultTexture { get { return defaulttexture; } set { defaulttexture = value; } }
|
||||
public string DefaultFloorTexture { get { return defaultfloortexture; } set { defaultfloortexture = value; } }
|
||||
|
@ -145,6 +147,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
defaultthingflags = new List<string>();
|
||||
pasteoptions = new PasteOptions();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -188,6 +191,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
showerrorswindow = cfg.ReadSetting("showerrorswindow", true);
|
||||
animatevisualselection = cfg.ReadSetting("animatevisualselection", true);
|
||||
previousversion = cfg.ReadSetting("currentversion", 0);
|
||||
pasteoptions.ReadConfiguration(cfg, "pasteoptions");
|
||||
|
||||
// Success
|
||||
return true;
|
||||
|
@ -234,6 +238,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
cfg.WriteSetting("showerrorswindow", showerrorswindow);
|
||||
cfg.WriteSetting("animatevisualselection", animatevisualselection);
|
||||
cfg.WriteSetting("currentversion", v.Major * 1000000 + v.Revision);
|
||||
pasteoptions.WriteConfiguration(cfg, "pasteoptions");
|
||||
|
||||
// Save settings configuration
|
||||
General.WriteLogLine("Saving program configuration...");
|
||||
|
|
148
Source/Core/Controls/PasteOptionsControl.Designer.cs
generated
Normal file
148
Source/Core/Controls/PasteOptionsControl.Designer.cs
generated
Normal file
|
@ -0,0 +1,148 @@
|
|||
namespace CodeImp.DoomBuilder.Controls
|
||||
{
|
||||
partial class PasteOptionsControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.sectorheightsgroup = new System.Windows.Forms.GroupBox();
|
||||
this.adjustheights = new System.Windows.Forms.CheckBox();
|
||||
this.tagsgroup = new System.Windows.Forms.GroupBox();
|
||||
this.removeactions = new System.Windows.Forms.CheckBox();
|
||||
this.removetags = new System.Windows.Forms.RadioButton();
|
||||
this.renumbertags = new System.Windows.Forms.RadioButton();
|
||||
this.keeptags = new System.Windows.Forms.RadioButton();
|
||||
this.sectorheightsgroup.SuspendLayout();
|
||||
this.tagsgroup.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sectorheightsgroup
|
||||
//
|
||||
this.sectorheightsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.sectorheightsgroup.Controls.Add(this.adjustheights);
|
||||
this.sectorheightsgroup.Location = new System.Drawing.Point(0, 164);
|
||||
this.sectorheightsgroup.Name = "sectorheightsgroup";
|
||||
this.sectorheightsgroup.Size = new System.Drawing.Size(443, 83);
|
||||
this.sectorheightsgroup.TabIndex = 3;
|
||||
this.sectorheightsgroup.TabStop = false;
|
||||
this.sectorheightsgroup.Text = " Floor and Ceiling heights ";
|
||||
//
|
||||
// adjustheights
|
||||
//
|
||||
this.adjustheights.AutoSize = true;
|
||||
this.adjustheights.Location = new System.Drawing.Point(30, 39);
|
||||
this.adjustheights.Name = "adjustheights";
|
||||
this.adjustheights.Size = new System.Drawing.Size(292, 17);
|
||||
this.adjustheights.TabIndex = 0;
|
||||
this.adjustheights.Text = "Adjust heights to match relatively with surrounding sector";
|
||||
this.adjustheights.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tagsgroup
|
||||
//
|
||||
this.tagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tagsgroup.Controls.Add(this.removeactions);
|
||||
this.tagsgroup.Controls.Add(this.removetags);
|
||||
this.tagsgroup.Controls.Add(this.renumbertags);
|
||||
this.tagsgroup.Controls.Add(this.keeptags);
|
||||
this.tagsgroup.Location = new System.Drawing.Point(0, 0);
|
||||
this.tagsgroup.Name = "tagsgroup";
|
||||
this.tagsgroup.Size = new System.Drawing.Size(443, 158);
|
||||
this.tagsgroup.TabIndex = 2;
|
||||
this.tagsgroup.TabStop = false;
|
||||
this.tagsgroup.Text = " Tags and Actions ";
|
||||
//
|
||||
// removeactions
|
||||
//
|
||||
this.removeactions.AutoSize = true;
|
||||
this.removeactions.Location = new System.Drawing.Point(30, 117);
|
||||
this.removeactions.Name = "removeactions";
|
||||
this.removeactions.Size = new System.Drawing.Size(116, 17);
|
||||
this.removeactions.TabIndex = 3;
|
||||
this.removeactions.Text = "Remove all actions";
|
||||
this.removeactions.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// removetags
|
||||
//
|
||||
this.removetags.AutoSize = true;
|
||||
this.removetags.Location = new System.Drawing.Point(30, 81);
|
||||
this.removetags.Name = "removetags";
|
||||
this.removetags.Size = new System.Drawing.Size(101, 17);
|
||||
this.removetags.TabIndex = 2;
|
||||
this.removetags.TabStop = true;
|
||||
this.removetags.Text = "Remove all tags";
|
||||
this.removetags.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// renumbertags
|
||||
//
|
||||
this.renumbertags.AutoSize = true;
|
||||
this.renumbertags.Location = new System.Drawing.Point(30, 57);
|
||||
this.renumbertags.Name = "renumbertags";
|
||||
this.renumbertags.Size = new System.Drawing.Size(271, 17);
|
||||
this.renumbertags.TabIndex = 1;
|
||||
this.renumbertags.TabStop = true;
|
||||
this.renumbertags.Text = "Renumber tags to resolve conflicts with existing tags";
|
||||
this.renumbertags.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// keeptags
|
||||
//
|
||||
this.keeptags.AutoSize = true;
|
||||
this.keeptags.Location = new System.Drawing.Point(30, 33);
|
||||
this.keeptags.Name = "keeptags";
|
||||
this.keeptags.Size = new System.Drawing.Size(217, 17);
|
||||
this.keeptags.TabIndex = 0;
|
||||
this.keeptags.TabStop = true;
|
||||
this.keeptags.Text = "Keep tags the same as they were copied";
|
||||
this.keeptags.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PasteOptionsControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.Controls.Add(this.sectorheightsgroup);
|
||||
this.Controls.Add(this.tagsgroup);
|
||||
this.Name = "PasteOptionsControl";
|
||||
this.Size = new System.Drawing.Size(443, 282);
|
||||
this.sectorheightsgroup.ResumeLayout(false);
|
||||
this.sectorheightsgroup.PerformLayout();
|
||||
this.tagsgroup.ResumeLayout(false);
|
||||
this.tagsgroup.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox sectorheightsgroup;
|
||||
private System.Windows.Forms.CheckBox adjustheights;
|
||||
private System.Windows.Forms.GroupBox tagsgroup;
|
||||
private System.Windows.Forms.CheckBox removeactions;
|
||||
private System.Windows.Forms.RadioButton removetags;
|
||||
private System.Windows.Forms.RadioButton renumbertags;
|
||||
private System.Windows.Forms.RadioButton keeptags;
|
||||
}
|
||||
}
|
87
Source/Core/Controls/PasteOptionsControl.cs
Normal file
87
Source/Core/Controls/PasteOptionsControl.cs
Normal file
|
@ -0,0 +1,87 @@
|
|||
|
||||
#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.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Controls
|
||||
{
|
||||
public partial class PasteOptionsControl : UserControl
|
||||
{
|
||||
#region ================== Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor
|
||||
|
||||
// Constructor
|
||||
public PasteOptionsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This sets the options from the given PasteOptions
|
||||
public void Setup(PasteOptions options)
|
||||
{
|
||||
// Setup controls
|
||||
keeptags.Checked = (options.ChangeTags == 0);
|
||||
renumbertags.Checked = (options.ChangeTags == 1);
|
||||
removetags.Checked = (options.ChangeTags == 2);
|
||||
removeactions.Checked = options.RemoveActions;
|
||||
adjustheights.Checked = options.AdjustHeights;
|
||||
}
|
||||
|
||||
// This returns the options as set by the user
|
||||
public PasteOptions GetOptions()
|
||||
{
|
||||
PasteOptions options = new PasteOptions();
|
||||
|
||||
// Collect settings
|
||||
if(keeptags.Checked)
|
||||
options.ChangeTags = 0;
|
||||
else if(renumbertags.Checked)
|
||||
options.ChangeTags = 1;
|
||||
else if(removetags.Checked)
|
||||
options.ChangeTags = 2;
|
||||
options.RemoveActions = removeactions.Checked;
|
||||
options.AdjustHeights = adjustheights.Checked;
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
144
Source/Core/Controls/PasteOptionsControl.resx
Normal file
144
Source/Core/Controls/PasteOptionsControl.resx
Normal file
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="sectorheightsgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="adjustheights.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tagsgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="removeactions.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="removetags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="renumbertags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="keeptags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -31,6 +31,8 @@ using CodeImp.DoomBuilder.Rendering;
|
|||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using ICSharpCode.SharpZipLib.BZip2;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -135,7 +137,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
|
||||
// This pastes a prefab. Returns false when paste was cancelled.
|
||||
internal void PastePrefab(Stream filedata)
|
||||
internal void PastePrefab(Stream filedata, PasteOptions options)
|
||||
{
|
||||
// Create undo
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Inserted prefab.");
|
||||
|
@ -164,12 +166,17 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Convert UDMF fields back to flags and activations, if needed
|
||||
if(!(General.Map.FormatInterface is UniversalMapSetIO)) General.Map.Map.TranslateFromUDMF();
|
||||
|
||||
// Modify tags and actions if preferred
|
||||
if(options.ChangeTags == PasteOptions.TAGS_REMOVE) Tools.RemoveMarkedTags();
|
||||
if(options.ChangeTags == PasteOptions.TAGS_RENUMBER) Tools.RenumberMarkedTags();
|
||||
if(options.RemoveActions) Tools.RemoveMarkedActions();
|
||||
|
||||
// Done
|
||||
memstream.Dispose();
|
||||
General.Map.Map.UpdateConfiguration();
|
||||
General.Map.ThingsFilter.Update();
|
||||
General.Editing.Mode.OnPasteEnd();
|
||||
General.Plugins.OnPasteEnd();
|
||||
General.Editing.Mode.OnPasteEnd(options);
|
||||
General.Plugins.OnPasteEnd(options);
|
||||
}
|
||||
|
||||
// This performs the copy. Returns false when copy was cancelled.
|
||||
|
@ -214,7 +221,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
|
||||
// This performs the paste. Returns false when paste was cancelled.
|
||||
private bool DoPasteSelection()
|
||||
private bool DoPasteSelection(PasteOptions options)
|
||||
{
|
||||
// Anything to paste?
|
||||
if(Clipboard.ContainsData(CLIPBOARD_DATA_FORMAT))
|
||||
|
@ -223,10 +230,10 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
General.DisengageVolatileMode();
|
||||
|
||||
// Let the plugins know
|
||||
if(General.Plugins.OnPasteBegin())
|
||||
if(General.Plugins.OnPasteBegin(options))
|
||||
{
|
||||
// Ask the editing mode to prepare selection for pasting.
|
||||
if(General.Editing.Mode.OnPasteBegin())
|
||||
if(General.Editing.Mode.OnPasteBegin(options.Copy()))
|
||||
{
|
||||
// Create undo
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Pasted selected elements.");
|
||||
|
@ -252,12 +259,17 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Convert UDMF fields back to flags and activations, if needed
|
||||
if(!(General.Map.FormatInterface is UniversalMapSetIO)) General.Map.Map.TranslateFromUDMF();
|
||||
|
||||
// Modify tags and actions if preferred
|
||||
if(options.ChangeTags == PasteOptions.TAGS_REMOVE) Tools.RemoveMarkedTags();
|
||||
if(options.ChangeTags == PasteOptions.TAGS_RENUMBER) Tools.RenumberMarkedTags();
|
||||
if(options.RemoveActions) Tools.RemoveMarkedActions();
|
||||
|
||||
// Done
|
||||
memstream.Dispose();
|
||||
General.Map.Map.UpdateConfiguration();
|
||||
General.Map.ThingsFilter.Update();
|
||||
General.Editing.Mode.OnPasteEnd();
|
||||
General.Plugins.OnPasteEnd();
|
||||
General.Editing.Mode.OnPasteEnd(options.Copy());
|
||||
General.Plugins.OnPasteEnd(options);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -307,11 +319,21 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
}
|
||||
|
||||
// This pastes what is on the clipboard and marks the new geometry
|
||||
[BeginAction("pasteselectionspecial")]
|
||||
public void PasteSelectionSpecial()
|
||||
{
|
||||
PasteOptionsForm form = new PasteOptionsForm();
|
||||
DialogResult result = form.ShowDialog(General.MainWindow);
|
||||
if(result == DialogResult.OK) DoPasteSelection(form.Options);
|
||||
form.Dispose();
|
||||
}
|
||||
|
||||
// This pastes what is on the clipboard and marks the new geometry
|
||||
[BeginAction("pasteselection")]
|
||||
public void PasteSelection()
|
||||
{
|
||||
DoPasteSelection();
|
||||
DoPasteSelection(General.Settings.PasteOptions);
|
||||
}
|
||||
|
||||
// This creates a new prefab from selection
|
||||
|
@ -366,14 +388,16 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
[BeginAction("insertprefabfile")]
|
||||
public void InsertPrefabFile()
|
||||
{
|
||||
PasteOptions options = General.Settings.PasteOptions.Copy();
|
||||
|
||||
// Cancel volatile mode
|
||||
General.DisengageVolatileMode();
|
||||
|
||||
// Let the plugins know
|
||||
if(General.Plugins.OnPasteBegin())
|
||||
if(General.Plugins.OnPasteBegin(options))
|
||||
{
|
||||
// Ask the editing mode to prepare selection for pasting.
|
||||
if(General.Editing.Mode.OnPasteBegin())
|
||||
if(General.Editing.Mode.OnPasteBegin(options))
|
||||
{
|
||||
Cursor oldcursor = Cursor.Current;
|
||||
|
||||
|
@ -403,7 +427,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
if(stream != null)
|
||||
{
|
||||
PastePrefab(stream);
|
||||
PastePrefab(stream, options);
|
||||
lastprefabfile = openfile.FileName;
|
||||
}
|
||||
General.MainWindow.UpdateInterface();
|
||||
|
@ -419,6 +443,8 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
[BeginAction("insertpreviousprefab")]
|
||||
public void InsertPreviousPrefab()
|
||||
{
|
||||
PasteOptions options = General.Settings.PasteOptions.Copy();
|
||||
|
||||
// Is there a previously inserted prefab?
|
||||
if(IsPreviousPrefabAvailable)
|
||||
{
|
||||
|
@ -429,10 +455,10 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
General.DisengageVolatileMode();
|
||||
|
||||
// Let the plugins know
|
||||
if(General.Plugins.OnPasteBegin())
|
||||
if(General.Plugins.OnPasteBegin(options))
|
||||
{
|
||||
// Ask the editing mode to prepare selection for pasting.
|
||||
if(General.Editing.Mode.OnPasteBegin())
|
||||
if(General.Editing.Mode.OnPasteBegin(options))
|
||||
{
|
||||
Cursor oldcursor = Cursor.Current;
|
||||
FileStream stream = null;
|
||||
|
@ -450,7 +476,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
General.ShowErrorMessage("Error while reading prefab from file! See log file for error details.", MessageBoxButtons.OK);
|
||||
}
|
||||
|
||||
if(stream != null) PastePrefab(stream);
|
||||
if(stream != null) PastePrefab(stream, options);
|
||||
stream.Dispose();
|
||||
General.MainWindow.UpdateInterface();
|
||||
Cursor.Current = oldcursor;
|
||||
|
|
|
@ -31,6 +31,7 @@ using CodeImp.DoomBuilder.Rendering;
|
|||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -179,10 +180,10 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
public virtual void OnCopyEnd() { }
|
||||
|
||||
// Called before pasting. Return false when paste should be cancelled.
|
||||
public virtual bool OnPasteBegin() { return true; }
|
||||
public virtual bool OnPasteBegin(PasteOptions options) { return true; }
|
||||
|
||||
// Called after new geometry has been pasted in. The new geometry is marked.
|
||||
public virtual void OnPasteEnd() { }
|
||||
public virtual void OnPasteEnd(PasteOptions options) { }
|
||||
|
||||
// Called when undo/redo is used
|
||||
// Return false to cancel undo action
|
||||
|
|
|
@ -29,6 +29,8 @@ using CodeImp.DoomBuilder.Map;
|
|||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using System.Threading;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -1670,5 +1672,85 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Tags and Actions
|
||||
|
||||
/// <summary>
|
||||
/// This removes all tags on the marked geometry.
|
||||
/// </summary>
|
||||
public static void RemoveMarkedTags()
|
||||
{
|
||||
General.Map.Map.ForAllTags<object>(RemoveTagHandler, true, null);
|
||||
}
|
||||
|
||||
// This removes tags
|
||||
private static void RemoveTagHandler(MapElement element, bool actionargument, UniversalType type, ref int value, object obj)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This renumbers all tags on the marked geometry.
|
||||
/// </summary>
|
||||
public static void RenumberMarkedTags()
|
||||
{
|
||||
Dictionary<int, int> tagsmap = new Dictionary<int, int>();
|
||||
|
||||
// Collect the tag numbers used in the marked geometry
|
||||
General.Map.Map.ForAllTags(CollectTagNumbersHandler, true, tagsmap);
|
||||
|
||||
// Get new tags that are unique within unmarked geometry
|
||||
List<int> newtags = General.Map.Map.GetMultipleNewTags(tagsmap.Count, false);
|
||||
|
||||
// Map the old tags with the new tags
|
||||
int index = 0;
|
||||
List<int> oldkeys = new List<int>(tagsmap.Keys);
|
||||
foreach(int ot in oldkeys) tagsmap[ot] = newtags[index++];
|
||||
|
||||
// Now renumber the old tags with the new ones
|
||||
General.Map.Map.ForAllTags(RenumberTagsHandler, true, tagsmap);
|
||||
}
|
||||
|
||||
// This collects tags in a dictionary
|
||||
private static void CollectTagNumbersHandler(MapElement element, bool actionargument, UniversalType type, ref int value, Dictionary<int, int> tagsmap)
|
||||
{
|
||||
if(value != 0)
|
||||
tagsmap[value] = value;
|
||||
}
|
||||
|
||||
// This remaps tags from a dictionary
|
||||
private static void RenumberTagsHandler(MapElement element, bool actionargument, UniversalType type, ref int value, Dictionary<int, int> tagsmap)
|
||||
{
|
||||
if(value != 0)
|
||||
value = tagsmap[value];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This removes all actions on the marked geometry.
|
||||
/// </summary>
|
||||
public static void RemoveMarkedActions()
|
||||
{
|
||||
// Remove actions from things
|
||||
foreach(Thing t in General.Map.Map.Things)
|
||||
{
|
||||
if(t.Marked)
|
||||
{
|
||||
t.Action = 0;
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++) t.Args[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove actions from linedefs
|
||||
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||
{
|
||||
if(l.Marked)
|
||||
{
|
||||
l.Action = 0;
|
||||
for(int i = 0; i < Linedef.NUM_ARGS; i++) l.Args[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ using CodeImp.DoomBuilder.Editing;
|
|||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Types;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -54,6 +55,9 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// conflict with any other valid UDMF field.
|
||||
internal const string VIRTUAL_SECTOR_FIELD = "!virtual_sector";
|
||||
|
||||
// Handler for tag fields
|
||||
public delegate void TagHandler<T>(MapElement element, bool actionargument, UniversalType type, ref int value, T obj);
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
@ -99,6 +103,18 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
/// <summary>Returns the number of selected sectors.</summary>
|
||||
public int SelectedSectorsCount { get { return sel_sectors.Count; } }
|
||||
|
||||
/// <summary>Returns the number of selected linedefs.</summary>
|
||||
public int SelectedLinedefsCount { get { return sel_linedefs.Count; } }
|
||||
|
||||
/// <summary>Returns the number of selected vertices.</summary>
|
||||
public int SelectedVerticessCount { get { return sel_vertices.Count; } }
|
||||
|
||||
/// <summary>Returns the number of selected things.</summary>
|
||||
public int SelectedThingsCount { get { return sel_things.Count; } }
|
||||
|
||||
/// <summary>Returns a reference to the list of all vertices.</summary>
|
||||
public ICollection<Vertex> Vertices { get { if(freezearrays == 0) return vertices; else return new MapElementCollection<Vertex>(ref vertices, numvertices); } }
|
||||
|
||||
|
@ -2443,25 +2459,162 @@ namespace CodeImp.DoomBuilder.Map
|
|||
public int GetNewTag()
|
||||
{
|
||||
Dictionary<int, bool> usedtags = new Dictionary<int, bool>();
|
||||
|
||||
// Check all sectors
|
||||
foreach(Sector s in sectors) usedtags[s.Tag] = true;
|
||||
|
||||
// Check all lines
|
||||
foreach(Linedef l in linedefs) usedtags[l.Tag] = true;
|
||||
|
||||
// Check all things
|
||||
foreach(Thing t in things) usedtags[t.Tag] = true;
|
||||
ForAllTags(NewTagHandler, false, usedtags);
|
||||
ForAllTags(NewTagHandler, true, usedtags);
|
||||
|
||||
// Now find the first unused index
|
||||
for(int i = 1; i <= General.Map.FormatInterface.MaxTag; i++)
|
||||
if(!usedtags.ContainsKey(i)) return i;
|
||||
|
||||
// Problem: all tags used!
|
||||
// Lets ignore this problem for now, who needs 65-thousand tags?!
|
||||
// All tags used!
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>This returns the next unused tag number within the marked geometry.</summary>
|
||||
public int GetNewTag(bool marked)
|
||||
{
|
||||
Dictionary<int, bool> usedtags = new Dictionary<int, bool>();
|
||||
ForAllTags(NewTagHandler, marked, usedtags);
|
||||
|
||||
// Now find the first unused index
|
||||
for(int i = 1; i <= General.Map.FormatInterface.MaxTag; i++)
|
||||
if(!usedtags.ContainsKey(i)) return i;
|
||||
|
||||
// All tags used!
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>This returns the next unused tag number.</summary>
|
||||
public List<int> GetMultipleNewTags(int count)
|
||||
{
|
||||
List<int> newtags = new List<int>(count);
|
||||
Dictionary<int, bool> usedtags = new Dictionary<int, bool>();
|
||||
ForAllTags(NewTagHandler, false, usedtags);
|
||||
ForAllTags(NewTagHandler, true, usedtags);
|
||||
|
||||
// Find unused tags and add them
|
||||
for(int i = 1; i <= General.Map.FormatInterface.MaxTag; i++)
|
||||
{
|
||||
if(!usedtags.ContainsKey(i))
|
||||
{
|
||||
newtags.Add(i);
|
||||
if(newtags.Count == count) break;
|
||||
}
|
||||
}
|
||||
|
||||
return newtags;
|
||||
}
|
||||
|
||||
/// <summary>This returns the next unused tag number within the marked geometry.</summary>
|
||||
public List<int> GetMultipleNewTags(int count, bool marked)
|
||||
{
|
||||
List<int> newtags = new List<int>(count);
|
||||
Dictionary<int, bool> usedtags = new Dictionary<int, bool>();
|
||||
ForAllTags(NewTagHandler, marked, usedtags);
|
||||
|
||||
// Find unused tags and add them
|
||||
for(int i = 1; i <= General.Map.FormatInterface.MaxTag; i++)
|
||||
{
|
||||
if(!usedtags.ContainsKey(i))
|
||||
{
|
||||
newtags.Add(i);
|
||||
if(newtags.Count == count) break;
|
||||
}
|
||||
}
|
||||
|
||||
return newtags;
|
||||
}
|
||||
|
||||
// Handler for finding a new tag
|
||||
private void NewTagHandler(MapElement element, bool actionargument, UniversalType type, ref int value, Dictionary<int, bool> usedtags)
|
||||
{
|
||||
usedtags[value] = true;
|
||||
}
|
||||
|
||||
/// <summary>This calls a function for all tag fields in the marked or unmarked geometry. The obj parameter can be anything you wish to pass on to your TagHandler function.</summary>
|
||||
public void ForAllTags<T>(TagHandler<T> handler, bool marked, T obj)
|
||||
{
|
||||
// Remove tags from sectors
|
||||
foreach(Sector s in sectors)
|
||||
if(s.Marked == marked)
|
||||
{
|
||||
int tag = s.Tag;
|
||||
handler(s, false, UniversalType.SectorTag, ref tag, obj);
|
||||
if(tag != s.Tag) s.Tag = tag;
|
||||
}
|
||||
|
||||
// Remove tags from things
|
||||
if(General.Map.FormatInterface.HasThingTag)
|
||||
{
|
||||
foreach(Thing t in things)
|
||||
if(t.Marked == marked)
|
||||
{
|
||||
int tag = t.Tag;
|
||||
handler(t, false, UniversalType.ThingTag, ref tag, obj);
|
||||
if(tag != t.Tag) t.Tag = tag;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove tags from thing actions
|
||||
if(General.Map.FormatInterface.HasThingAction &&
|
||||
General.Map.FormatInterface.HasActionArgs)
|
||||
{
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
if(t.Marked == marked)
|
||||
{
|
||||
LinedefActionInfo info = General.Map.Config.GetLinedefActionInfo(t.Action);
|
||||
for(int i = 0; i < Thing.NUM_ARGS; i++)
|
||||
if(info.Args[i].Used && CheckIsTagType(info.Args[i].Type))
|
||||
{
|
||||
int tag = t.Args[i];
|
||||
handler(t, true, (UniversalType)(info.Args[i].Type), ref tag, obj);
|
||||
if(tag != t.Args[i]) t.Args[i] = tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove tags from linedefs
|
||||
if(General.Map.FormatInterface.HasLinedefTag)
|
||||
{
|
||||
foreach(Linedef l in linedefs)
|
||||
if(l.Marked == marked)
|
||||
{
|
||||
int tag = l.Tag;
|
||||
handler(l, false, UniversalType.LinedefTag, ref tag, obj);
|
||||
if(tag != l.Tag) l.Tag = tag;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove tags from linedef actions
|
||||
if(General.Map.FormatInterface.HasActionArgs)
|
||||
{
|
||||
foreach(Linedef l in linedefs)
|
||||
{
|
||||
if(l.Marked == marked)
|
||||
{
|
||||
LinedefActionInfo info = General.Map.Config.GetLinedefActionInfo(l.Action);
|
||||
for(int i = 0; i < Linedef.NUM_ARGS; i++)
|
||||
if(info.Args[i].Used && CheckIsTagType(info.Args[i].Type))
|
||||
{
|
||||
int tag = l.Args[i];
|
||||
handler(l, true, (UniversalType)(info.Args[i].Type), ref tag, obj);
|
||||
if(tag != l.Args[i]) l.Args[i] = tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This checks if the given action argument type is a tag type
|
||||
private bool CheckIsTagType(int argtype)
|
||||
{
|
||||
return (argtype == (int)UniversalType.LinedefTag) ||
|
||||
(argtype == (int)UniversalType.SectorTag) ||
|
||||
(argtype == (int)UniversalType.ThingTag);
|
||||
}
|
||||
|
||||
/// <summary>This makes a list of lines related to marked vertices.
|
||||
/// A line is unstable when one vertex is marked and the other isn't.</summary>
|
||||
public ICollection<Linedef> LinedefsFromMarkedVertices(bool includeunselected, bool includestable, bool includeunstable)
|
||||
|
|
|
@ -11,6 +11,7 @@ using CodeImp.DoomBuilder.Rendering;
|
|||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -228,7 +229,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
/// Return false to abort the paste operation.
|
||||
/// The result parameter is false when the operation was already aborted by another plugin.
|
||||
/// </summary>
|
||||
public virtual bool OnPasteBegin(bool result)
|
||||
public virtual bool OnPasteBegin(PasteOptions options, bool result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -236,7 +237,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
/// <summary>
|
||||
/// Called by the Doom Builder core when the user pastes geometry into the map. The new geometry is created and marked before this method is called.
|
||||
/// </summary>
|
||||
public virtual void OnPasteEnd()
|
||||
public virtual void OnPasteEnd(PasteOptions options)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ using System.Reflection;
|
|||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -191,17 +192,17 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
}
|
||||
|
||||
|
||||
public bool OnPasteBegin()
|
||||
public bool OnPasteBegin(PasteOptions options)
|
||||
{
|
||||
bool result = true;
|
||||
foreach(Plugin p in plugins) result &= p.Plug.OnPasteBegin(result);
|
||||
foreach(Plugin p in plugins) result &= p.Plug.OnPasteBegin(options.Copy(), result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public void OnPasteEnd()
|
||||
public void OnPasteEnd(PasteOptions options)
|
||||
{
|
||||
foreach(Plugin p in plugins) p.Plug.OnPasteEnd();
|
||||
foreach(Plugin p in plugins) p.Plug.OnPasteEnd(options.Copy());
|
||||
}
|
||||
|
||||
|
||||
|
|
190
Source/Core/Windows/MainForm.Designer.cs
generated
190
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -64,7 +64,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemcut = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemcopy = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itempaste = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pasteSpecialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itempastespecial = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemsnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemautomerge = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -198,13 +198,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
toolStripMenuItem1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
toolStripMenuItem1.Size = new System.Drawing.Size(198, 6);
|
||||
toolStripMenuItem1.Size = new System.Drawing.Size(199, 6);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
toolStripMenuItem3.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
toolStripMenuItem3.Size = new System.Drawing.Size(198, 6);
|
||||
toolStripMenuItem3.Size = new System.Drawing.Size(199, 6);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
|
@ -234,7 +234,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
toolStripSeparator11.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
toolStripSeparator11.Size = new System.Drawing.Size(162, 6);
|
||||
toolStripSeparator11.Size = new System.Drawing.Size(160, 6);
|
||||
//
|
||||
// toolstripSeperator1
|
||||
//
|
||||
|
@ -246,7 +246,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
toolstripSeperator6.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
toolstripSeperator6.Name = "toolstripSeperator6";
|
||||
toolstripSeperator6.Size = new System.Drawing.Size(162, 6);
|
||||
toolstripSeperator6.Size = new System.Drawing.Size(160, 6);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
|
@ -269,12 +269,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// toolStripMenuItem4
|
||||
//
|
||||
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
toolStripMenuItem4.Size = new System.Drawing.Size(161, 6);
|
||||
toolStripMenuItem4.Size = new System.Drawing.Size(150, 6);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new System.Drawing.Size(164, 6);
|
||||
toolStripSeparator2.Size = new System.Drawing.Size(153, 6);
|
||||
//
|
||||
// buttoneditmodesseperator
|
||||
//
|
||||
|
@ -320,7 +320,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
toolStripMenuItem3,
|
||||
this.itemexit});
|
||||
this.menufile.Name = "menufile";
|
||||
this.menufile.Size = new System.Drawing.Size(35, 20);
|
||||
this.menufile.Size = new System.Drawing.Size(37, 20);
|
||||
this.menufile.Text = "File";
|
||||
//
|
||||
// itemnewmap
|
||||
|
@ -328,7 +328,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemnewmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.File;
|
||||
this.itemnewmap.Name = "itemnewmap";
|
||||
this.itemnewmap.ShortcutKeyDisplayString = "";
|
||||
this.itemnewmap.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemnewmap.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemnewmap.Tag = "builder_newmap";
|
||||
this.itemnewmap.Text = "New Map";
|
||||
this.itemnewmap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -337,7 +337,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemopenmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap;
|
||||
this.itemopenmap.Name = "itemopenmap";
|
||||
this.itemopenmap.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemopenmap.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemopenmap.Tag = "builder_openmap";
|
||||
this.itemopenmap.Text = "Open Map...";
|
||||
this.itemopenmap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -345,7 +345,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemclosemap
|
||||
//
|
||||
this.itemclosemap.Name = "itemclosemap";
|
||||
this.itemclosemap.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemclosemap.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemclosemap.Tag = "builder_closemap";
|
||||
this.itemclosemap.Text = "Close Map";
|
||||
this.itemclosemap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -354,7 +354,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemsavemap.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap;
|
||||
this.itemsavemap.Name = "itemsavemap";
|
||||
this.itemsavemap.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemsavemap.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemsavemap.Tag = "builder_savemap";
|
||||
this.itemsavemap.Text = "Save Map";
|
||||
this.itemsavemap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -362,7 +362,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemsavemapas
|
||||
//
|
||||
this.itemsavemapas.Name = "itemsavemapas";
|
||||
this.itemsavemapas.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemsavemapas.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemsavemapas.Tag = "builder_savemapas";
|
||||
this.itemsavemapas.Text = "Save Map As...";
|
||||
this.itemsavemapas.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -370,7 +370,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemsavemapinto
|
||||
//
|
||||
this.itemsavemapinto.Name = "itemsavemapinto";
|
||||
this.itemsavemapinto.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemsavemapinto.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemsavemapinto.Tag = "builder_savemapinto";
|
||||
this.itemsavemapinto.Text = "Save Map Into...";
|
||||
this.itemsavemapinto.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -379,19 +379,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem5.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(198, 6);
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(199, 6);
|
||||
//
|
||||
// itemnorecent
|
||||
//
|
||||
this.itemnorecent.Enabled = false;
|
||||
this.itemnorecent.Name = "itemnorecent";
|
||||
this.itemnorecent.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemnorecent.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemnorecent.Text = "No recently opened files";
|
||||
//
|
||||
// itemexit
|
||||
//
|
||||
this.itemexit.Name = "itemexit";
|
||||
this.itemexit.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemexit.Size = new System.Drawing.Size(202, 22);
|
||||
this.itemexit.Text = "Exit";
|
||||
this.itemexit.Click += new System.EventHandler(this.itemexit_Click);
|
||||
//
|
||||
|
@ -404,7 +404,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemcut,
|
||||
this.itemcopy,
|
||||
this.itempaste,
|
||||
this.pasteSpecialToolStripMenuItem,
|
||||
this.itempastespecial,
|
||||
toolstripSeperator6,
|
||||
this.itemsnaptogrid,
|
||||
this.itemautomerge,
|
||||
|
@ -415,14 +415,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
toolStripSeparator11,
|
||||
this.itemmapoptions});
|
||||
this.menuedit.Name = "menuedit";
|
||||
this.menuedit.Size = new System.Drawing.Size(37, 20);
|
||||
this.menuedit.Size = new System.Drawing.Size(39, 20);
|
||||
this.menuedit.Text = "Edit";
|
||||
//
|
||||
// itemundo
|
||||
//
|
||||
this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
|
||||
this.itemundo.Name = "itemundo";
|
||||
this.itemundo.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemundo.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemundo.Tag = "builder_undo";
|
||||
this.itemundo.Text = "Undo";
|
||||
this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -431,7 +431,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
|
||||
this.itemredo.Name = "itemredo";
|
||||
this.itemredo.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemredo.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemredo.Tag = "builder_redo";
|
||||
this.itemredo.Text = "Redo";
|
||||
this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -440,13 +440,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem7.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
|
||||
this.toolStripMenuItem7.Size = new System.Drawing.Size(162, 6);
|
||||
this.toolStripMenuItem7.Size = new System.Drawing.Size(160, 6);
|
||||
//
|
||||
// itemcut
|
||||
//
|
||||
this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
|
||||
this.itemcut.Name = "itemcut";
|
||||
this.itemcut.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemcut.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemcut.Tag = "builder_cutselection";
|
||||
this.itemcut.Text = "Cut";
|
||||
this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -455,7 +455,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
|
||||
this.itemcopy.Name = "itemcopy";
|
||||
this.itemcopy.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemcopy.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemcopy.Tag = "builder_copyselection";
|
||||
this.itemcopy.Text = "Copy";
|
||||
this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -464,19 +464,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
|
||||
this.itempaste.Name = "itempaste";
|
||||
this.itempaste.Size = new System.Drawing.Size(165, 22);
|
||||
this.itempaste.Size = new System.Drawing.Size(163, 22);
|
||||
this.itempaste.Tag = "builder_pasteselection";
|
||||
this.itempaste.Text = "Paste";
|
||||
this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// pasteSpecialToolStripMenuItem
|
||||
// itempastespecial
|
||||
//
|
||||
this.pasteSpecialToolStripMenuItem.Image = global::CodeImp.DoomBuilder.Properties.Resources.PasteSpecial;
|
||||
this.pasteSpecialToolStripMenuItem.Name = "pasteSpecialToolStripMenuItem";
|
||||
this.pasteSpecialToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
|
||||
this.pasteSpecialToolStripMenuItem.Tag = "builder_pasteselectionspecial";
|
||||
this.pasteSpecialToolStripMenuItem.Text = "Paste Special...";
|
||||
this.pasteSpecialToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
this.itempastespecial.Image = global::CodeImp.DoomBuilder.Properties.Resources.PasteSpecial;
|
||||
this.itempastespecial.Name = "itempastespecial";
|
||||
this.itempastespecial.Size = new System.Drawing.Size(163, 22);
|
||||
this.itempastespecial.Tag = "builder_pasteselectionspecial";
|
||||
this.itempastespecial.Text = "Paste Special...";
|
||||
this.itempastespecial.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// itemsnaptogrid
|
||||
//
|
||||
|
@ -484,7 +484,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4;
|
||||
this.itemsnaptogrid.Name = "itemsnaptogrid";
|
||||
this.itemsnaptogrid.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemsnaptogrid.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemsnaptogrid.Tag = "builder_togglesnap";
|
||||
this.itemsnaptogrid.Text = "Snap to Grid";
|
||||
this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -495,7 +495,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2;
|
||||
this.itemautomerge.Name = "itemautomerge";
|
||||
this.itemautomerge.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemautomerge.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemautomerge.Tag = "builder_toggleautomerge";
|
||||
this.itemautomerge.Text = "Merge Geometry";
|
||||
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -504,12 +504,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem6.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(162, 6);
|
||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(160, 6);
|
||||
//
|
||||
// itemgridinc
|
||||
//
|
||||
this.itemgridinc.Name = "itemgridinc";
|
||||
this.itemgridinc.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemgridinc.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemgridinc.Tag = "builder_griddec";
|
||||
this.itemgridinc.Text = "Increase Grid";
|
||||
this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -517,7 +517,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgriddec
|
||||
//
|
||||
this.itemgriddec.Name = "itemgriddec";
|
||||
this.itemgriddec.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemgriddec.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemgriddec.Tag = "builder_gridinc";
|
||||
this.itemgriddec.Text = "Decrease Grid";
|
||||
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -526,7 +526,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
|
||||
this.itemgridsetup.Name = "itemgridsetup";
|
||||
this.itemgridsetup.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemgridsetup.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemgridsetup.Tag = "builder_gridsetup";
|
||||
this.itemgridsetup.Text = "Grid Setup...";
|
||||
this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -535,7 +535,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties;
|
||||
this.itemmapoptions.Name = "itemmapoptions";
|
||||
this.itemmapoptions.Size = new System.Drawing.Size(165, 22);
|
||||
this.itemmapoptions.Size = new System.Drawing.Size(163, 22);
|
||||
this.itemmapoptions.Tag = "builder_mapoptions";
|
||||
this.itemmapoptions.Text = "Map Options....";
|
||||
this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -556,14 +556,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolStripMenuItem10,
|
||||
this.itemscripteditor});
|
||||
this.menuview.Name = "menuview";
|
||||
this.menuview.Size = new System.Drawing.Size(41, 20);
|
||||
this.menuview.Size = new System.Drawing.Size(44, 20);
|
||||
this.menuview.Text = "View";
|
||||
//
|
||||
// itemthingsfilter
|
||||
//
|
||||
this.itemthingsfilter.Image = global::CodeImp.DoomBuilder.Properties.Resources.Filter;
|
||||
this.itemthingsfilter.Name = "itemthingsfilter";
|
||||
this.itemthingsfilter.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemthingsfilter.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemthingsfilter.Tag = "builder_thingsfilterssetup";
|
||||
this.itemthingsfilter.Text = "Configure Things Filters...";
|
||||
this.itemthingsfilter.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -572,13 +572,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem9.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem9.Name = "toolStripMenuItem9";
|
||||
this.toolStripMenuItem9.Size = new System.Drawing.Size(207, 6);
|
||||
this.toolStripMenuItem9.Size = new System.Drawing.Size(206, 6);
|
||||
//
|
||||
// itemviewnormal
|
||||
//
|
||||
this.itemviewnormal.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewNormal;
|
||||
this.itemviewnormal.Name = "itemviewnormal";
|
||||
this.itemviewnormal.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemviewnormal.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemviewnormal.Tag = "builder_viewmodenormal";
|
||||
this.itemviewnormal.Text = "Wireframe";
|
||||
this.itemviewnormal.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -587,7 +587,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemviewbrightness.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewBrightness;
|
||||
this.itemviewbrightness.Name = "itemviewbrightness";
|
||||
this.itemviewbrightness.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemviewbrightness.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemviewbrightness.Tag = "builder_viewmodebrightness";
|
||||
this.itemviewbrightness.Text = "Brightness Levels";
|
||||
this.itemviewbrightness.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -596,7 +596,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemviewfloors.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureFloor;
|
||||
this.itemviewfloors.Name = "itemviewfloors";
|
||||
this.itemviewfloors.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemviewfloors.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemviewfloors.Tag = "builder_viewmodefloors";
|
||||
this.itemviewfloors.Text = "Floor Textures";
|
||||
this.itemviewfloors.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -605,7 +605,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemviewceilings.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureCeiling;
|
||||
this.itemviewceilings.Name = "itemviewceilings";
|
||||
this.itemviewceilings.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemviewceilings.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemviewceilings.Tag = "builder_viewmodeceilings";
|
||||
this.itemviewceilings.Text = "Ceiling Textures";
|
||||
this.itemviewceilings.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -613,7 +613,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(207, 6);
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(206, 6);
|
||||
//
|
||||
// menuzoom
|
||||
//
|
||||
|
@ -626,13 +626,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.item2zoom5});
|
||||
this.menuzoom.Image = global::CodeImp.DoomBuilder.Properties.Resources.Zoom;
|
||||
this.menuzoom.Name = "menuzoom";
|
||||
this.menuzoom.Size = new System.Drawing.Size(210, 22);
|
||||
this.menuzoom.Size = new System.Drawing.Size(209, 22);
|
||||
this.menuzoom.Text = "Zoom";
|
||||
//
|
||||
// item2zoom200
|
||||
//
|
||||
this.item2zoom200.Name = "item2zoom200";
|
||||
this.item2zoom200.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom200.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom200.Tag = "200";
|
||||
this.item2zoom200.Text = "200%";
|
||||
this.item2zoom200.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -640,7 +640,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// item2zoom100
|
||||
//
|
||||
this.item2zoom100.Name = "item2zoom100";
|
||||
this.item2zoom100.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom100.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom100.Tag = "100";
|
||||
this.item2zoom100.Text = "100%";
|
||||
this.item2zoom100.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -648,7 +648,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// item2zoom50
|
||||
//
|
||||
this.item2zoom50.Name = "item2zoom50";
|
||||
this.item2zoom50.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom50.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom50.Tag = "50";
|
||||
this.item2zoom50.Text = "50%";
|
||||
this.item2zoom50.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -656,7 +656,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// item2zoom25
|
||||
//
|
||||
this.item2zoom25.Name = "item2zoom25";
|
||||
this.item2zoom25.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom25.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom25.Tag = "25";
|
||||
this.item2zoom25.Text = "25%";
|
||||
this.item2zoom25.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -664,7 +664,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// item2zoom10
|
||||
//
|
||||
this.item2zoom10.Name = "item2zoom10";
|
||||
this.item2zoom10.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom10.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom10.Tag = "10";
|
||||
this.item2zoom10.Text = "10%";
|
||||
this.item2zoom10.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -672,7 +672,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// item2zoom5
|
||||
//
|
||||
this.item2zoom5.Name = "item2zoom5";
|
||||
this.item2zoom5.Size = new System.Drawing.Size(114, 22);
|
||||
this.item2zoom5.Size = new System.Drawing.Size(102, 22);
|
||||
this.item2zoom5.Tag = "5";
|
||||
this.item2zoom5.Text = "5%";
|
||||
this.item2zoom5.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -680,7 +680,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemfittoscreen
|
||||
//
|
||||
this.itemfittoscreen.Name = "itemfittoscreen";
|
||||
this.itemfittoscreen.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemfittoscreen.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemfittoscreen.Tag = "builder_centerinscreen";
|
||||
this.itemfittoscreen.Text = "Fit to screen";
|
||||
this.itemfittoscreen.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -688,7 +688,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemtoggleinfo
|
||||
//
|
||||
this.itemtoggleinfo.Name = "itemtoggleinfo";
|
||||
this.itemtoggleinfo.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemtoggleinfo.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemtoggleinfo.Tag = "builder_toggleinfopanel";
|
||||
this.itemtoggleinfo.Text = "Expanded Info Panel";
|
||||
this.itemtoggleinfo.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -697,13 +697,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem10.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem10.Name = "toolStripMenuItem10";
|
||||
this.toolStripMenuItem10.Size = new System.Drawing.Size(207, 6);
|
||||
this.toolStripMenuItem10.Size = new System.Drawing.Size(206, 6);
|
||||
//
|
||||
// itemscripteditor
|
||||
//
|
||||
this.itemscripteditor.Image = global::CodeImp.DoomBuilder.Properties.Resources.Script2;
|
||||
this.itemscripteditor.Name = "itemscripteditor";
|
||||
this.itemscripteditor.Size = new System.Drawing.Size(210, 22);
|
||||
this.itemscripteditor.Size = new System.Drawing.Size(209, 22);
|
||||
this.itemscripteditor.Tag = "builder_openscripteditor";
|
||||
this.itemscripteditor.Text = "Script Editor...";
|
||||
this.itemscripteditor.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -711,7 +711,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// menumode
|
||||
//
|
||||
this.menumode.Name = "menumode";
|
||||
this.menumode.Size = new System.Drawing.Size(45, 20);
|
||||
this.menumode.Size = new System.Drawing.Size(50, 20);
|
||||
this.menumode.Text = "Mode";
|
||||
//
|
||||
// menuprefabs
|
||||
|
@ -722,13 +722,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolStripMenuItem12,
|
||||
this.itemcreateprefab});
|
||||
this.menuprefabs.Name = "menuprefabs";
|
||||
this.menuprefabs.Size = new System.Drawing.Size(56, 20);
|
||||
this.menuprefabs.Size = new System.Drawing.Size(58, 20);
|
||||
this.menuprefabs.Text = "Prefabs";
|
||||
//
|
||||
// iteminsertprefabfile
|
||||
//
|
||||
this.iteminsertprefabfile.Name = "iteminsertprefabfile";
|
||||
this.iteminsertprefabfile.Size = new System.Drawing.Size(205, 22);
|
||||
this.iteminsertprefabfile.Size = new System.Drawing.Size(199, 22);
|
||||
this.iteminsertprefabfile.Tag = "builder_insertprefabfile";
|
||||
this.iteminsertprefabfile.Text = "Insert Prefab from File...";
|
||||
this.iteminsertprefabfile.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -736,7 +736,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// iteminsertpreviousprefab
|
||||
//
|
||||
this.iteminsertpreviousprefab.Name = "iteminsertpreviousprefab";
|
||||
this.iteminsertpreviousprefab.Size = new System.Drawing.Size(205, 22);
|
||||
this.iteminsertpreviousprefab.Size = new System.Drawing.Size(199, 22);
|
||||
this.iteminsertpreviousprefab.Tag = "builder_insertpreviousprefab";
|
||||
this.iteminsertpreviousprefab.Text = "Insert Previous Prefab";
|
||||
this.iteminsertpreviousprefab.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -745,12 +745,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem12.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem12.Name = "toolStripMenuItem12";
|
||||
this.toolStripMenuItem12.Size = new System.Drawing.Size(202, 6);
|
||||
this.toolStripMenuItem12.Size = new System.Drawing.Size(196, 6);
|
||||
//
|
||||
// itemcreateprefab
|
||||
//
|
||||
this.itemcreateprefab.Name = "itemcreateprefab";
|
||||
this.itemcreateprefab.Size = new System.Drawing.Size(205, 22);
|
||||
this.itemcreateprefab.Size = new System.Drawing.Size(199, 22);
|
||||
this.itemcreateprefab.Tag = "builder_createprefab";
|
||||
this.itemcreateprefab.Text = "Create From Selection...";
|
||||
this.itemcreateprefab.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -766,13 +766,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolStripMenuItem11,
|
||||
this.itemtestmap});
|
||||
this.menutools.Name = "menutools";
|
||||
this.menutools.Size = new System.Drawing.Size(44, 20);
|
||||
this.menutools.Size = new System.Drawing.Size(48, 20);
|
||||
this.menutools.Text = "Tools";
|
||||
//
|
||||
// itemreloadresources
|
||||
//
|
||||
this.itemreloadresources.Name = "itemreloadresources";
|
||||
this.itemreloadresources.Size = new System.Drawing.Size(197, 22);
|
||||
this.itemreloadresources.Size = new System.Drawing.Size(196, 22);
|
||||
this.itemreloadresources.Tag = "builder_reloadresources";
|
||||
this.itemreloadresources.Text = "Reload Resources";
|
||||
this.itemreloadresources.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -781,7 +781,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemshowerrors.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning;
|
||||
this.itemshowerrors.Name = "itemshowerrors";
|
||||
this.itemshowerrors.Size = new System.Drawing.Size(197, 22);
|
||||
this.itemshowerrors.Size = new System.Drawing.Size(196, 22);
|
||||
this.itemshowerrors.Tag = "builder_showerrors";
|
||||
this.itemshowerrors.Text = "Errors and Warnings...";
|
||||
this.itemshowerrors.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -790,12 +790,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem8.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
|
||||
this.toolStripMenuItem8.Size = new System.Drawing.Size(194, 6);
|
||||
this.toolStripMenuItem8.Size = new System.Drawing.Size(193, 6);
|
||||
//
|
||||
// configurationToolStripMenuItem
|
||||
//
|
||||
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.configurationToolStripMenuItem.Tag = "builder_configuration";
|
||||
this.configurationToolStripMenuItem.Text = "Game Configurations...";
|
||||
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -803,7 +803,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// preferencesToolStripMenuItem
|
||||
//
|
||||
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
|
||||
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.preferencesToolStripMenuItem.Tag = "builder_preferences";
|
||||
this.preferencesToolStripMenuItem.Text = "Preferences...";
|
||||
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -812,13 +812,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem11.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
|
||||
this.toolStripMenuItem11.Size = new System.Drawing.Size(194, 6);
|
||||
this.toolStripMenuItem11.Size = new System.Drawing.Size(193, 6);
|
||||
//
|
||||
// itemtestmap
|
||||
//
|
||||
this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
|
||||
this.itemtestmap.Name = "itemtestmap";
|
||||
this.itemtestmap.Size = new System.Drawing.Size(197, 22);
|
||||
this.itemtestmap.Size = new System.Drawing.Size(196, 22);
|
||||
this.itemtestmap.Tag = "builder_testmap";
|
||||
this.itemtestmap.Text = "Test Map";
|
||||
this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -831,14 +831,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolStripMenuItem13,
|
||||
this.itemhelpabout});
|
||||
this.menuhelp.Name = "menuhelp";
|
||||
this.menuhelp.Size = new System.Drawing.Size(40, 20);
|
||||
this.menuhelp.Size = new System.Drawing.Size(44, 20);
|
||||
this.menuhelp.Text = "Help";
|
||||
//
|
||||
// itemhelprefmanual
|
||||
//
|
||||
this.itemhelprefmanual.Image = global::CodeImp.DoomBuilder.Properties.Resources.Help;
|
||||
this.itemhelprefmanual.Name = "itemhelprefmanual";
|
||||
this.itemhelprefmanual.Size = new System.Drawing.Size(198, 22);
|
||||
this.itemhelprefmanual.Size = new System.Drawing.Size(203, 22);
|
||||
this.itemhelprefmanual.Text = "Reference Manual";
|
||||
this.itemhelprefmanual.Click += new System.EventHandler(this.itemhelprefmanual_Click);
|
||||
//
|
||||
|
@ -846,7 +846,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemhelpeditmode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Question;
|
||||
this.itemhelpeditmode.Name = "itemhelpeditmode";
|
||||
this.itemhelpeditmode.Size = new System.Drawing.Size(198, 22);
|
||||
this.itemhelpeditmode.Size = new System.Drawing.Size(203, 22);
|
||||
this.itemhelpeditmode.Text = "About this Editing Mode";
|
||||
this.itemhelpeditmode.Click += new System.EventHandler(this.itemhelpeditmode_Click);
|
||||
//
|
||||
|
@ -854,12 +854,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.toolStripMenuItem13.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
|
||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(195, 6);
|
||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(200, 6);
|
||||
//
|
||||
// itemhelpabout
|
||||
//
|
||||
this.itemhelpabout.Name = "itemhelpabout";
|
||||
this.itemhelpabout.Size = new System.Drawing.Size(198, 22);
|
||||
this.itemhelpabout.Size = new System.Drawing.Size(203, 22);
|
||||
this.itemhelpabout.Text = "About Doom Builder...";
|
||||
this.itemhelpabout.Click += new System.EventHandler(this.itemhelpabout_Click);
|
||||
//
|
||||
|
@ -1250,7 +1250,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid1024
|
||||
//
|
||||
this.itemgrid1024.Name = "itemgrid1024";
|
||||
this.itemgrid1024.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid1024.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid1024.Tag = "1024";
|
||||
this.itemgrid1024.Text = "1024 mp";
|
||||
this.itemgrid1024.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1258,7 +1258,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid512
|
||||
//
|
||||
this.itemgrid512.Name = "itemgrid512";
|
||||
this.itemgrid512.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid512.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid512.Tag = "512";
|
||||
this.itemgrid512.Text = "512 mp";
|
||||
this.itemgrid512.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1266,7 +1266,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid256
|
||||
//
|
||||
this.itemgrid256.Name = "itemgrid256";
|
||||
this.itemgrid256.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid256.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid256.Tag = "256";
|
||||
this.itemgrid256.Text = "256 mp";
|
||||
this.itemgrid256.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1274,7 +1274,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid128
|
||||
//
|
||||
this.itemgrid128.Name = "itemgrid128";
|
||||
this.itemgrid128.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid128.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid128.Tag = "128";
|
||||
this.itemgrid128.Text = "128 mp";
|
||||
this.itemgrid128.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1282,7 +1282,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid64
|
||||
//
|
||||
this.itemgrid64.Name = "itemgrid64";
|
||||
this.itemgrid64.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid64.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid64.Tag = "64";
|
||||
this.itemgrid64.Text = "64 mp";
|
||||
this.itemgrid64.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1290,7 +1290,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid32
|
||||
//
|
||||
this.itemgrid32.Name = "itemgrid32";
|
||||
this.itemgrid32.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid32.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid32.Tag = "32";
|
||||
this.itemgrid32.Text = "32 mp";
|
||||
this.itemgrid32.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1298,7 +1298,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid16
|
||||
//
|
||||
this.itemgrid16.Name = "itemgrid16";
|
||||
this.itemgrid16.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid16.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid16.Tag = "16";
|
||||
this.itemgrid16.Text = "16 mp";
|
||||
this.itemgrid16.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1306,7 +1306,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid8
|
||||
//
|
||||
this.itemgrid8.Name = "itemgrid8";
|
||||
this.itemgrid8.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid8.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid8.Tag = "8";
|
||||
this.itemgrid8.Text = "8 mp";
|
||||
this.itemgrid8.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1314,7 +1314,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgrid4
|
||||
//
|
||||
this.itemgrid4.Name = "itemgrid4";
|
||||
this.itemgrid4.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgrid4.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgrid4.Tag = "4";
|
||||
this.itemgrid4.Text = "4 mp";
|
||||
this.itemgrid4.Click += new System.EventHandler(this.itemgridsize_Click);
|
||||
|
@ -1322,7 +1322,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemgridcustom
|
||||
//
|
||||
this.itemgridcustom.Name = "itemgridcustom";
|
||||
this.itemgridcustom.Size = new System.Drawing.Size(164, 22);
|
||||
this.itemgridcustom.Size = new System.Drawing.Size(153, 22);
|
||||
this.itemgridcustom.Text = "Customize...";
|
||||
this.itemgridcustom.Click += new System.EventHandler(this.itemgridcustom_Click);
|
||||
//
|
||||
|
@ -1361,7 +1361,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom200
|
||||
//
|
||||
this.itemzoom200.Name = "itemzoom200";
|
||||
this.itemzoom200.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom200.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom200.Tag = "200";
|
||||
this.itemzoom200.Text = "200%";
|
||||
this.itemzoom200.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1369,7 +1369,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom100
|
||||
//
|
||||
this.itemzoom100.Name = "itemzoom100";
|
||||
this.itemzoom100.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom100.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom100.Tag = "100";
|
||||
this.itemzoom100.Text = "100%";
|
||||
this.itemzoom100.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1377,7 +1377,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom50
|
||||
//
|
||||
this.itemzoom50.Name = "itemzoom50";
|
||||
this.itemzoom50.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom50.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom50.Tag = "50";
|
||||
this.itemzoom50.Text = "50%";
|
||||
this.itemzoom50.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1385,7 +1385,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom25
|
||||
//
|
||||
this.itemzoom25.Name = "itemzoom25";
|
||||
this.itemzoom25.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom25.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom25.Tag = "25";
|
||||
this.itemzoom25.Text = "25%";
|
||||
this.itemzoom25.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1393,7 +1393,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom10
|
||||
//
|
||||
this.itemzoom10.Name = "itemzoom10";
|
||||
this.itemzoom10.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom10.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom10.Tag = "10";
|
||||
this.itemzoom10.Text = "10%";
|
||||
this.itemzoom10.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1401,7 +1401,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoom5
|
||||
//
|
||||
this.itemzoom5.Name = "itemzoom5";
|
||||
this.itemzoom5.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoom5.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoom5.Tag = "5";
|
||||
this.itemzoom5.Text = "5%";
|
||||
this.itemzoom5.Click += new System.EventHandler(this.itemzoomto_Click);
|
||||
|
@ -1409,7 +1409,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemzoomfittoscreen
|
||||
//
|
||||
this.itemzoomfittoscreen.Name = "itemzoomfittoscreen";
|
||||
this.itemzoomfittoscreen.Size = new System.Drawing.Size(167, 22);
|
||||
this.itemzoomfittoscreen.Size = new System.Drawing.Size(156, 22);
|
||||
this.itemzoomfittoscreen.Text = "Fit to screen";
|
||||
this.itemzoomfittoscreen.Click += new System.EventHandler(this.itemzoomfittoscreen_Click);
|
||||
//
|
||||
|
@ -1739,6 +1739,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem13;
|
||||
private System.Windows.Forms.ToolStripMenuItem itemhelpeditmode;
|
||||
private System.Windows.Forms.ToolStripMenuItem itemtoggleinfo;
|
||||
private System.Windows.Forms.ToolStripMenuItem pasteSpecialToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem itempastespecial;
|
||||
}
|
||||
}
|
|
@ -1802,6 +1802,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
itemcut.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||
itemcopy.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||
itempaste.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||
itempastespecial.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste;
|
||||
itemmapoptions.Enabled = (General.Map != null);
|
||||
itemsnaptogrid.Enabled = (General.Map != null);
|
||||
itemautomerge.Enabled = (General.Map != null);
|
||||
|
|
47
Source/Core/Windows/PasteOptionsForm.Designer.cs
generated
47
Source/Core/Windows/PasteOptionsForm.Designer.cs
generated
|
@ -28,14 +28,55 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.paste = new System.Windows.Forms.Button();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// paste
|
||||
//
|
||||
this.paste.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.paste.Location = new System.Drawing.Point(272, 278);
|
||||
this.paste.Name = "paste";
|
||||
this.paste.Size = new System.Drawing.Size(112, 25);
|
||||
this.paste.TabIndex = 3;
|
||||
this.paste.Text = "Paste";
|
||||
this.paste.UseVisualStyleBackColor = true;
|
||||
this.paste.Click += new System.EventHandler(this.paste_Click);
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
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(390, 278);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(112, 25);
|
||||
this.cancel.TabIndex = 4;
|
||||
this.cancel.Text = "Cancel";
|
||||
this.cancel.UseVisualStyleBackColor = true;
|
||||
this.cancel.Click += new System.EventHandler(this.cancel_Click);
|
||||
//
|
||||
// pasteoptions
|
||||
//
|
||||
this.pasteoptions.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.pasteoptions.Location = new System.Drawing.Point(12, 12);
|
||||
this.pasteoptions.Name = "pasteoptions";
|
||||
this.pasteoptions.Size = new System.Drawing.Size(490, 260);
|
||||
this.pasteoptions.TabIndex = 5;
|
||||
//
|
||||
// PasteOptionsForm
|
||||
//
|
||||
this.AcceptButton = this.paste;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(454, 205);
|
||||
this.CancelButton = this.cancel;
|
||||
this.ClientSize = new System.Drawing.Size(514, 318);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.pasteoptions);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.paste);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
|
@ -50,5 +91,9 @@
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button paste;
|
||||
private System.Windows.Forms.Button cancel;
|
||||
private CodeImp.DoomBuilder.Controls.PasteOptionsControl pasteoptions;
|
||||
}
|
||||
}
|
|
@ -35,10 +35,18 @@ using CodeImp.DoomBuilder.Controls;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Windows
|
||||
{
|
||||
public partial class PasteOptionsForm : DelayedForm
|
||||
internal partial class PasteOptionsForm : DelayedForm
|
||||
{
|
||||
#region ================== Variables
|
||||
|
||||
private PasteOptions options;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public PasteOptions Options { get { return options; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor
|
||||
|
@ -47,12 +55,31 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
public PasteOptionsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Get defaults
|
||||
options = General.Settings.PasteOptions.Copy();
|
||||
pasteoptions.Setup(options);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Events
|
||||
|
||||
// Paste clicked
|
||||
private void paste_Click(object sender, EventArgs e)
|
||||
{
|
||||
options = pasteoptions.GetOptions();
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
// Cancel clicked
|
||||
private void cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,4 +117,16 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="paste.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pasteoptions.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
59
Source/Core/Windows/PreferencesForm.Designer.cs
generated
59
Source/Core/Windows/PreferencesForm.Designer.cs
generated
|
@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabs = new System.Windows.Forms.TabControl();
|
||||
this.tabinterface = new System.Windows.Forms.TabPage();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.scriptautoindent = new System.Windows.Forms.CheckBox();
|
||||
this.scripttabwidth = new CodeImp.DoomBuilder.Controls.NumericTextbox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.scriptontop = new System.Windows.Forms.CheckBox();
|
||||
|
@ -115,7 +116,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorlinenumbers = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.colorcomments = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.colorplaintext = new CodeImp.DoomBuilder.Controls.ColorControl();
|
||||
this.scriptautoindent = new System.Windows.Forms.CheckBox();
|
||||
this.tabpasting = new System.Windows.Forms.TabPage();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
|
@ -140,6 +143,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).BeginInit();
|
||||
this.colorsgroup3.SuspendLayout();
|
||||
this.tabpasting.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label7
|
||||
|
@ -460,6 +464,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabs.Controls.Add(this.tabinterface);
|
||||
this.tabs.Controls.Add(this.tabkeys);
|
||||
this.tabs.Controls.Add(this.tabcolors);
|
||||
this.tabs.Controls.Add(this.tabpasting);
|
||||
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabs.ItemSize = new System.Drawing.Size(110, 19);
|
||||
this.tabs.Location = new System.Drawing.Point(11, 13);
|
||||
|
@ -503,6 +508,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = " Script Editor ";
|
||||
//
|
||||
// scriptautoindent
|
||||
//
|
||||
this.scriptautoindent.AutoSize = true;
|
||||
this.scriptautoindent.Location = new System.Drawing.Point(171, 195);
|
||||
this.scriptautoindent.Name = "scriptautoindent";
|
||||
this.scriptautoindent.Size = new System.Drawing.Size(82, 18);
|
||||
this.scriptautoindent.TabIndex = 21;
|
||||
this.scriptautoindent.Text = "Auto-indent";
|
||||
this.scriptautoindent.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// scripttabwidth
|
||||
//
|
||||
this.scripttabwidth.AllowDecimal = false;
|
||||
|
@ -1160,15 +1175,37 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.colorplaintext.Size = new System.Drawing.Size(150, 23);
|
||||
this.colorplaintext.TabIndex = 2;
|
||||
//
|
||||
// scriptautoindent
|
||||
// tabpasting
|
||||
//
|
||||
this.scriptautoindent.AutoSize = true;
|
||||
this.scriptautoindent.Location = new System.Drawing.Point(171, 195);
|
||||
this.scriptautoindent.Name = "scriptautoindent";
|
||||
this.scriptautoindent.Size = new System.Drawing.Size(82, 18);
|
||||
this.scriptautoindent.TabIndex = 21;
|
||||
this.scriptautoindent.Text = "Auto-indent";
|
||||
this.scriptautoindent.UseVisualStyleBackColor = true;
|
||||
this.tabpasting.Controls.Add(this.label16);
|
||||
this.tabpasting.Controls.Add(this.pasteoptions);
|
||||
this.tabpasting.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabpasting.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabpasting.Name = "tabpasting";
|
||||
this.tabpasting.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabpasting.Size = new System.Drawing.Size(653, 449);
|
||||
this.tabpasting.TabIndex = 3;
|
||||
this.tabpasting.Text = "Pasting ";
|
||||
this.tabpasting.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label16.Location = new System.Drawing.Point(11, 15);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(634, 35);
|
||||
this.label16.TabIndex = 1;
|
||||
this.label16.Text = "These are the default options for pasting geometry. You can also choose these opt" +
|
||||
"ions when you use the Paste Special function. These options also apply when inse" +
|
||||
"rting prefabs.";
|
||||
//
|
||||
// pasteoptions
|
||||
//
|
||||
this.pasteoptions.Location = new System.Drawing.Point(8, 53);
|
||||
this.pasteoptions.Name = "pasteoptions";
|
||||
this.pasteoptions.Size = new System.Drawing.Size(637, 388);
|
||||
this.pasteoptions.TabIndex = 0;
|
||||
//
|
||||
// PreferencesForm
|
||||
//
|
||||
|
@ -1216,6 +1253,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).EndInit();
|
||||
this.colorsgroup3.ResumeLayout(false);
|
||||
this.tabpasting.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -1304,5 +1342,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.Label label10;
|
||||
private CodeImp.DoomBuilder.Controls.NumericTextbox scripttabwidth;
|
||||
private System.Windows.Forms.CheckBox scriptautoindent;
|
||||
private System.Windows.Forms.TabPage tabpasting;
|
||||
private CodeImp.DoomBuilder.Controls.PasteOptionsControl pasteoptions;
|
||||
private System.Windows.Forms.Label label16;
|
||||
}
|
||||
}
|
|
@ -143,6 +143,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
visualbilinear.Checked = General.Settings.VisualBilinear;
|
||||
qualitydisplay.Checked = General.Settings.QualityDisplay;
|
||||
|
||||
// Paste options
|
||||
pasteoptions.Setup(General.Settings.PasteOptions.Copy());
|
||||
|
||||
// Allow plugins to add tabs
|
||||
this.SuspendLayout();
|
||||
controller = new PreferencesController(this);
|
||||
|
@ -222,6 +225,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
General.Settings.VisualBilinear = visualbilinear.Checked;
|
||||
General.Settings.QualityDisplay = qualitydisplay.Checked;
|
||||
|
||||
// Paste options
|
||||
General.Settings.PasteOptions = pasteoptions.GetOptions();
|
||||
|
||||
// Let the plugins know we're closing
|
||||
General.Plugins.OnClosePreferences(controller);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// This is called when something was pasted.
|
||||
public override void OnPasteEnd()
|
||||
public override void OnPasteEnd(PasteOptions options)
|
||||
{
|
||||
General.Map.Map.ClearAllSelected();
|
||||
General.Map.Map.SelectMarkedGeometry(true, true);
|
||||
|
@ -101,6 +101,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Switch to EditSelectionMode
|
||||
EditSelectionMode editmode = new EditSelectionMode();
|
||||
editmode.Pasting = true;
|
||||
editmode.PasteOptions = options;
|
||||
General.Editing.ChangeMode(editmode);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Modes
|
||||
private bool modealreadyswitching = false;
|
||||
private bool pasting = false;
|
||||
private PasteOptions pasteoptions;
|
||||
|
||||
// Highlighted vertex
|
||||
private MapElement highlighted;
|
||||
|
@ -144,6 +145,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public override string EditModeButtonName { get { return General.Editing.PreviousStableMode.Name; } }
|
||||
|
||||
public bool Pasting { get { return pasting; } set { pasting = value; } }
|
||||
public PasteOptions PasteOptions { get { return pasteoptions; } set { pasteoptions = value.Copy(); } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -972,6 +974,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if((vsector != null) && (parent != null))
|
||||
{
|
||||
// Adjust the floor and ceiling heights of all new sectors
|
||||
if(pasteoptions.AdjustHeights)
|
||||
{
|
||||
ICollection<Sector> newsectors = General.Map.Map.GetMarkedSectors(true);
|
||||
foreach(Sector s in newsectors)
|
||||
{
|
||||
|
@ -979,6 +983,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
s.FloorHeight += parent.FloorHeight - vsector.FloorHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any virtual sectors
|
||||
General.Map.Map.RemoveVirtualSectors();
|
||||
|
|
|
@ -337,7 +337,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
editpressed = true;
|
||||
|
||||
// Highlighted item not selected?
|
||||
if(!highlighted.Selected && BuilderPlug.Me.AutoClearSelection)
|
||||
if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedLinedefsCount == 0)))
|
||||
{
|
||||
// Make this the only selection
|
||||
General.Map.Map.ClearSelectedLinedefs();
|
||||
|
|
|
@ -560,7 +560,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
editpressed = true;
|
||||
|
||||
// Highlighted item not selected?
|
||||
if(!highlighted.Selected && BuilderPlug.Me.AutoClearSelection)
|
||||
if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedSectorsCount == 0)))
|
||||
{
|
||||
// Make this the only selection
|
||||
General.Map.Map.ClearSelectedSectors();
|
||||
|
|
|
@ -312,7 +312,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
editpressed = true;
|
||||
|
||||
// Highlighted item not selected?
|
||||
if(!highlighted.Selected && BuilderPlug.Me.AutoClearSelection)
|
||||
if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedThingsCount == 0)))
|
||||
{
|
||||
// Make this the only selection
|
||||
General.Map.Map.ClearSelectedThings();
|
||||
|
|
|
@ -242,7 +242,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
editpressed = true;
|
||||
|
||||
// Highlighted item not selected?
|
||||
if(!highlighted.Selected && BuilderPlug.Me.AutoClearSelection)
|
||||
if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedVerticessCount == 0)))
|
||||
{
|
||||
// Make this the only selection
|
||||
General.Map.Map.ClearSelectedVertices();
|
||||
|
|
Loading…
Reference in a new issue