mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
According to dotnetperls.com, "new Dictionary<string, [anything]>(StringComparer.Ordinal)" works 17% faster than "new Dictionary<string, [anything]>()", so let's stick that everywhere and see what happens :)
Draw Curve Mode: added settings panel. Sectors mode: added "Make Door" button to the toolbar. Swapped Side panel and Info panel z-order. Interface: split toolbar into 3 separate toolbars. All toolbar buttons are now viewable at 1024x768. Interface: grouped stuff in "Modes" menu a bit better. Interface: added "Draw [stuff]" buttons to modes toolbar. Interface: reorganized main menu. Hope it makes more sense now. API: added General.Interface.AddModesButton() and General.Interface.AddModesMenu(), which can be used to add buttons to specific group in "Modes" toolbar and menu items to specific group in "Modes" menu, so actions, which behave like an editing mode, but are not part of one can be added there.
This commit is contained in:
parent
21889a98e7
commit
0369c969d1
90 changed files with 1326 additions and 847 deletions
|
@ -37,7 +37,7 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
#region ================== Constructor
|
||||
|
||||
public HintsManager() {
|
||||
hints = new Dictionary<string, Dictionary<string, string>>();
|
||||
hints = new Dictionary<string, Dictionary<string, string>>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
}
|
||||
}
|
||||
|
||||
Dictionary<string, List<string>> group = new Dictionary<string, List<string>>();
|
||||
Dictionary<string, List<string>> group = new Dictionary<string, List<string>>(StringComparer.Ordinal);
|
||||
|
||||
foreach(string s in lines) {
|
||||
line = s.Trim();
|
||||
|
@ -117,7 +117,7 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
}
|
||||
|
||||
private Dictionary<string, string> processHints(Dictionary<string, List<string>> hintsgroup) {
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
var result = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, List<string>> group in hintsgroup) {
|
||||
result.Add(group.Key, "{\\rtf1" + string.Join("\\par\\par ", group.Value.ToArray()) + "}");
|
||||
}
|
||||
|
|
|
@ -951,6 +951,7 @@
|
|||
<None Include="Resources\MCrash.png" />
|
||||
<Content Include="Resources\Model.png" />
|
||||
<Content Include="Resources\Model_selected.png" />
|
||||
<None Include="Resources\SnapVerts.png" />
|
||||
<EmbeddedResource Include="Resources\UDMF_UI.cfg" />
|
||||
<None Include="Resources\Unlink.png" />
|
||||
<None Include="Resources\Unpin.png" />
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
}
|
||||
|
||||
// Make list of edit modes
|
||||
this.editmodes = new Dictionary<string, bool>();
|
||||
this.editmodes = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
IDictionary modes = General.Settings.ReadSetting("configurations." + settingskey + ".editmodes", new Hashtable());
|
||||
foreach(DictionaryEntry de in modes)
|
||||
{
|
||||
|
|
|
@ -248,33 +248,33 @@ namespace CodeImp.DoomBuilder.Config
|
|||
|
||||
// Initialize
|
||||
this.cfg = cfg;
|
||||
this.thingflags = new Dictionary<string, string>();
|
||||
this.thingflags = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.defaultthingflags = new List<string>();
|
||||
this.thingcategories = new List<ThingCategory>();
|
||||
this.things = new Dictionary<int, ThingTypeInfo>();
|
||||
this.linedefflags = new Dictionary<string, string>();
|
||||
this.linedefflags = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.sortedlinedefflags = new List<string>();
|
||||
this.linedefactions = new Dictionary<int, LinedefActionInfo>();
|
||||
this.actioncategories = new List<LinedefActionCategory>();
|
||||
this.sortedlinedefactions = new List<LinedefActionInfo>();
|
||||
this.linedefactivates = new List<LinedefActivateInfo>();
|
||||
this.sidedefflags = new Dictionary<string, string>(); //mxd
|
||||
this.sidedefflags = new Dictionary<string, string>(StringComparer.Ordinal); //mxd
|
||||
this.genactioncategories = new List<GeneralizedCategory>();
|
||||
this.sectorflags = new Dictionary<string, string>(); //mxd
|
||||
this.sectorflags = new Dictionary<string, string>(StringComparer.Ordinal); //mxd
|
||||
this.sectoreffects = new Dictionary<int, SectorEffectInfo>();
|
||||
this.sortedsectoreffects = new List<SectorEffectInfo>();
|
||||
this.geneffectoptions = new List<GeneralizedOption>();
|
||||
this.enums = new Dictionary<string, EnumList>();
|
||||
this.enums = new Dictionary<string, EnumList>(StringComparer.Ordinal);
|
||||
this.skills = new List<SkillInfo>();
|
||||
this.texturesets = new List<DefinedTextureSet>();
|
||||
this.makedoorargs = new int[Linedef.NUM_ARGS];
|
||||
this.maplumps = new Dictionary<string, MapLumpInfo>();
|
||||
this.maplumps = new Dictionary<string, MapLumpInfo>(StringComparer.Ordinal);
|
||||
this.thingflagstranslation = new List<FlagTranslation>();
|
||||
this.linedefflagstranslation = new List<FlagTranslation>();
|
||||
this.thingfilters = new List<ThingsFilter>();
|
||||
this.thingflagscompare = new List<ThingFlagsCompare>();
|
||||
this.brightnesslevels = new StepsList();
|
||||
this.makedoorflags = new Dictionary<string, bool>();
|
||||
this.makedoorflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
|
||||
// Read general settings
|
||||
configname = cfg.ReadSetting("game", "<unnamed game>");
|
||||
|
@ -525,14 +525,13 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// Linedef actions and action categories
|
||||
private void LoadLinedefActions()
|
||||
{
|
||||
Dictionary<string, LinedefActionCategory> cats = new Dictionary<string, LinedefActionCategory>();
|
||||
IDictionary dic;
|
||||
Dictionary<string, LinedefActionCategory> cats = new Dictionary<string, LinedefActionCategory>(StringComparer.Ordinal);
|
||||
LinedefActionInfo ai;
|
||||
LinedefActionCategory ac;
|
||||
int actionnumber;
|
||||
|
||||
// Get linedef categories
|
||||
dic = cfg.ReadSetting("linedeftypes", new Hashtable());
|
||||
IDictionary dic = cfg.ReadSetting("linedeftypes", new Hashtable());
|
||||
foreach(DictionaryEntry cde in dic)
|
||||
{
|
||||
if(cde.Value is IDictionary)
|
||||
|
|
|
@ -97,11 +97,10 @@ namespace CodeImp.DoomBuilder.Config
|
|||
internal ScriptConfiguration()
|
||||
{
|
||||
// Initialize
|
||||
//this.cfg = new Configuration();
|
||||
this.keywords = new Dictionary<string, string>();
|
||||
this.keywords = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.constants = new List<string>();
|
||||
this.lowerkeywords = new Dictionary<string, string>();
|
||||
this.lowerconstants = new Dictionary<string, string>();
|
||||
this.lowerkeywords = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.lowerconstants = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
|
||||
// Settings
|
||||
lexer = 1;
|
||||
|
@ -117,28 +116,23 @@ namespace CodeImp.DoomBuilder.Config
|
|||
terminator = "";
|
||||
functionregex = "";
|
||||
description = "Plain text";
|
||||
extensions = new string[] { "txt" };
|
||||
extensions = new[] { "txt" };
|
||||
}
|
||||
|
||||
// Constructor
|
||||
internal ScriptConfiguration(Configuration cfg)
|
||||
{
|
||||
string compilername;
|
||||
string extensionsstring;
|
||||
IDictionary dic;
|
||||
|
||||
// Initialize
|
||||
//this.cfg = cfg;
|
||||
this.keywords = new Dictionary<string,string>();
|
||||
this.keywords = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.constants = new List<string>();
|
||||
this.lowerkeywords = new Dictionary<string, string>();
|
||||
this.lowerconstants = new Dictionary<string, string>();
|
||||
this.lowerkeywords = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
this.lowerconstants = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
|
||||
// Read settings
|
||||
description = cfg.ReadSetting("description", "Untitled script");
|
||||
codepage = cfg.ReadSetting("codepage", 0);
|
||||
extensionsstring = cfg.ReadSetting("extensions", "");
|
||||
compilername = cfg.ReadSetting("compiler", "");
|
||||
string extensionsstring = cfg.ReadSetting("extensions", "");
|
||||
string compilername = cfg.ReadSetting("compiler", "");
|
||||
parameters = cfg.ReadSetting("parameters", "");
|
||||
resultlump = cfg.ReadSetting("resultlump", "");
|
||||
casesensitive = cfg.ReadSetting("casesensitive", true);
|
||||
|
@ -156,7 +150,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
for(int i = 0; i < extensions.Length; i++) extensions[i] = extensions[i].Trim();
|
||||
|
||||
// Load keywords
|
||||
dic = cfg.ReadSetting("keywords", new Hashtable());
|
||||
IDictionary dic = cfg.ReadSetting("keywords", new Hashtable());
|
||||
foreach(DictionaryEntry de in dic)
|
||||
{
|
||||
keywords.Add(de.Key.ToString(), de.Value.ToString());
|
||||
|
|
|
@ -317,7 +317,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// This sorts tabs by their full name
|
||||
public void SortTabs(IEnumerable<string> fullnames)
|
||||
{
|
||||
Dictionary<string, TabPage> pages = new Dictionary<string, TabPage>(tabs.TabPages.Count);
|
||||
Dictionary<string, TabPage> pages = new Dictionary<string, TabPage>(tabs.TabPages.Count, StringComparer.Ordinal);
|
||||
foreach(TabPage p in tabs.TabPages) pages.Add((p.Tag as Docker).FullName, p);
|
||||
tabs.TabPages.Clear();
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
|
||||
//mxd. Flags
|
||||
Dictionary<string, string> activations = new Dictionary<string, string>();
|
||||
Dictionary<string, string> activations = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) {
|
||||
activations.Add(ai.Key, ai.Title);
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
previews = new PreviewManager();
|
||||
texturesets = new List<MatchingTextureSet>();
|
||||
usedimages = new Dictionary<long, long>();
|
||||
internalsprites = new Dictionary<string, ImageData>();
|
||||
internalsprites = new Dictionary<string, ImageData>(StringComparer.Ordinal);
|
||||
thingcategories = General.Map.Config.GetThingCategories();
|
||||
thingtypes = General.Map.Config.GetThingTypes();
|
||||
|
||||
|
@ -1384,8 +1384,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
//mxd. This creates <Actor Class, Thing.Type> dictionary. Should be called after all DECORATE actors are parsed
|
||||
private Dictionary<string, int> createActorsByClassList() {
|
||||
Dictionary<string, int> actors = new Dictionary<string, int>();
|
||||
|
||||
Dictionary<string, int> actors = new Dictionary<string, int>(StringComparer.Ordinal);
|
||||
Dictionary<int, ThingTypeInfo> things = General.Map.Config.GetThingTypes();
|
||||
|
||||
//read our new shiny ClassNames for default game things
|
||||
|
@ -1459,7 +1458,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//if no actors defined in DECORATE or game config...
|
||||
if (actorsByClass == null || actorsByClass.Count == 0) return;
|
||||
|
||||
Dictionary<string, ModelData> modelDefEntriesByName = new Dictionary<string, ModelData>();
|
||||
Dictionary<string, ModelData> modelDefEntriesByName = new Dictionary<string, ModelData>(StringComparer.Ordinal);
|
||||
ModeldefParser parser = new ModeldefParser();
|
||||
|
||||
foreach (DataReader dr in containers) {
|
||||
|
@ -1491,7 +1490,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//mxd
|
||||
private void loadVoxels() {
|
||||
//Get names of all voxel models, which can be used "as is"
|
||||
Dictionary<string, bool> voxelNames = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> voxelNames = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
|
||||
foreach(DataReader dr in containers) {
|
||||
currentreader = dr;
|
||||
|
@ -1504,7 +1503,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
}
|
||||
}
|
||||
|
||||
Dictionary<string, List<int>> sprites = new Dictionary<string, List<int>>();
|
||||
Dictionary<string, List<int>> sprites = new Dictionary<string, List<int>>(StringComparer.Ordinal);
|
||||
|
||||
// Go for all things
|
||||
foreach(ThingTypeInfo ti in thingtypes.Values) {
|
||||
|
@ -1524,7 +1523,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
}
|
||||
|
||||
VoxeldefParser parser = new VoxeldefParser();
|
||||
Dictionary<string, bool> processed = new Dictionary<string,bool>();
|
||||
Dictionary<string, bool> processed = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
|
||||
//parse VOXLEDEF
|
||||
foreach(DataReader dr in containers) {
|
||||
|
@ -1553,8 +1552,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
foreach (KeyValuePair<string, List<int>> sc in sprites) {
|
||||
if(sc.Key.Contains(group.Key)) {
|
||||
//it's a model without a definition, and it corresponds to a sprite we can display, so let's add it
|
||||
ModelData data = new ModelData();
|
||||
data.IsVoxel = true;
|
||||
ModelData data = new ModelData { IsVoxel = true };
|
||||
data.ModelNames.Add(group.Key);
|
||||
|
||||
foreach(int id in sprites[sc.Key]) {
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
archiveType = archive.Type;
|
||||
|
||||
if (archive.Type == ArchiveType.SevenZip) { //random access of 7z archives works TERRIBLY slow in SharpCompress
|
||||
sevenZipEntries = new Dictionary<string, byte[]>();
|
||||
sevenZipEntries = new Dictionary<string, byte[]>(StringComparer.Ordinal);
|
||||
|
||||
IReader reader = archive.ExtractAllEntries();
|
||||
while (reader.MoveToNextEntry()) {
|
||||
|
|
|
@ -471,7 +471,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
//modedef should be in root folder
|
||||
string[] allFiles = GetAllFiles("", false);
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
|
||||
foreach (string s in allFiles) {
|
||||
if (s.ToLowerInvariant().IndexOf("modeldef") != -1) {
|
||||
|
@ -526,7 +526,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
//mxd
|
||||
public override Dictionary<string, Stream> GetMapinfoData() {
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
// Error when suspended
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
|
@ -553,7 +553,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// Error when suspended
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
|
||||
//at least one of gldefs should be in root folder
|
||||
string[] allFiles = GetAllFiles("", false);
|
||||
|
@ -583,7 +583,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// Error when suspended
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
Stream s = LoadFile(location);
|
||||
if (s != null) streams.Add(location, s);
|
||||
return streams;
|
||||
|
|
|
@ -386,7 +386,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(t.Name.Length > 0)
|
||||
{
|
||||
// Add the texture
|
||||
ImageData img = t.MakeImage(textures, flats);
|
||||
ImageData img = t.MakeImage();
|
||||
images.Add(img);
|
||||
}
|
||||
else
|
||||
|
@ -624,7 +624,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(t.Name.Length > 0)
|
||||
{
|
||||
// Add the texture
|
||||
ImageData img = t.MakeImage(textures, flats);
|
||||
ImageData img = t.MakeImage();
|
||||
images.Add(img);
|
||||
}
|
||||
else
|
||||
|
@ -694,7 +694,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(t.Name.Length > 0)
|
||||
{
|
||||
// Add the sprite
|
||||
ImageData img = t.MakeImage(textures, flats);
|
||||
ImageData img = t.MakeImage();
|
||||
images.Add(img);
|
||||
}
|
||||
else
|
||||
|
@ -794,14 +794,13 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// This finds and returns a sprite stream
|
||||
public override List<Stream> GetDecorateData(string pname)
|
||||
{
|
||||
List<Stream> streams = new List<Stream>();
|
||||
int lumpindex;
|
||||
|
||||
// Error when suspended
|
||||
if(issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
|
||||
List<Stream> streams = new List<Stream>();
|
||||
|
||||
// Find all lumps named 'DECORATE'
|
||||
lumpindex = file.FindLumpIndex(pname);
|
||||
int lumpindex = file.FindLumpIndex(pname);
|
||||
while(lumpindex > -1)
|
||||
{
|
||||
streams.Add(file.Lumps[lumpindex].Stream);
|
||||
|
@ -817,13 +816,12 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public override Dictionary<string, Stream> GetMapinfoData() {
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
int lumpindex;
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
string src = "ZMAPINFO";
|
||||
|
||||
//should be only one entry per wad
|
||||
//first look for ZMAPINFO
|
||||
lumpindex = file.FindLumpIndex(src);
|
||||
int lumpindex = file.FindLumpIndex(src);
|
||||
|
||||
//then for MAPINFO
|
||||
if (lumpindex == -1) {
|
||||
|
@ -841,7 +839,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public override Dictionary<string, Stream> GetGldefsData(GameType gameType) {
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
int lumpindex;
|
||||
|
||||
//try to load game specific GLDEFS first
|
||||
|
@ -866,10 +864,8 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public override Dictionary<string, Stream> GetGldefsData(string location) {
|
||||
if (issuspended) throw new Exception("Data reader is suspended");
|
||||
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>();
|
||||
int lumpindex;
|
||||
|
||||
lumpindex = file.FindLumpIndex(location);
|
||||
Dictionary<string, Stream> streams = new Dictionary<string, Stream>(StringComparer.Ordinal);
|
||||
int lumpindex = file.FindLumpIndex(location);
|
||||
|
||||
if (lumpindex != -1)
|
||||
streams.Add(location, file.Lumps[lumpindex].Stream);
|
||||
|
|
|
@ -134,8 +134,6 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// (when user presses shortcut key)
|
||||
public void UserSwitchToMode()
|
||||
{
|
||||
EditMode newmode;
|
||||
|
||||
// Only when a map is opened
|
||||
if(General.Map != null)
|
||||
{
|
||||
|
@ -155,7 +153,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
else
|
||||
{
|
||||
// Create instance
|
||||
newmode = plugin.CreateObject<EditMode>(type);
|
||||
EditMode newmode = plugin.CreateObject<EditMode>(type);
|
||||
|
||||
// Switch mode
|
||||
General.Editing.ChangeMode(newmode);
|
||||
|
@ -166,13 +164,11 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// This switches to the mode
|
||||
public void SwitchToMode()
|
||||
{
|
||||
EditMode newmode;
|
||||
|
||||
// Only when a map is opened
|
||||
if(General.Map != null)
|
||||
{
|
||||
// Create instance
|
||||
newmode = plugin.CreateObject<EditMode>(type);
|
||||
EditMode newmode = plugin.CreateObject<EditMode>(type);
|
||||
|
||||
// Switch mode
|
||||
General.Editing.ChangeMode(newmode);
|
||||
|
@ -182,13 +178,11 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// This switches to the mode with arguments
|
||||
public void SwitchToMode(object[] args)
|
||||
{
|
||||
EditMode newmode;
|
||||
|
||||
// Only when a map is opened
|
||||
if(General.Map != null)
|
||||
{
|
||||
// Create instance
|
||||
newmode = plugin.CreateObjectA<EditMode>(type, args);
|
||||
EditMode newmode = plugin.CreateObjectA<EditMode>(type, args);
|
||||
|
||||
// Switch mode
|
||||
if(!General.Editing.ChangeMode(newmode))
|
||||
|
@ -209,8 +203,8 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
public int CompareTo(EditModeInfo other)
|
||||
{
|
||||
if(this.buttonorder > other.buttonorder) return 1;
|
||||
else if(this.buttonorder < other.buttonorder) return -1;
|
||||
else return 0;
|
||||
if(this.buttonorder < other.buttonorder) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Go for all the editing mode groups
|
||||
foreach(string grp in groups)
|
||||
{
|
||||
General.MainWindow.AddEditModeSeperator();
|
||||
General.MainWindow.AddEditModeSeperator(grp);
|
||||
|
||||
// Go for all used edit modes to add buttons
|
||||
foreach(EditModeInfo emi in usedmodes)
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
||||
namespace CodeImp.DoomBuilder.GZBuilder.Data {
|
||||
public sealed class ThingCopyData {
|
||||
// Properties
|
||||
private int type;
|
||||
private Vector3D pos;
|
||||
private int angledoom; // Angle as entered / stored in file
|
||||
private Dictionary<string, bool> flags;
|
||||
private int tag;
|
||||
private int action;
|
||||
private int[] args;
|
||||
private UniFields fields;
|
||||
private readonly int type;
|
||||
private readonly Vector3D pos;
|
||||
private readonly int angledoom; // Angle as entered / stored in file
|
||||
private readonly Dictionary<string, bool> flags;
|
||||
private readonly int tag;
|
||||
private readonly int action;
|
||||
private readonly int[] args;
|
||||
private readonly UniFields fields;
|
||||
|
||||
public Vector3D Position { get { return pos; } }
|
||||
|
||||
|
@ -20,7 +21,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data {
|
|||
type = t.Type;
|
||||
angledoom = t.AngleDoom;
|
||||
pos = t.Position;
|
||||
flags = new Dictionary<string, bool>(t.Flags); //t.Flags;
|
||||
flags = new Dictionary<string, bool>(t.Flags);
|
||||
tag = t.Tag;
|
||||
action = t.Action;
|
||||
args = (int[])t.Args.Clone();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using CodeImp.DoomBuilder.ZDoom;
|
||||
|
@ -26,13 +27,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom {
|
|||
public const string FLICKER2 = "flickerlight2";
|
||||
public const string SECTOR = "sectorlight";
|
||||
|
||||
public static Dictionary<string, DynamicLightType> GLDEFS_TO_GZDOOM_LIGHT_TYPE = new Dictionary<string, DynamicLightType>() { { POINT, DynamicLightType.NORMAL }, { PULSE, DynamicLightType.PULSE }, { FLICKER, DynamicLightType.FLICKER }, { FLICKER2, DynamicLightType.RANDOM }, { SECTOR, DynamicLightType.SECTOR } };
|
||||
public static Dictionary<string, DynamicLightType> GLDEFS_TO_GZDOOM_LIGHT_TYPE = new Dictionary<string, DynamicLightType>(StringComparer.Ordinal) { { POINT, DynamicLightType.NORMAL }, { PULSE, DynamicLightType.PULSE }, { FLICKER, DynamicLightType.FLICKER }, { FLICKER2, DynamicLightType.RANDOM }, { SECTOR, DynamicLightType.SECTOR } };
|
||||
}
|
||||
|
||||
public GldefsParser() {
|
||||
parsedLumps = new List<string>();
|
||||
lightsByName = new Dictionary<string, DynamicLightData>(); //LightName, Light params
|
||||
objects = new Dictionary<string, string>(); //ClassName, LightName
|
||||
lightsByName = new Dictionary<string, DynamicLightData>(StringComparer.Ordinal); //LightName, Light params
|
||||
objects = new Dictionary<string, string>(StringComparer.Ordinal); //ClassName, LightName
|
||||
}
|
||||
|
||||
public override bool Parse(Stream stream, string sourcefilename) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.ZDoom;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Data;
|
||||
|
@ -11,13 +12,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom {
|
|||
internal string Source { get { return sourcename; } }
|
||||
|
||||
internal ModeldefParser() {
|
||||
entries = new Dictionary<string, ModelData>();
|
||||
entries = new Dictionary<string, ModelData>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
//should be called after all decorate actors are parsed
|
||||
public override bool Parse(Stream stream, string sourcefilename) {
|
||||
base.Parse(stream, sourcefilename);
|
||||
entries = new Dictionary<string, ModelData>();
|
||||
entries = new Dictionary<string, ModelData>(StringComparer.Ordinal);
|
||||
|
||||
// Continue until at the end of the stream
|
||||
while (SkipWhitespace(true)) {
|
||||
|
|
|
@ -243,9 +243,9 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
|
|||
List<int> polyIndecesList = new List<int>();
|
||||
List<WorldVertex> vertList = new List<WorldVertex>();
|
||||
|
||||
Dictionary<string, List<List<int>>> polyIndecesListsPerTexture = new Dictionary<string, List<List<int>>>();
|
||||
Dictionary<string, List<WorldVertex>> vertListsPerTexture = new Dictionary<string, List<WorldVertex>>();
|
||||
Dictionary<string, List<int>> vertexOffsets = new Dictionary<string, List<int>>();
|
||||
Dictionary<string, List<List<int>>> polyIndecesListsPerTexture = new Dictionary<string, List<List<int>>>(StringComparer.Ordinal);
|
||||
Dictionary<string, List<WorldVertex>> vertListsPerTexture = new Dictionary<string, List<WorldVertex>>(StringComparer.Ordinal);
|
||||
Dictionary<string, List<int>> vertexOffsets = new Dictionary<string, List<int>>(StringComparer.Ordinal);
|
||||
|
||||
string error;
|
||||
for (int c = 0; c < numSurfaces; c++) {
|
||||
|
|
|
@ -400,7 +400,7 @@ namespace CodeImp.DoomBuilder
|
|||
mainwindow.DisplayStatus(StatusType.Busy, "Loading script configurations...");
|
||||
|
||||
// Make collection
|
||||
scriptconfigs = new Dictionary<string, ScriptConfiguration>();
|
||||
scriptconfigs = new Dictionary<string, ScriptConfiguration>(StringComparer.Ordinal);
|
||||
|
||||
// Go for all cfg files in the scripts directory
|
||||
filenames = Directory.GetFiles(scriptspath, "*.cfg", SearchOption.TopDirectoryOnly);
|
||||
|
@ -447,7 +447,7 @@ namespace CodeImp.DoomBuilder
|
|||
private static void LoadAllCompilerConfigurations()
|
||||
{
|
||||
Configuration cfg;
|
||||
Dictionary<string, CompilerInfo> addedcompilers = new Dictionary<string,CompilerInfo>();
|
||||
Dictionary<string, CompilerInfo> addedcompilers = new Dictionary<string, CompilerInfo>(StringComparer.Ordinal);
|
||||
IDictionary compilerslist;
|
||||
string[] filenames;
|
||||
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
@ -1768,6 +1770,164 @@ namespace CodeImp.DoomBuilder {
|
|||
return graphics.Font.GetTextSize(text, scale);
|
||||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("snapvertstogrid")]
|
||||
public void SnapVerticesToGrid() {
|
||||
ICollection<Vertex> verts = map.GetSelectedVertices(true);
|
||||
|
||||
//snap vertices?
|
||||
if (verts.Count > 0) {
|
||||
snapVertices(verts);
|
||||
return;
|
||||
}
|
||||
|
||||
//snap things?..
|
||||
ICollection<Thing> things = map.GetSelectedThings(true);
|
||||
if(things.Count == 0) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Select any map element first!");
|
||||
} else {
|
||||
snapThings(things);
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void snapVertices(ICollection<Vertex> verts) {
|
||||
//we are terribly busy...
|
||||
Cursor.Current = Cursors.AppStarting;
|
||||
|
||||
// Make undo for the snapping
|
||||
General.Map.UndoRedo.CreateUndo("Snap vertices");
|
||||
|
||||
int snappedCount = 0;
|
||||
List<Vertex> movedVerts = new List<Vertex>();
|
||||
List<Linedef> movedLines = new List<Linedef>();
|
||||
|
||||
//snap them all!
|
||||
foreach(Vertex v in verts) {
|
||||
Vector2D pos = v.Position;
|
||||
v.SnapToGrid();
|
||||
|
||||
if(v.Position.x != pos.x || v.Position.y != pos.y) {
|
||||
snappedCount++;
|
||||
movedVerts.Add(v);
|
||||
foreach(Linedef l in v.Linedefs) {
|
||||
if(!movedLines.Contains(l)) movedLines.Add(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Create blockmap
|
||||
RectangleF area = MapSet.CreateArea(General.Map.Map.Vertices);
|
||||
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
|
||||
blockmap.AddVerticesSet(General.Map.Map.Vertices);
|
||||
|
||||
//merge overlapping vertices using teh power of BLOCKMAP!!!11
|
||||
BlockEntry block;
|
||||
foreach(Vertex v in movedVerts) {
|
||||
block = blockmap.GetBlockAt(v.Position);
|
||||
if(block == null) continue;
|
||||
|
||||
foreach(Vertex blockVert in block.Vertices) {
|
||||
if(blockVert.IsDisposed || blockVert.Index == v.Index || blockVert.Position != v.Position)
|
||||
continue;
|
||||
|
||||
foreach (Linedef l in blockVert.Linedefs) {
|
||||
if (!movedLines.Contains(l)) movedLines.Add(l);
|
||||
}
|
||||
v.Join(blockVert);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update cached values of lines because we may need their length/angle
|
||||
General.Map.Map.Update(true, false);
|
||||
|
||||
General.Map.Map.BeginAddRemove();
|
||||
MapSet.RemoveLoopedLinedefs(movedLines);
|
||||
MapSet.JoinOverlappingLines(movedLines);
|
||||
General.Map.Map.EndAddRemove();
|
||||
|
||||
//get changed sectors
|
||||
List<Sector> changedSectors = new List<Sector>();
|
||||
foreach(Linedef l in movedLines) {
|
||||
if(l == null || l.IsDisposed) continue;
|
||||
if(l.Front != null && l.Front.Sector != null && !changedSectors.Contains(l.Front.Sector))
|
||||
changedSectors.Add(l.Front.Sector);
|
||||
if(l.Back != null && l.Back.Sector != null && !changedSectors.Contains(l.Back.Sector))
|
||||
changedSectors.Add(l.Back.Sector);
|
||||
}
|
||||
|
||||
// Now update area of sectors
|
||||
General.Map.Map.Update(false, true);
|
||||
|
||||
//fix invalid sectors
|
||||
foreach(Sector s in changedSectors) {
|
||||
if(s.BBox.IsEmpty) {
|
||||
s.Dispose();
|
||||
} else if(s.Sidedefs.Count < 3) {
|
||||
bool merged = false;
|
||||
foreach(Sidedef side in s.Sidedefs) {
|
||||
if(side.Other != null && side.Other.Sector != null) {
|
||||
s.Join(side.Other.Sector);
|
||||
merged = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//oh well, I don't know what else I can do here...
|
||||
if(!merged) s.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
//display status
|
||||
General.Interface.DisplayStatus(StatusType.Info, "Snapped " + snappedCount + " vertices.");
|
||||
MessageBox.Show("Snapped " + snappedCount + " vertices." + Environment.NewLine + "It's a good idea to run Map Analysis Mode now.");
|
||||
|
||||
//done
|
||||
if(snappedCount > 0) {
|
||||
// Update cached values
|
||||
General.Map.Map.Update();
|
||||
// Map is changed
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
General.Interface.RedrawDisplay();
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void snapThings(ICollection<Thing> things) {
|
||||
//we are terribly busy...
|
||||
Cursor.Current = Cursors.AppStarting;
|
||||
|
||||
// Make undo for the snapping
|
||||
General.Map.UndoRedo.CreateUndo("Snap things");
|
||||
|
||||
int snappedCount = 0;
|
||||
|
||||
//snap them all!
|
||||
foreach(Thing t in things) {
|
||||
Vector2D pos = t.Position;
|
||||
t.SnapToGrid();
|
||||
if(t.Position.x != pos.x || t.Position.y != pos.y) snappedCount++;
|
||||
}
|
||||
|
||||
//display status
|
||||
General.Interface.DisplayStatus(StatusType.Info, "Snapped " + snappedCount + " things.");
|
||||
|
||||
//done
|
||||
if(snappedCount > 0) {
|
||||
// Update cached values
|
||||
General.Map.Map.Update();
|
||||
// Map is changed
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
//done, I said!
|
||||
General.Interface.RedrawDisplay();
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -472,7 +472,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
todo.Remove(found);
|
||||
|
||||
// Get cut start and end
|
||||
SplitOuterWithInner(foundstart, p, found.Value);
|
||||
SplitOuterWithInner(foundstart, p);
|
||||
}
|
||||
|
||||
// Remove the children, they should be merged in the polygon by now
|
||||
|
@ -497,7 +497,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
}
|
||||
|
||||
// This finds the cut coordinates and splits the other poly with inner vertices
|
||||
private void SplitOuterWithInner(LinkedListNode<EarClipVertex> start, EarClipPolygon p, EarClipPolygon inner)
|
||||
private void SplitOuterWithInner(LinkedListNode<EarClipVertex> start, EarClipPolygon p)
|
||||
{
|
||||
LinkedListNode<EarClipVertex> v1, v2;
|
||||
LinkedListNode<EarClipVertex> insertbefore = null;
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
string tceil = ReadString(reader);
|
||||
|
||||
//flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
int numFlags = reader.ReadInt32();
|
||||
for(int f = 0; f < numFlags; f++)
|
||||
stringflags.Add(ReadString(reader), true);
|
||||
|
@ -154,7 +154,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
}
|
||||
|
||||
//flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
int numFlags = reader.ReadInt32();
|
||||
for(int f = 0; f < numFlags; f++)
|
||||
stringflags.Add(ReadString(reader), true);
|
||||
|
@ -191,14 +191,14 @@ namespace CodeImp.DoomBuilder.IO
|
|||
// Connect sidedefs to the line
|
||||
if(s1 > -1) {
|
||||
if(s1 < sidedeflink.Count)
|
||||
AddSidedef(map, sidedeflink[s1], l, true, sectorlink, s1);
|
||||
AddSidedef(map, sidedeflink[s1], l, true, sectorlink);
|
||||
else
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + i + " references invalid front sidedef " + s1 + ". Sidedef has been removed.");
|
||||
}
|
||||
|
||||
if(s2 > -1) {
|
||||
if(s2 < sidedeflink.Count)
|
||||
AddSidedef(map, sidedeflink[s2], l, false, sectorlink, s2);
|
||||
AddSidedef(map, sidedeflink[s2], l, false, sectorlink);
|
||||
else
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + i + " references invalid back sidedef " + s1 + ". Sidedef has been removed.");
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
}
|
||||
}
|
||||
|
||||
private void AddSidedef(MapSet map, SidedefData data, Linedef ld, bool front, Dictionary<int, Sector> sectorlink, int index) {
|
||||
private void AddSidedef(MapSet map, SidedefData data, Linedef ld, bool front, Dictionary<int, Sector> sectorlink) {
|
||||
// Create sidedef
|
||||
if(sectorlink.ContainsKey(data.SectorID)) {
|
||||
Sidedef s = map.CreateSidedef(ld, front, sectorlink[data.SectorID]);
|
||||
|
@ -241,7 +241,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
data.LowTexture = ReadString(reader);
|
||||
|
||||
//flags
|
||||
data.Flags = new Dictionary<string, bool>();
|
||||
data.Flags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
int numFlags = reader.ReadInt32();
|
||||
for(int f = 0; f < numFlags; f++)
|
||||
data.Flags.Add(ReadString(reader), true);
|
||||
|
@ -280,7 +280,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
}
|
||||
|
||||
//flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
int numFlags = reader.ReadInt32();
|
||||
for(int f = 0; f < numFlags; f++)
|
||||
stringflags.Add(ReadString(reader), true);
|
||||
|
@ -307,7 +307,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
}
|
||||
|
||||
private Dictionary<string, UniValue> ReadCustomFields(BinaryReader reader) {
|
||||
Dictionary<string, UniValue> fields = new Dictionary<string, UniValue>();
|
||||
Dictionary<string, UniValue> fields = new Dictionary<string, UniValue>(StringComparer.Ordinal);
|
||||
int fieldscount = reader.ReadInt32();
|
||||
|
||||
for(int f = 0; f < fieldscount; f++) {
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
}
|
||||
|
||||
private void AddCustomFields(UniFields elementFields, string elementname, BinaryWriter writer) {
|
||||
Dictionary<string, UniValue> fields = new Dictionary<string, UniValue>();
|
||||
Dictionary<string, UniValue> fields = new Dictionary<string, UniValue>(StringComparer.Ordinal);
|
||||
|
||||
foreach(KeyValuePair<string, UniValue> f in elementFields) {
|
||||
if(config.SettingExists("managedfields." + elementname + "." + f.Key)) continue;
|
||||
|
|
|
@ -182,7 +182,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
private IDictionary root;
|
||||
|
||||
//mxd. Cache
|
||||
private static Dictionary<string, IDictionary> cfgcache = new Dictionary<string, IDictionary>();
|
||||
private static Dictionary<string, IDictionary> cfgcache = new Dictionary<string, IDictionary>(StringComparer.Ordinal);
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
|
@ -46,7 +47,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
path = Path.GetFullPath(path);
|
||||
string[] files = Directory.GetFiles(path, "*", subdirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
|
||||
entries = new DirectoryFileEntry[files.Length];
|
||||
hashedentries = new Dictionary<string, DirectoryFileEntry>(files.Length);
|
||||
hashedentries = new Dictionary<string, DirectoryFileEntry>(files.Length, StringComparer.Ordinal);
|
||||
for(int i = 0; i < files.Length; i++)
|
||||
{
|
||||
entries[i] = new DirectoryFileEntry(files[i], path);
|
||||
|
@ -62,7 +63,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
{
|
||||
int index = 0;
|
||||
entries = new DirectoryFileEntry[sourceentries.Count];
|
||||
hashedentries = new Dictionary<string, DirectoryFileEntry>(sourceentries.Count);
|
||||
hashedentries = new Dictionary<string, DirectoryFileEntry>(sourceentries.Count, StringComparer.Ordinal);
|
||||
foreach(DirectoryFileEntry e in sourceentries)
|
||||
{
|
||||
entries[index] = e;
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
flags = reader.ReadUInt16();
|
||||
|
||||
// Make string flags
|
||||
stringflags = new Dictionary<string, bool>();
|
||||
stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> f in manager.Config.ThingFlags)
|
||||
{
|
||||
int fnum;
|
||||
|
@ -301,7 +301,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
s2 = readline.ReadUInt16();
|
||||
|
||||
// Make string flags
|
||||
stringflags = new Dictionary<string, bool>();
|
||||
stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(string f in manager.Config.SortedLinedefFlags)
|
||||
{
|
||||
int fnum;
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
args[4] = reader.ReadByte();
|
||||
|
||||
// Make string flags
|
||||
stringflags = new Dictionary<string, bool>();
|
||||
stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> f in manager.Config.ThingFlags)
|
||||
{
|
||||
int fnum;
|
||||
|
@ -316,7 +316,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
s2 = readline.ReadUInt16();
|
||||
|
||||
// Make string flags
|
||||
stringflags = new Dictionary<string, bool>();
|
||||
stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(string f in manager.Config.SortedLinedefFlags)
|
||||
{
|
||||
int fnum;
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
// Initialize
|
||||
this.wad = wad;
|
||||
this.manager = manager;
|
||||
this.uifields = new Dictionary<string, Dictionary<string, UniversalType>>(); //mxd
|
||||
this.uifields = new Dictionary<string, Dictionary<string, UniversalType>>(StringComparer.Ordinal); //mxd
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.IO;
|
||||
|
@ -52,7 +53,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
// Initialize
|
||||
//this.stream = stream;
|
||||
this.writer = new BinaryWriter(stream);
|
||||
this.stringstable = new Dictionary<string, ushort>();
|
||||
this.stringstable = new Dictionary<string, ushort>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
foreach(string elementname in elements) {
|
||||
IDictionary dic = config.ReadSetting("uifields." + elementname, new Hashtable());
|
||||
|
||||
Dictionary<string, UniversalType> values = new Dictionary<string, UniversalType>();
|
||||
Dictionary<string, UniversalType> values = new Dictionary<string, UniversalType>(StringComparer.Ordinal);
|
||||
foreach(DictionaryEntry de in dic) {
|
||||
values.Add(de.Key.ToString(), (UniversalType)de.Value);
|
||||
}
|
||||
|
|
|
@ -833,13 +833,13 @@ namespace CodeImp.DoomBuilder.IO
|
|||
// Parse the data to the root structure
|
||||
int pos = 0;
|
||||
int line = 1;
|
||||
matches = new Dictionary<string, UniversalEntry>(); //mxd
|
||||
matches = new Dictionary<string, UniversalEntry>(StringComparer.Ordinal); //mxd
|
||||
key = new StringBuilder(16); //mxd
|
||||
val = new StringBuilder(16); //mxd
|
||||
root = InputStructure(ref data, ref pos, ref line, true);
|
||||
|
||||
// Return true when done, false when errors occurred
|
||||
if(cpErrorResult == 0) return true; else return false;
|
||||
return (cpErrorResult == 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -207,7 +207,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
args[4] = GetCollectionEntry<int>(c, "arg4", false, 0, where);
|
||||
|
||||
// Flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> flag in General.Map.Config.ThingFlags)
|
||||
stringflags[flag.Key] = GetCollectionEntry<bool>(c, flag.Key, false, false, where);
|
||||
foreach(FlagTranslation ft in General.Map.Config.ThingFlagsTranslation)
|
||||
|
@ -263,7 +263,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
int s2 = GetCollectionEntry<int>(lc, "sideback", false, -1, where);
|
||||
|
||||
// Flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> flag in General.Map.Config.LinedefFlags)
|
||||
stringflags[flag.Key] = GetCollectionEntry<bool>(lc, flag.Key, false, false, where);
|
||||
foreach(FlagTranslation ft in General.Map.Config.LinedefFlagsTranslation)
|
||||
|
@ -328,7 +328,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
int sector = GetCollectionEntry<int>(sc, "sector", true, 0, where);
|
||||
|
||||
//mxd. Flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> flag in General.Map.Config.SidedefFlags)
|
||||
stringflags[flag.Key] = GetCollectionEntry<bool>(sc, flag.Key, false, false, where);
|
||||
|
||||
|
@ -377,7 +377,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
int tag = GetCollectionEntry<int>(c, "id", false, 0, where);
|
||||
|
||||
//mxd. Flags
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>();
|
||||
Dictionary<string, bool> stringflags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
foreach(KeyValuePair<string, string> flag in General.Map.Config.SectorFlags)
|
||||
stringflags[flag.Key] = GetCollectionEntry<bool>(c, flag.Key, false, false, where);
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.listindex = listindex;
|
||||
this.updateneeded = true;
|
||||
this.args = new int[NUM_ARGS];
|
||||
this.flags = new Dictionary<string, bool>();
|
||||
this.flags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
this.colorPresetIndex = -1;//mxd
|
||||
|
||||
// Attach to vertices
|
||||
|
@ -207,7 +207,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
int c; s.rInt(out c);
|
||||
|
||||
flags = new Dictionary<string, bool>(c);
|
||||
flags = new Dictionary<string, bool>(c, StringComparer.Ordinal);
|
||||
for(int i = 0; i < c; i++)
|
||||
{
|
||||
string t; s.rString(out t);
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.ceiltexname = "-";
|
||||
this.longfloortexname = MapSet.EmptyLongName;
|
||||
this.longceiltexname = MapSet.EmptyLongName;
|
||||
this.flags = new Dictionary<string, bool>(); //mxd
|
||||
this.flags = new Dictionary<string, bool>(StringComparer.Ordinal); //mxd
|
||||
this.updateneeded = true;
|
||||
this.triangulationneeded = true;
|
||||
this.surfaceentries = new SurfaceEntryCollection();
|
||||
|
@ -211,7 +211,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
} else {
|
||||
int c; s.rInt(out c);
|
||||
|
||||
flags = new Dictionary<string, bool>(c);
|
||||
flags = new Dictionary<string, bool>(c, StringComparer.Ordinal);
|
||||
for(int i = 0; i < c; i++) {
|
||||
string t; s.rString(out t);
|
||||
bool b; s.rBool(out b);
|
||||
|
@ -553,7 +553,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
//mxd. This updates all properties (Doom/Hexen version)
|
||||
public void Update(int hfloor, int hceil, string tfloor, string tceil, int effect, int tag, int brightness)
|
||||
{
|
||||
Update(hfloor, hceil, tfloor, tceil, effect, new Dictionary<string, bool>(), tag, brightness);
|
||||
Update(hfloor, hceil, tfloor, tceil, effect, new Dictionary<string, bool>(StringComparer.Ordinal), tag, brightness);
|
||||
}
|
||||
|
||||
//mxd. This updates all properties (UDMF version)
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.longtexnamehigh = MapSet.EmptyLongName;
|
||||
this.longtexnamemid = MapSet.EmptyLongName;
|
||||
this.longtexnamelow = MapSet.EmptyLongName;
|
||||
this.flags = new Dictionary<string, bool>(); //mxd
|
||||
this.flags = new Dictionary<string, bool>(StringComparer.Ordinal); //mxd
|
||||
|
||||
// Attach linedef
|
||||
this.linedef = l;
|
||||
|
@ -180,7 +180,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
int c;
|
||||
s.rInt(out c);
|
||||
|
||||
flags = new Dictionary<string, bool>(c);
|
||||
flags = new Dictionary<string, bool>(c, StringComparer.Ordinal);
|
||||
for(int i = 0; i < c; i++) {
|
||||
string t;
|
||||
s.rString(out t);
|
||||
|
@ -513,7 +513,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
// This updates all properties
|
||||
public void Update(int offsetx, int offsety, string thigh, string tmid, string tlow) {
|
||||
Update(offsetx, offsety, thigh, tmid, tlow, new Dictionary<string, bool>());
|
||||
Update(offsetx, offsety, thigh, tmid, tlow, new Dictionary<string, bool>(StringComparer.Ordinal));
|
||||
}
|
||||
|
||||
//mxd. This updates all properties (UDMF version)
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Initialize
|
||||
this.map = map;
|
||||
this.listindex = listindex;
|
||||
this.flags = new Dictionary<string, bool>();
|
||||
this.flags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
this.args = new int[NUM_ARGS];
|
||||
this.scale = 1.0f; //mxd
|
||||
|
||||
|
@ -167,7 +167,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
int c; s.rInt(out c);
|
||||
|
||||
flags = new Dictionary<string, bool>(c);
|
||||
flags = new Dictionary<string, bool>(c, StringComparer.Ordinal);
|
||||
for(int i = 0; i < c; i++)
|
||||
{
|
||||
string t; s.rString(out t);
|
||||
|
|
9
Source/Core/Properties/Resources.Designer.cs
generated
9
Source/Core/Properties/Resources.Designer.cs
generated
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
// Runtime Version:2.0.50727.5420
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -557,6 +557,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap SnapVerts {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SnapVerts", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Splash3_small {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Splash3_small", resourceCulture);
|
||||
|
|
|
@ -124,6 +124,9 @@
|
|||
<data name="ArrowUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Keyboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Keyboard.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -175,15 +178,15 @@
|
|||
<data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Model" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ScriptPalette" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ScriptPalette.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Splash3_trans" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash3_trans.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -193,17 +196,11 @@
|
|||
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Status0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Model" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="mergegeometry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -244,6 +241,9 @@
|
|||
<data name="Question" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Question.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Cursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Reset" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -283,6 +283,9 @@
|
|||
<data name="ErrorLarge" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -292,6 +295,9 @@
|
|||
<data name="Zoom_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Model_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Model_selected.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -340,14 +346,14 @@
|
|||
<data name="Add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -364,14 +370,17 @@
|
|||
<data name="ViewNormal" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ViewNormal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Monster3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Monster3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -382,8 +391,8 @@
|
|||
<data name="OpenScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Status11" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -400,13 +409,7 @@
|
|||
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Cursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -131,6 +131,17 @@ mapoptions
|
|||
allowscroll = false;
|
||||
}
|
||||
|
||||
//mxd
|
||||
snapvertstogrid
|
||||
{
|
||||
title = "Snap Selected Map Elements to Grid";
|
||||
category = "edit";
|
||||
description = "Snaps selected map elements to grid.";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
||||
configuration
|
||||
{
|
||||
title = "Game Configurations";
|
||||
|
|
BIN
Source/Core/Resources/SnapVerts.png
Normal file
BIN
Source/Core/Resources/SnapVerts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 368 B |
|
@ -128,6 +128,17 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
/// <param name="menu">The menu to add to Doom Builder.</param>
|
||||
/// <param name="section">The location where to insert the menu or item.</param>
|
||||
void AddMenu(ToolStripMenuItem menu, MenuSection section);
|
||||
|
||||
/// <summary>
|
||||
/// This adds a menu or menu item to the speicfied group inside of "Modes" menu strip.
|
||||
/// <para>
|
||||
/// NOTE: When the Tag property of menu items is set with a string, this changes the
|
||||
/// tag to a fully qualified action name by prefixing it with the assembly name.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="menu">The menu to add to Doom Builder.</param>
|
||||
/// <param name="group">The group in the "Modes" menu in which to insert the menu.</param>
|
||||
void AddModesMenu(ToolStripMenuItem menu, string group);
|
||||
|
||||
/// <summary>
|
||||
/// This removes a menu from the Doom Builder menu strip.
|
||||
|
@ -153,6 +164,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
/// </summary>
|
||||
void AddButton(ToolStripItem button, ToolbarSection section);
|
||||
|
||||
/// <summary>
|
||||
/// This adds a custom button to the Modes section in the toolbar. Note that the visibility of the button will be controlled by the user's preferences of that section!
|
||||
/// </summary>
|
||||
void AddModesButton(ToolStripItem toolbarButton, string group);
|
||||
|
||||
/// <summary>
|
||||
/// This removes a custom button from the toolbar.
|
||||
/// </summary>
|
||||
|
|
95
Source/Core/Windows/MainForm.Designer.cs
generated
95
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -47,7 +47,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.seperatorprefabs = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.seperatorundo = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.seperatormodes = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.poscommalabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.menumain = new System.Windows.Forms.MenuStrip();
|
||||
this.menufile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -75,6 +74,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.seperatoreditgeometry = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemgriddec = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemdosnaptogrid = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemgridsetup = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.addToGroup = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -134,6 +134,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemscripteditor = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menumode = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.separatorDrawModes = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.separatorTransformModes = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuprefabs = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.iteminsertprefabfile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.iteminsertpreviousprefab = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -248,8 +249,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.statusflasher = new System.Windows.Forms.Timer(this.components);
|
||||
this.statusresetter = new System.Windows.Forms.Timer(this.components);
|
||||
this.dockersspace = new System.Windows.Forms.Panel();
|
||||
this.modestoolbar = new System.Windows.Forms.ToolStrip();
|
||||
this.dockerspanel = new CodeImp.DoomBuilder.Controls.DockersControl();
|
||||
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
|
||||
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.modecontrolsloolbar = new System.Windows.Forms.ToolStrip();
|
||||
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -261,6 +265,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolbarContextMenu.SuspendLayout();
|
||||
this.statusbar.SuspendLayout();
|
||||
this.panelinfo.SuspendLayout();
|
||||
this.flowLayoutPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// toolStripSeparator1
|
||||
|
@ -351,13 +356,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.seperatorcopypaste.Name = "seperatorcopypaste";
|
||||
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// seperatormodes
|
||||
//
|
||||
this.seperatormodes.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.seperatormodes.Name = "seperatormodes";
|
||||
this.seperatormodes.Size = new System.Drawing.Size(6, 25);
|
||||
this.seperatormodes.Visible = false;
|
||||
//
|
||||
// poscommalabel
|
||||
//
|
||||
this.poscommalabel.Name = "poscommalabel";
|
||||
|
@ -369,6 +367,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// menumain
|
||||
//
|
||||
this.menumain.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.menumain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menufile,
|
||||
this.menuedit,
|
||||
|
@ -379,7 +378,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.menuhelp});
|
||||
this.menumain.Location = new System.Drawing.Point(0, 0);
|
||||
this.menumain.Name = "menumain";
|
||||
this.menumain.Size = new System.Drawing.Size(1012, 24);
|
||||
this.menumain.Size = new System.Drawing.Size(328, 24);
|
||||
this.menumain.TabIndex = 0;
|
||||
//
|
||||
// menufile
|
||||
|
@ -498,6 +497,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.seperatoreditgeometry,
|
||||
this.itemgridinc,
|
||||
this.itemgriddec,
|
||||
this.itemdosnaptogrid,
|
||||
this.itemgridsetup,
|
||||
this.toolStripSeparator5,
|
||||
this.addToGroup,
|
||||
|
@ -626,6 +626,15 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemgriddec.Text = "&Decrease Grid";
|
||||
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// itemdosnaptogrid
|
||||
//
|
||||
this.itemdosnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.SnapVerts;
|
||||
this.itemdosnaptogrid.Name = "itemdosnaptogrid";
|
||||
this.itemdosnaptogrid.Size = new System.Drawing.Size(219, 22);
|
||||
this.itemdosnaptogrid.Tag = "builder_snapvertstogrid";
|
||||
this.itemdosnaptogrid.Text = "Snap Selection to Grid";
|
||||
this.itemdosnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// itemgridsetup
|
||||
//
|
||||
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
|
||||
|
@ -1132,7 +1141,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// menumode
|
||||
//
|
||||
this.menumode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.separatorDrawModes});
|
||||
this.separatorDrawModes,
|
||||
this.separatorTransformModes});
|
||||
this.menumode.Name = "menumode";
|
||||
this.menumode.Size = new System.Drawing.Size(50, 20);
|
||||
this.menumode.Text = "&Mode";
|
||||
|
@ -1142,6 +1152,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.separatorDrawModes.Name = "separatorDrawModes";
|
||||
this.separatorDrawModes.Size = new System.Drawing.Size(57, 6);
|
||||
//
|
||||
// separatorTransformModes
|
||||
//
|
||||
this.separatorTransformModes.Name = "separatorTransformModes";
|
||||
this.separatorTransformModes.Size = new System.Drawing.Size(57, 6);
|
||||
//
|
||||
// menuprefabs
|
||||
//
|
||||
this.menuprefabs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -1374,7 +1389,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttoninsertprefabfile,
|
||||
this.buttoninsertpreviousprefab,
|
||||
this.seperatorprefabs,
|
||||
this.seperatormodes,
|
||||
this.buttonthingsfilter,
|
||||
this.thingfilters,
|
||||
this.buttonviewnormal,
|
||||
|
@ -1636,7 +1650,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
"Hard skill items only"});
|
||||
this.thingfilters.Margin = new System.Windows.Forms.Padding(1, 0, 6, 0);
|
||||
this.thingfilters.Name = "thingfilters";
|
||||
this.thingfilters.Size = new System.Drawing.Size(130, 25);
|
||||
this.thingfilters.Size = new System.Drawing.Size(100, 25);
|
||||
this.thingfilters.ToolTipText = "Things Filter";
|
||||
this.thingfilters.SelectedIndexChanged += new System.EventHandler(this.thingfilters_SelectedIndexChanged);
|
||||
this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus);
|
||||
|
@ -1894,7 +1908,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.statuslabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.statuslabel.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.statuslabel.Name = "statuslabel";
|
||||
this.statuslabel.Size = new System.Drawing.Size(309, 18);
|
||||
this.statuslabel.Size = new System.Drawing.Size(340, 18);
|
||||
this.statuslabel.Spring = true;
|
||||
this.statuslabel.Text = "Initializing user interface...";
|
||||
this.statuslabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
|
@ -2175,9 +2189,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.panelinfo.Controls.Add(this.thinginfo);
|
||||
this.panelinfo.Controls.Add(this.sectorinfo);
|
||||
this.panelinfo.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panelinfo.Location = new System.Drawing.Point(26, 564);
|
||||
this.panelinfo.Location = new System.Drawing.Point(0, 564);
|
||||
this.panelinfo.Name = "panelinfo";
|
||||
this.panelinfo.Size = new System.Drawing.Size(986, 106);
|
||||
this.panelinfo.Size = new System.Drawing.Size(1012, 106);
|
||||
this.panelinfo.TabIndex = 4;
|
||||
//
|
||||
// heightpanel1
|
||||
|
@ -2220,7 +2234,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttontoggleinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttontoggleinfo.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.buttontoggleinfo.Font = new System.Drawing.Font("Marlett", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(2)));
|
||||
this.buttontoggleinfo.Location = new System.Drawing.Point(962, 1);
|
||||
this.buttontoggleinfo.Location = new System.Drawing.Point(988, 1);
|
||||
this.buttontoggleinfo.Name = "buttontoggleinfo";
|
||||
this.buttontoggleinfo.Size = new System.Drawing.Size(22, 19);
|
||||
this.buttontoggleinfo.TabIndex = 5;
|
||||
|
@ -2317,11 +2331,21 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// dockersspace
|
||||
//
|
||||
this.dockersspace.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.dockersspace.Location = new System.Drawing.Point(0, 49);
|
||||
this.dockersspace.Location = new System.Drawing.Point(32, 49);
|
||||
this.dockersspace.Name = "dockersspace";
|
||||
this.dockersspace.Size = new System.Drawing.Size(26, 621);
|
||||
this.dockersspace.Size = new System.Drawing.Size(26, 515);
|
||||
this.dockersspace.TabIndex = 6;
|
||||
//
|
||||
// modestoolbar
|
||||
//
|
||||
this.modestoolbar.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.modestoolbar.Location = new System.Drawing.Point(0, 49);
|
||||
this.modestoolbar.Name = "modestoolbar";
|
||||
this.modestoolbar.Size = new System.Drawing.Size(32, 515);
|
||||
this.modestoolbar.TabIndex = 8;
|
||||
this.modestoolbar.Text = "toolStrip1";
|
||||
this.modestoolbar.Visible = false;
|
||||
//
|
||||
// dockerspanel
|
||||
//
|
||||
this.dockerspanel.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -2339,6 +2363,26 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.dockerscollapser.Interval = 200;
|
||||
this.dockerscollapser.Tick += new System.EventHandler(this.dockerscollapser_Tick);
|
||||
//
|
||||
// flowLayoutPanel
|
||||
//
|
||||
this.flowLayoutPanel.Controls.Add(this.menumain);
|
||||
this.flowLayoutPanel.Controls.Add(this.modecontrolsloolbar);
|
||||
this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel.Name = "flowLayoutPanel";
|
||||
this.flowLayoutPanel.Size = new System.Drawing.Size(1012, 24);
|
||||
this.flowLayoutPanel.TabIndex = 9;
|
||||
//
|
||||
// modecontrolsloolbar
|
||||
//
|
||||
this.modecontrolsloolbar.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.modecontrolsloolbar.Location = new System.Drawing.Point(328, 0);
|
||||
this.modecontrolsloolbar.Name = "modecontrolsloolbar";
|
||||
this.modecontrolsloolbar.Size = new System.Drawing.Size(43, 24);
|
||||
this.modecontrolsloolbar.TabIndex = 1;
|
||||
this.modecontrolsloolbar.Text = "toolStrip1";
|
||||
this.modecontrolsloolbar.Visible = false;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -2346,11 +2390,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.ClientSize = new System.Drawing.Size(1012, 693);
|
||||
this.Controls.Add(this.dockerspanel);
|
||||
this.Controls.Add(this.display);
|
||||
this.Controls.Add(this.panelinfo);
|
||||
this.Controls.Add(this.dockersspace);
|
||||
this.Controls.Add(this.statusbar);
|
||||
this.Controls.Add(this.modestoolbar);
|
||||
this.Controls.Add(this.toolbar);
|
||||
this.Controls.Add(this.menumain);
|
||||
this.Controls.Add(this.flowLayoutPanel);
|
||||
this.Controls.Add(this.panelinfo);
|
||||
this.Controls.Add(this.statusbar);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.KeyPreview = true;
|
||||
|
@ -2377,6 +2422,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.statusbar.PerformLayout();
|
||||
this.panelinfo.ResumeLayout(false);
|
||||
this.panelinfo.PerformLayout();
|
||||
this.flowLayoutPanel.ResumeLayout(false);
|
||||
this.flowLayoutPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -2450,7 +2497,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.ToolStripMenuItem itemsnaptogrid;
|
||||
private System.Windows.Forms.ToolStripButton buttonautomerge;
|
||||
private System.Windows.Forms.ToolStripMenuItem itemautomerge;
|
||||
private System.Windows.Forms.ToolStripSeparator seperatormodes;
|
||||
private System.Windows.Forms.Timer processor;
|
||||
private System.Windows.Forms.ToolStripSeparator separatorgzmodes;
|
||||
private System.Windows.Forms.ToolStripSeparator seperatorfilesave;
|
||||
|
@ -2596,5 +2642,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.ToolStripMenuItem itemautoclearsidetextures;
|
||||
private System.Windows.Forms.ToolStripButton buttonautoclearsidetextures;
|
||||
private System.Windows.Forms.ToolStripMenuItem menugotocoords;
|
||||
private System.Windows.Forms.ToolStripSeparator separatorTransformModes;
|
||||
private System.Windows.Forms.ToolStripMenuItem itemdosnaptogrid;
|
||||
private System.Windows.Forms.ToolStrip modestoolbar;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
|
||||
private System.Windows.Forms.ToolStrip modecontrolsloolbar;
|
||||
}
|
||||
}
|
|
@ -20,24 +20,25 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Plugins;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Properties;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Windows;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Plugins;
|
||||
using CodeImp.DoomBuilder.Properties;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.VisualModes;
|
||||
|
||||
#endregion
|
||||
|
@ -322,6 +323,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Setup docker
|
||||
if(General.Settings.DockersPosition == 0)
|
||||
{
|
||||
modestoolbar.Dock = DockStyle.Right; //mxd
|
||||
dockersspace.Dock = DockStyle.Left;
|
||||
dockerspanel.Setup(false);
|
||||
dockerspanel.Location = dockersspace.Location;
|
||||
|
@ -329,6 +331,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
else
|
||||
{
|
||||
modestoolbar.Dock = DockStyle.Left; //mxd
|
||||
dockersspace.Dock = DockStyle.Right;
|
||||
dockerspanel.Setup(true);
|
||||
dockerspanel.Location = new Point(dockersspace.Right - General.Settings.DockersWidth, dockersspace.Top);
|
||||
|
@ -1649,13 +1652,39 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
case ToolbarSection.Views: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatorviews), button); break;
|
||||
case ToolbarSection.Geometry: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatorgeometry), button); break;
|
||||
case ToolbarSection.Testing: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatortesting), button); break;
|
||||
case ToolbarSection.Modes: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatormodes), button); break; //mxd
|
||||
case ToolbarSection.Custom: toolbar.Items.Add(button); break;
|
||||
case ToolbarSection.Modes: modestoolbar.Items.Add(button); break; //mxd
|
||||
case ToolbarSection.Custom: modecontrolsloolbar.Items.Add(button); break; //mxd
|
||||
}
|
||||
|
||||
UpdateToolbar();
|
||||
}
|
||||
|
||||
//mxd
|
||||
public void AddModesButton(ToolStripItem button, string group) {
|
||||
// Fix tags to full action names
|
||||
ToolStripItemCollection items = new ToolStripItemCollection(toolbar, new ToolStripItem[0]);
|
||||
items.Add(button);
|
||||
RenameTagsToFullActions(items, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly()));
|
||||
|
||||
// Add to the list so we can update it as needed
|
||||
PluginToolbarButton buttoninfo = new PluginToolbarButton();
|
||||
buttoninfo.button = button;
|
||||
buttoninfo.section = ToolbarSection.Modes;
|
||||
pluginbuttons.Add(buttoninfo);
|
||||
|
||||
button.VisibleChanged += buttonvisiblechangedhandler;
|
||||
|
||||
//find the separator we need
|
||||
for(int i = 0; i < modestoolbar.Items.Count; i++) {
|
||||
if(modestoolbar.Items[i] is ToolStripSeparator && modestoolbar.Items[i].Text == group) {
|
||||
modestoolbar.Items.Insert(i + 1, button);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateToolbar();
|
||||
}
|
||||
|
||||
// Removes a button
|
||||
public void RemoveButton(ToolStripItem button)
|
||||
{
|
||||
|
@ -1676,8 +1705,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Unbind visible changed event
|
||||
if(!(button is ToolStripSeparator)) button.VisibleChanged -= buttonvisiblechangedhandler;
|
||||
|
||||
// Remove button from toolbar
|
||||
toolbar.Items.Remove(button);
|
||||
//mxd. Remove button from toolbars
|
||||
switch (buttoninfo.section) {
|
||||
case ToolbarSection.Modes:
|
||||
modestoolbar.Items.Remove(button);
|
||||
break;
|
||||
case ToolbarSection.Custom:
|
||||
modecontrolsloolbar.Items.Remove(button);
|
||||
break;
|
||||
default:
|
||||
toolbar.Items.Remove(button);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateSeparators();
|
||||
}
|
||||
}
|
||||
|
@ -1697,6 +1737,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
UpdateToolStripSeparators(toolbar.Items, false);
|
||||
UpdateToolStripSeparators(menumode.DropDownItems, true);
|
||||
|
||||
//mxd
|
||||
UpdateToolStripSeparators(modestoolbar.Items, false);
|
||||
UpdateToolStripSeparators(modecontrolsloolbar.Items, false);
|
||||
}
|
||||
|
||||
// This updates the seperators
|
||||
|
@ -1767,6 +1811,17 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Enable/disable all edit mode items
|
||||
foreach(ToolStripItem i in editmodeitems) i.Enabled = (General.Map != null);
|
||||
|
||||
//mxd. Show/hide additional panels
|
||||
modestoolbar.Visible = (General.Map != null);
|
||||
modecontrolsloolbar.Visible = (General.Map != null && modecontrolsloolbar.Items.Count > 0);
|
||||
//mxd. modestoolbar index in Controls gets messed up when it's invisible. This fixes it. TODO: find why this happens in the first place
|
||||
if(modestoolbar.Visible) {
|
||||
int toolbarpos = this.Controls.IndexOf(toolbar);
|
||||
if(this.Controls.IndexOf(modestoolbar) > toolbarpos) {
|
||||
this.Controls.SetChildIndex(modestoolbar, toolbarpos);
|
||||
}
|
||||
}
|
||||
|
||||
// Update plugin buttons
|
||||
foreach(PluginToolbarButton p in pluginbuttons)
|
||||
{
|
||||
|
@ -1816,7 +1871,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
foreach(ToolStripItem i in editmodeitems)
|
||||
{
|
||||
// Remove it and restart
|
||||
toolbar.Items.Remove(i);
|
||||
modestoolbar.Items.Remove(i); //mxd
|
||||
menumode.DropDownItems.Remove(i);
|
||||
i.Dispose();
|
||||
}
|
||||
|
@ -1827,21 +1882,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
|
||||
// This adds an editing mode seperator on the toolbar and menu
|
||||
internal void AddEditModeSeperator()
|
||||
internal void AddEditModeSeperator(string group)
|
||||
{
|
||||
ToolStripSeparator item;
|
||||
int index;
|
||||
|
||||
// Create a button
|
||||
index = toolbar.Items.IndexOf(seperatormodes);
|
||||
item = new ToolStripSeparator();
|
||||
ToolStripSeparator item = new ToolStripSeparator();
|
||||
item.Text = group; //mxd
|
||||
item.Margin = new Padding(6, 0, 6, 0);
|
||||
toolbar.Items.Insert(index, item);
|
||||
modestoolbar.Items.Add(item); //mxd
|
||||
editmodeitems.Add(item);
|
||||
|
||||
// Create menu item
|
||||
index = menumode.DropDownItems.Count;
|
||||
int index = menumode.DropDownItems.Count;
|
||||
item = new ToolStripSeparator();
|
||||
item.Text = group; //mxd
|
||||
item.Margin = new Padding(0, 3, 0, 3);
|
||||
menumode.DropDownItems.Insert(index, item);
|
||||
editmodeitems.Add(item);
|
||||
|
@ -1852,21 +1905,17 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// This adds an editing mode button to the toolbar and edit menu
|
||||
internal void AddEditModeButton(EditModeInfo modeinfo)
|
||||
{
|
||||
ToolStripItem item;
|
||||
int index;
|
||||
|
||||
string controlname = modeinfo.ButtonDesc.Replace("&", "&&");
|
||||
|
||||
// Create a button
|
||||
index = toolbar.Items.IndexOf(seperatormodes);
|
||||
item = new ToolStripButton(modeinfo.ButtonDesc, modeinfo.ButtonImage, EditModeButtonHandler);
|
||||
ToolStripItem item = new ToolStripButton(modeinfo.ButtonDesc, modeinfo.ButtonImage, EditModeButtonHandler);
|
||||
item.DisplayStyle = ToolStripItemDisplayStyle.Image;
|
||||
item.Tag = modeinfo;
|
||||
toolbar.Items.Insert(index, item);
|
||||
modestoolbar.Items.Add(item); //mxd
|
||||
editmodeitems.Add(item);
|
||||
|
||||
// Create menu item
|
||||
index = menumode.DropDownItems.Count;
|
||||
int index = menumode.DropDownItems.Count;
|
||||
item = new ToolStripMenuItem(controlname, modeinfo.ButtonImage, EditModeButtonHandler);
|
||||
item.Tag = modeinfo;
|
||||
menumode.DropDownItems.Insert(index, item);
|
||||
|
@ -1880,10 +1929,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// This handles edit mode button clicks
|
||||
private void EditModeButtonHandler(object sender, EventArgs e)
|
||||
{
|
||||
EditModeInfo modeinfo;
|
||||
|
||||
this.Update();
|
||||
modeinfo = (EditModeInfo)((sender as ToolStripItem).Tag);
|
||||
EditModeInfo modeinfo = (EditModeInfo)((sender as ToolStripItem).Tag);
|
||||
General.Actions.InvokeAction(modeinfo.SwitchAction.GetFullActionName(modeinfo.Plugin.Assembly));
|
||||
this.Update();
|
||||
}
|
||||
|
@ -2060,9 +2107,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
case MenuSection.ViewViews: menuview.DropDownItems.Insert(menuview.DropDownItems.IndexOf(seperatorviewviews), menu); break;
|
||||
case MenuSection.ViewZoom: menuview.DropDownItems.Insert(menuview.DropDownItems.IndexOf(seperatorviewzoom), menu); break;
|
||||
case MenuSection.ViewScriptEdit: menuview.DropDownItems.Add(menu); break;
|
||||
//mxd
|
||||
case MenuSection.ModeDrawModes: menumode.DropDownItems.Insert(menumode.DropDownItems.IndexOf(separatorDrawModes) + 1, menu); break;
|
||||
|
||||
case MenuSection.PrefabsInsert: menuprefabs.DropDownItems.Insert(menuprefabs.DropDownItems.IndexOf(seperatorprefabsinsert), menu); break;
|
||||
case MenuSection.PrefabsCreate: menuprefabs.DropDownItems.Add(menu); break;
|
||||
case MenuSection.ToolsResources: menutools.DropDownItems.Insert(menutools.DropDownItems.IndexOf(seperatortoolsresources), menu); break;
|
||||
|
@ -2075,6 +2119,24 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
ApplyShortcutKeys(items);
|
||||
}
|
||||
|
||||
//mxd
|
||||
public void AddModesMenu(ToolStripMenuItem menu, string group) {
|
||||
// Fix tags to full action names
|
||||
ToolStripItemCollection items = new ToolStripItemCollection(this.menumain, new ToolStripItem[0]);
|
||||
items.Add(menu);
|
||||
RenameTagsToFullActions(items, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly()));
|
||||
|
||||
//find the separator we need
|
||||
for(int i = 0; i < menumode.DropDownItems.Count; i++) {
|
||||
if(menumode.DropDownItems[i] is ToolStripSeparator && menumode.DropDownItems[i].Text == group) {
|
||||
menumode.DropDownItems.Insert(i + 1, menu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ApplyShortcutKeys(items);
|
||||
}
|
||||
|
||||
// Removes a menu
|
||||
public void RemoveMenu(ToolStripMenuItem menu)
|
||||
|
@ -2083,6 +2145,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// so try removing from all menus and the top strip
|
||||
menufile.DropDownItems.Remove(menu);
|
||||
menuedit.DropDownItems.Remove(menu);
|
||||
menumode.DropDownItems.Remove(menu); //mxd
|
||||
menuview.DropDownItems.Remove(menu);
|
||||
menuprefabs.DropDownItems.Remove(menu);
|
||||
menutools.DropDownItems.Remove(menu);
|
||||
|
@ -2361,6 +2424,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
itemautomerge.Enabled = (General.Map != null);
|
||||
itemautoclearsidetextures.Enabled = (General.Map != null); //mxd
|
||||
itemautoclearsidetextures.Checked = General.Settings.AutoClearSidedefTextures; //mxd
|
||||
itemdosnaptogrid.Enabled = (General.Map != null); //mxd
|
||||
itemgridsetup.Enabled = (General.Map != null);
|
||||
itemgridinc.Enabled = (General.Map != null);
|
||||
itemgriddec.Enabled = (General.Map != null);
|
||||
|
@ -2550,7 +2614,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
const string fileName = "GZDB Actions Reference.html";
|
||||
|
||||
Actions.Action[] actions = General.Actions.GetAllActions();
|
||||
Dictionary<string, List<Actions.Action>> sortedActions = new Dictionary<string, List<Actions.Action>>();
|
||||
Dictionary<string, List<Actions.Action>> sortedActions = new Dictionary<string, List<Actions.Action>>(StringComparer.Ordinal);
|
||||
|
||||
foreach(Actions.Action action in actions) {
|
||||
if(!sortedActions.ContainsKey(action.Category))
|
||||
|
@ -2593,7 +2657,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
html.AppendLine(columnLabels);
|
||||
counter++;
|
||||
|
||||
Dictionary<string, Actions.Action> actionsByTitle = new Dictionary<string, Actions.Action>();
|
||||
Dictionary<string, Actions.Action> actionsByTitle = new Dictionary<string, Actions.Action>(StringComparer.Ordinal);
|
||||
List<string> actionTitles = new List<string>();
|
||||
|
||||
foreach(Actions.Action action in category.Value) {
|
||||
|
@ -2890,12 +2954,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
else HideInfo();
|
||||
}
|
||||
|
||||
dockerspanel.Height = dockersspace.Height; //mxd
|
||||
FocusDisplay();
|
||||
}
|
||||
|
||||
// Mouse released on info panel toggle button
|
||||
private void buttontoggleinfo_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
dockerspanel.Height = dockersspace.Height; //mxd
|
||||
FocusDisplay();
|
||||
}
|
||||
|
||||
|
|
|
@ -135,15 +135,9 @@
|
|||
<metadata name="toolStripSeparator3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="menumain.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="menumain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>131, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="toolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>241, 17</value>
|
||||
</metadata>
|
||||
|
@ -168,13 +162,28 @@
|
|||
E7rnlAUAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>332, 17</value>
|
||||
</metadata>
|
||||
<metadata name="panelinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="heightpanel1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelcollapsedinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="modename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="buttontoggleinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="linedefinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="thinginfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="heightpanel1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
@ -201,9 +210,6 @@
|
|||
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>433, 17</value>
|
||||
</metadata>
|
||||
<metadata name="display.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="processor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>551, 17</value>
|
||||
</metadata>
|
||||
|
@ -216,12 +222,24 @@
|
|||
<metadata name="dockersspace.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="modestoolbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="modestoolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>324, 56</value>
|
||||
</metadata>
|
||||
<metadata name="dockerspanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dockerscollapser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="modecontrolsloolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>452, 56</value>
|
||||
</metadata>
|
||||
<metadata name="modecontrolsloolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>452, 56</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
ViewViews,
|
||||
ViewZoom,
|
||||
ViewScriptEdit,
|
||||
ModeDrawModes, //mxd
|
||||
PrefabsInsert,
|
||||
PrefabsCreate,
|
||||
ToolsResources,
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
|
@ -76,9 +77,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
internal ActorStructure(DecorateParser parser)
|
||||
{
|
||||
// Initialize
|
||||
flags = new Dictionary<string, bool>();
|
||||
props = new Dictionary<string, List<string>>();
|
||||
states = new Dictionary<string, StateStructure>();
|
||||
flags = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
props = new Dictionary<string, List<string>>(StringComparer.Ordinal);
|
||||
states = new Dictionary<string, StateStructure>(StringComparer.Ordinal);
|
||||
userVars = new List<string>();//mxd
|
||||
bool done = false; //mxd
|
||||
|
||||
|
@ -225,7 +226,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
else if (statetoken == ":") {
|
||||
if (!string.IsNullOrEmpty(previoustoken)) {
|
||||
// Parse actor state
|
||||
StateStructure st = new StateStructure(this, parser, previoustoken);
|
||||
StateStructure st = new StateStructure(this, parser);
|
||||
if (parser.HasError)
|
||||
return;
|
||||
states[previoustoken.ToLowerInvariant()] = st;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
|
@ -71,8 +72,8 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
specialtokens = ":{}+-\n;,";
|
||||
|
||||
// Initialize
|
||||
actors = new Dictionary<string, ActorStructure>();
|
||||
archivedactors = new Dictionary<string, ActorStructure>();
|
||||
actors = new Dictionary<string, ActorStructure>(StringComparer.Ordinal);
|
||||
archivedactors = new Dictionary<string, ActorStructure>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
// Disposer
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
internal StateStructure(ActorStructure actor, DecorateParser parser, string statename)
|
||||
internal StateStructure(ActorStructure actor, DecorateParser parser)
|
||||
{
|
||||
string lasttoken = "";
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
}
|
||||
|
||||
// This makes a HighResImage texture for this texture
|
||||
internal HighResImage MakeImage(Dictionary<long, ImageData> textures, Dictionary<long, ImageData> flats)
|
||||
internal HighResImage MakeImage()
|
||||
{
|
||||
float scalex, scaley;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
|
@ -59,9 +60,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
specialtokens = ",{}\n";
|
||||
|
||||
// Initialize
|
||||
textures = new Dictionary<string, TextureStructure>();
|
||||
flats = new Dictionary<string, TextureStructure>();
|
||||
sprites = new Dictionary<string, TextureStructure>();
|
||||
textures = new Dictionary<string, TextureStructure>(StringComparer.Ordinal);
|
||||
flats = new Dictionary<string, TextureStructure>(StringComparer.Ordinal);
|
||||
sprites = new Dictionary<string, TextureStructure>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Data;
|
||||
|
@ -13,7 +14,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
|
||||
public override bool Parse(Stream stream, string sourcefilename) {
|
||||
base.Parse(stream, sourcefilename);
|
||||
entries = new Dictionary<string, ModelData>();
|
||||
entries = new Dictionary<string, ModelData>(StringComparer.Ordinal);
|
||||
string prevToken = string.Empty;
|
||||
|
||||
List<string> spriteNames = new List<string>();
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Data" />
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
base.OnInitialize();
|
||||
me = this;
|
||||
|
||||
// Load menus form and register it
|
||||
// Load menus form
|
||||
menusForm = new MenusForm();
|
||||
|
||||
General.Actions.BindMethods(this);
|
||||
|
|
|
@ -26,69 +26,115 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.transformToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.jitterItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.createStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.importStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.jitterButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.jitterItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.toolStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.transformToolStripMenuItem,
|
||||
this.createStripMenuItem});
|
||||
this.importStripMenuItem,
|
||||
this.exportStripMenuItem,
|
||||
this.toolStripMenuItem3});
|
||||
this.menuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(452, 24);
|
||||
this.menuStrip.TabIndex = 0;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// transformToolStripMenuItem
|
||||
// importStripMenuItem
|
||||
//
|
||||
this.transformToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.jitterItem});
|
||||
this.transformToolStripMenuItem.Name = "transformToolStripMenuItem";
|
||||
this.transformToolStripMenuItem.Size = new System.Drawing.Size(74, 20);
|
||||
this.transformToolStripMenuItem.Text = "Transform";
|
||||
//
|
||||
// jitterItem
|
||||
//
|
||||
this.jitterItem.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Jitter;
|
||||
this.jitterItem.Name = "jitterItem";
|
||||
this.jitterItem.Size = new System.Drawing.Size(108, 22);
|
||||
this.jitterItem.Tag = "applyjitter";
|
||||
this.jitterItem.Text = "&Jitter...";
|
||||
this.jitterItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// createStripMenuItem
|
||||
//
|
||||
this.createStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.importStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem1});
|
||||
this.createStripMenuItem.Name = "createStripMenuItem";
|
||||
this.createStripMenuItem.Size = new System.Drawing.Size(53, 20);
|
||||
this.createStripMenuItem.Text = "Create";
|
||||
this.importStripMenuItem.Name = "importStripMenuItem";
|
||||
this.importStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.importStripMenuItem.Text = "Import";
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Terrain;
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(230, 22);
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(215, 22);
|
||||
this.toolStripMenuItem1.Tag = "importobjasterrain";
|
||||
this.toolStripMenuItem1.Text = "Terrain from Wavefront .obj...";
|
||||
this.toolStripMenuItem1.Text = "Wavefront .obj as Terrain...";
|
||||
this.toolStripMenuItem1.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// exportStripMenuItem
|
||||
//
|
||||
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem2});
|
||||
this.exportStripMenuItem.Name = "exportStripMenuItem";
|
||||
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
|
||||
this.exportStripMenuItem.Text = "Export";
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(229, 22);
|
||||
this.toolStripMenuItem2.Tag = "exporttoobj";
|
||||
this.toolStripMenuItem2.Text = "Selection To Wavefront .obj...";
|
||||
this.toolStripMenuItem2.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStrip
|
||||
//
|
||||
this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.jitterButton});
|
||||
this.toolStrip.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolStrip.Name = "toolStrip";
|
||||
this.toolStrip.Size = new System.Drawing.Size(452, 25);
|
||||
this.toolStrip.TabIndex = 1;
|
||||
this.toolStrip.Text = "toolStrip1";
|
||||
//
|
||||
// jitterButton
|
||||
//
|
||||
this.jitterButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.jitterButton.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Jitter;
|
||||
this.jitterButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.jitterButton.Name = "jitterButton";
|
||||
this.jitterButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.jitterButton.Tag = "applyjitter";
|
||||
this.jitterButton.Text = "Apply Jitter";
|
||||
this.jitterButton.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.jitterItem});
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(55, 20);
|
||||
this.toolStripMenuItem3.Text = "Modes";
|
||||
//
|
||||
// jitterItem
|
||||
//
|
||||
this.jitterItem.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Jitter;
|
||||
this.jitterItem.Name = "jitterItem";
|
||||
this.jitterItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.jitterItem.Tag = "applyjitter";
|
||||
this.jitterItem.Text = "Apply Jitter";
|
||||
this.jitterItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// MenusForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(452, 129);
|
||||
this.Controls.Add(this.toolStrip);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.MainMenuStrip = this.menuStrip;
|
||||
this.Name = "MenusForm";
|
||||
this.Text = "MenusForm";
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.toolStrip.ResumeLayout(false);
|
||||
this.toolStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -97,9 +143,13 @@
|
|||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem transformToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem jitterItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem createStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem importStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStrip toolStrip;
|
||||
private System.Windows.Forms.ToolStripButton jitterButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripMenuItem jitterItem;
|
||||
}
|
||||
}
|
|
@ -1,19 +1,13 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderEffects
|
||||
{
|
||||
public partial class MenusForm : Form
|
||||
{
|
||||
// Menus list
|
||||
private ToolStripItem[] menus;
|
||||
|
||||
public MenusForm() {
|
||||
InitializeComponent();
|
||||
|
||||
// List all menus
|
||||
menus = new ToolStripItem[menuStrip.Items.Count];
|
||||
for(int i = 0; i < menuStrip.Items.Count; i++) menus[i] = menuStrip.Items[i];
|
||||
}
|
||||
|
||||
// This invokes an action from control event
|
||||
|
@ -24,15 +18,19 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
// This registers with the core
|
||||
public void Register() {
|
||||
// Add the menus to the core
|
||||
foreach(ToolStripMenuItem m in menus)
|
||||
General.Interface.AddMenu(m);
|
||||
General.Interface.AddModesMenu(jitterItem, "002_modify");
|
||||
General.Interface.AddModesButton(jitterButton, "002_modify");
|
||||
General.Interface.AddMenu(importStripMenuItem, MenuSection.FileNewOpenClose);
|
||||
General.Interface.AddMenu(exportStripMenuItem, MenuSection.FileNewOpenClose);
|
||||
}
|
||||
|
||||
// This unregisters from the core
|
||||
public void Unregister() {
|
||||
// Remove the menus from the core
|
||||
foreach(ToolStripMenuItem m in menus)
|
||||
General.Interface.RemoveMenu(m);
|
||||
General.Interface.RemoveMenu(jitterItem);
|
||||
General.Interface.RemoveButton(jitterButton);
|
||||
General.Interface.RemoveMenu(importStripMenuItem);
|
||||
General.Interface.RemoveMenu(exportStripMenuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,4 +120,7 @@
|
|||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>125, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -228,7 +228,6 @@
|
|||
<Compile Include="ClassicModes\DrawRectangleMode.cs" />
|
||||
<Compile Include="ClassicModes\FlatAlignMode.cs" />
|
||||
<Compile Include="ClassicModes\FloorAlignMode.cs" />
|
||||
<Compile Include="ClassicModes\SnapVerticesMode.cs" />
|
||||
<Compile Include="ErrorChecks\CheckMissingTextures.cs" />
|
||||
<Compile Include="ErrorChecks\CheckOverlappingVertices.cs" />
|
||||
<Compile Include="ErrorChecks\CheckStrayVertices.cs" />
|
||||
|
@ -279,6 +278,12 @@
|
|||
<Compile Include="Interface\BridgeModeForm.Designer.cs">
|
||||
<DependentUpon>BridgeModeForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\DrawCurveOptionsPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\DrawCurveOptionsPanel.Designer.cs">
|
||||
<DependentUpon>DrawCurveOptionsPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\DrawEllipseOptionsPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -405,13 +410,13 @@
|
|||
<EmbeddedResource Include="Resources\SnapVerts.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\DrawEllipseMode.png" />
|
||||
<EmbeddedResource Include="Resources\DrawEllipseMode.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\DrawLinesMode.png" />
|
||||
<EmbeddedResource Include="Resources\DrawLinesMode.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\DrawRectMode.png" />
|
||||
<EmbeddedResource Include="Resources\DrawRectMode.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\CeilingAlign.png" />
|
||||
|
@ -444,7 +449,7 @@
|
|||
<None Include="Resources\AlignThings.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\DrawCurveMode.png" />
|
||||
<EmbeddedResource Include="Resources\DrawCurveMode.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ThingPointAtCursor.png" />
|
||||
|
@ -456,9 +461,15 @@
|
|||
<None Include="Resources\Reset.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\DrawGridMode.png" />
|
||||
<EmbeddedResource Include="Interface\DrawCurveOptionsPanel.resx">
|
||||
<DependentUpon>DrawCurveOptionsPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\DrawGridMode.png" />
|
||||
<EmbeddedResource Include="Resources\Hints.cfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Door.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -18,8 +18,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
|
|||
[EditMode(DisplayName = "Bridge Mode",
|
||||
SwitchAction = "bridgemode",
|
||||
ButtonImage = "BridgeMode.png",
|
||||
ButtonOrder = 51,
|
||||
ButtonGroup = "002_tools",
|
||||
ButtonOrder = 2,
|
||||
ButtonGroup = "002_modify",
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
Optional = false)]
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
@ -17,6 +18,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
[EditMode(DisplayName = "Draw Curve Mode",
|
||||
SwitchAction = "drawcurvemode",
|
||||
ButtonImage = "DrawCurveMode.png", //mxd
|
||||
ButtonOrder = int.MinValue + 2, //mxd
|
||||
ButtonGroup = "000_drawing", //mxd
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
Optional = false)]
|
||||
|
@ -31,12 +35,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private int minSegmentLength = 16;
|
||||
private int maxSegmentLength = 4096; //just some arbitrary number
|
||||
|
||||
//interface
|
||||
private Docker settingsdocker;
|
||||
private DrawCurveOptionsPanel panel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor/Disposer
|
||||
|
||||
public DrawCurveMode() {
|
||||
hintLabel = new HintLabel();
|
||||
|
||||
//Options docker
|
||||
panel = new DrawCurveOptionsPanel(minSegmentLength, maxSegmentLength);
|
||||
panel.OnValueChanged += OptionsPanelOnValueChanged;
|
||||
settingsdocker = new Docker("drawcurve", "Draw Curve Settings", panel);
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
|
@ -138,6 +151,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
#region ================== Events
|
||||
|
||||
public override void OnEngage() {
|
||||
base.OnEngage();
|
||||
General.Interface.AddDocker(settingsdocker);
|
||||
General.Interface.SelectDocker(settingsdocker);
|
||||
|
||||
//setup settings panel
|
||||
panel.SegmentLength = segmentLength;
|
||||
}
|
||||
|
||||
public override void OnAccept() {
|
||||
Cursor.Current = Cursors.AppStarting;
|
||||
|
||||
|
@ -234,6 +256,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
|
||||
}
|
||||
|
||||
public override void OnDisengage() {
|
||||
General.Interface.RemoveDocker(settingsdocker);
|
||||
base.OnDisengage();
|
||||
}
|
||||
|
||||
private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs) {
|
||||
segmentLength = panel.SegmentLength;
|
||||
Update();
|
||||
}
|
||||
|
||||
public override void OnHelp() {
|
||||
General.ShowHelp("/gzdb/features/classic_modes/mode_drawcurve.html");
|
||||
}
|
||||
|
@ -250,6 +282,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
if(segmentLength > maxSegmentLength)
|
||||
segmentLength = maxSegmentLength;
|
||||
panel.SegmentLength = segmentLength;
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
@ -262,6 +295,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
if(segmentLength < minSegmentLength)
|
||||
segmentLength = minSegmentLength;
|
||||
panel.SegmentLength = segmentLength;
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
[EditMode(DisplayName = "Draw Ellipse Mode",
|
||||
SwitchAction = "drawellipsemode",
|
||||
ButtonImage = "DrawEllipseMode.png", //mxd
|
||||
ButtonOrder = int.MinValue + 4, //mxd
|
||||
ButtonGroup = "000_drawing", //mxd
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
Optional = false)]
|
||||
|
|
|
@ -33,6 +33,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
[EditMode(DisplayName = "Drawing Mode",
|
||||
SwitchAction = "drawlinesmode",
|
||||
ButtonImage = "DrawLinesMode.png", //mxd
|
||||
ButtonOrder = int.MinValue + 1, //mxd
|
||||
ButtonGroup = "000_drawing", //mxd
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
UseByDefault = true,
|
||||
|
|
|
@ -18,6 +18,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
[EditMode(DisplayName = "Draw Grid Mode",
|
||||
SwitchAction = "drawgridmode",
|
||||
ButtonImage = "DrawGridMode.png", //mxd
|
||||
ButtonOrder = int.MinValue + 5, //mxd
|
||||
ButtonGroup = "000_drawing", //mxd
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
Optional = false)]
|
||||
|
|
|
@ -18,6 +18,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
[EditMode(DisplayName = "Draw Rectangle Mode",
|
||||
SwitchAction = "drawrectanglemode",
|
||||
ButtonImage = "DrawRectMode.png", //mxd
|
||||
ButtonOrder = int.MinValue + 3, //mxd
|
||||
ButtonGroup = "000_drawing", //mxd
|
||||
AllowCopyPaste = false,
|
||||
Volatile = true,
|
||||
Optional = false)]
|
||||
|
|
|
@ -36,8 +36,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
[EditMode(DisplayName = "Edit Selection Mode",
|
||||
SwitchAction = "editselectionmode",
|
||||
ButtonImage = "Selection3.png",
|
||||
ButtonOrder = 50,
|
||||
ButtonGroup = "002_tools",
|
||||
ButtonOrder = 1,
|
||||
ButtonGroup = "002_modify",
|
||||
Volatile = true,
|
||||
UseByDefault = true,
|
||||
Optional = false)]
|
||||
|
|
|
@ -566,6 +566,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers);
|
||||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects);
|
||||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorSectors1);
|
||||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeDoor); //mxd
|
||||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);
|
||||
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.BrightnessGradientMode); //mxd
|
||||
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
|
||||
|
@ -598,6 +599,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers);
|
||||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects);
|
||||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorSectors1);
|
||||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeDoor); //mxd
|
||||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);
|
||||
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.BrightnessGradientMode); //mxd
|
||||
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
|
||||
|
|
|
@ -1,176 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
|
||||
{
|
||||
[EditMode(DisplayName = "Snap Map Elements to Grid",
|
||||
SwitchAction = "snapvertstogrid",
|
||||
AllowCopyPaste = false,
|
||||
Optional = false,
|
||||
Volatile = true)]
|
||||
public class SnapVerticesMode : BaseClassicMode
|
||||
{
|
||||
public SnapVerticesMode() {
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Mode engages
|
||||
public override void OnEngage() {
|
||||
base.OnEngage();
|
||||
|
||||
//get selection
|
||||
General.Map.Map.ClearAllMarks(false);
|
||||
General.Map.Map.MarkAllSelectedGeometry(true, false, true, false, false);
|
||||
List<Vertex> verts = General.Map.Map.GetMarkedVertices(true);
|
||||
|
||||
//nothing selected?
|
||||
if (verts.Count == 0) {
|
||||
//check things
|
||||
List<Thing> things = General.Map.Map.GetMarkedThings(true);
|
||||
if (things.Count == 0) {
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Select any map element first!");
|
||||
base.OnCancel();
|
||||
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
|
||||
} else {
|
||||
snapThings(things);
|
||||
}
|
||||
} else {
|
||||
snapVertices(verts);
|
||||
}
|
||||
}
|
||||
|
||||
private void snapVertices(List<Vertex> verts) {
|
||||
// Make undo for the snapping
|
||||
General.Map.UndoRedo.CreateUndo("Snap vertices");
|
||||
|
||||
int snappedCount = 0;
|
||||
List<Vertex> movedVerts = new List<Vertex>();
|
||||
List<Linedef> movedLines = new List<Linedef>();
|
||||
|
||||
//snap them all!
|
||||
foreach(Vertex v in verts) {
|
||||
Vector2D pos = v.Position;
|
||||
v.SnapToGrid();
|
||||
|
||||
if(v.Position.x != pos.x || v.Position.y != pos.y) {
|
||||
snappedCount++;
|
||||
movedVerts.Add(v);
|
||||
foreach(Linedef l in v.Linedefs){
|
||||
if(!movedLines.Contains(l)) movedLines.Add(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Create blockmap
|
||||
RectangleF area = MapSet.CreateArea(General.Map.Map.Vertices);
|
||||
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
|
||||
blockmap.AddVerticesSet(General.Map.Map.Vertices);
|
||||
|
||||
//merge overlapping vertices using teh power of BLOCKMAP!!!11
|
||||
BlockEntry block;
|
||||
foreach (Vertex v in movedVerts) {
|
||||
block = blockmap.GetBlockAt(v.Position);
|
||||
if (block == null) continue;
|
||||
|
||||
foreach (Vertex blockVert in block.Vertices) {
|
||||
if(blockVert.IsDisposed || blockVert.Index == v.Index || blockVert.Position != v.Position) continue;
|
||||
|
||||
foreach(Linedef l in blockVert.Linedefs)
|
||||
if(!movedLines.Contains(l)) movedLines.Add(l);
|
||||
v.Join(blockVert);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update cached values of lines because we may need their length/angle
|
||||
General.Map.Map.Update(true, false);
|
||||
|
||||
General.Map.Map.BeginAddRemove();
|
||||
MapSet.RemoveLoopedLinedefs(movedLines);
|
||||
MapSet.JoinOverlappingLines(movedLines);
|
||||
General.Map.Map.EndAddRemove();
|
||||
|
||||
//get changed sectors
|
||||
List<Sector> changedSectors = new List<Sector>();
|
||||
foreach(Linedef l in movedLines) {
|
||||
if(l == null || l.IsDisposed) continue;
|
||||
if(l.Front != null && l.Front.Sector != null && !changedSectors.Contains(l.Front.Sector))
|
||||
changedSectors.Add(l.Front.Sector);
|
||||
if(l.Back != null && l.Back.Sector != null && !changedSectors.Contains(l.Back.Sector))
|
||||
changedSectors.Add(l.Back.Sector);
|
||||
}
|
||||
|
||||
// Now update area of sectors
|
||||
General.Map.Map.Update(false, true);
|
||||
|
||||
//fix invalid sectors
|
||||
foreach (Sector s in changedSectors) {
|
||||
if(s.BBox.IsEmpty) {
|
||||
s.Dispose();
|
||||
}else if (s.Sidedefs.Count < 3) {
|
||||
bool merged = false;
|
||||
foreach(Sidedef side in s.Sidedefs) {
|
||||
if(side.Other != null && side.Other.Sector != null) {
|
||||
s.Join(side.Other.Sector);
|
||||
merged = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//oh well, I don't know what else I can do here...
|
||||
if(!merged) s.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
//done
|
||||
General.Interface.DisplayStatus(StatusType.Info, "Snapped " + snappedCount + " vertices.");
|
||||
MessageBox.Show("Snapped " + snappedCount + " vertices." + Environment.NewLine + "It's a good idea to run Map Analysis Mode now.");
|
||||
base.OnAccept();
|
||||
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
|
||||
}
|
||||
|
||||
private void snapThings(List<Thing> things) {
|
||||
// Make undo for the snapping
|
||||
General.Map.UndoRedo.CreateUndo("Snap things");
|
||||
|
||||
int snappedCount = 0;
|
||||
|
||||
//snap them all!
|
||||
foreach(Thing t in things) {
|
||||
Vector2D pos = t.Position;
|
||||
t.SnapToGrid();
|
||||
|
||||
if(t.Position.x != pos.x || t.Position.y != pos.y)
|
||||
snappedCount++;
|
||||
}
|
||||
|
||||
//done
|
||||
General.Interface.DisplayStatus(StatusType.Info, "Snapped " + snappedCount + " things.");
|
||||
base.OnAccept();
|
||||
General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name);
|
||||
}
|
||||
|
||||
// Disenagaging
|
||||
public override void OnDisengage() {
|
||||
base.OnDisengage();
|
||||
Cursor.Current = Cursors.AppStarting;
|
||||
|
||||
if (!cancelled) {
|
||||
// Update cached values
|
||||
General.Map.Map.Update();
|
||||
// Map is changed
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
// Done
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
@ -236,7 +237,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Checks if the flags of two things overlap (i.e. if they show up at the same time)
|
||||
private bool FlagsOverlap(Thing t1, Thing t2) {
|
||||
Dictionary<string, List<ThingFlagsCompare>> groups = new Dictionary<string, List<ThingFlagsCompare>>();
|
||||
var groups = new Dictionary<string, List<ThingFlagsCompare>>(StringComparer.Ordinal);
|
||||
int overlappinggroups = 0;
|
||||
|
||||
// Create a summary which flags belong to which groups
|
||||
|
|
|
@ -77,15 +77,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private Docker undoredodocker;
|
||||
private SectorDrawingOptionsPanel drawingOverridesPanel; //mxd
|
||||
private Docker drawingOverridesDocker; //mxd
|
||||
|
||||
//mxd
|
||||
private ToolStripMenuItem exportToObjMenuItem;
|
||||
private ToolStripMenuItem snapModeMenuItem;
|
||||
private ToolStripMenuItem drawLinesModeMenuItem;
|
||||
private ToolStripMenuItem drawRectModeMenuItem;
|
||||
private ToolStripMenuItem drawEllipseModeMenuItem;
|
||||
private ToolStripMenuItem drawCurveModeMenuItem;
|
||||
private ToolStripMenuItem drawGridModeMenuItem;
|
||||
|
||||
// Settings
|
||||
private int showvisualthings; // 0 = none, 1 = sprite only, 2 = sprite caged
|
||||
|
@ -214,62 +205,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
undoredopanel = new UndoRedoPanel();
|
||||
undoredodocker = new Docker("undoredo", "Undo / Redo", undoredopanel);
|
||||
General.Interface.AddDocker(undoredodocker);
|
||||
|
||||
//mxd. Export to .obj
|
||||
exportToObjMenuItem = new ToolStripMenuItem("Export to .obj...");
|
||||
exportToObjMenuItem.Tag = "exporttoobj";
|
||||
exportToObjMenuItem.Click += InvokeTaggedAction;
|
||||
exportToObjMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(exportToObjMenuItem, MenuSection.FileNewOpenClose);
|
||||
|
||||
//mxd. add "Snap Vertices" menu button
|
||||
snapModeMenuItem = new ToolStripMenuItem("Snap selected map elements to grid");
|
||||
snapModeMenuItem.Tag = "snapvertstogrid";
|
||||
snapModeMenuItem.Click += InvokeTaggedAction;
|
||||
snapModeMenuItem.Image = Properties.Resources.SnapVerts;
|
||||
snapModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(snapModeMenuItem, MenuSection.EditGeometry);
|
||||
|
||||
//mxd. add draw modes buttons
|
||||
//draw ellipse
|
||||
drawEllipseModeMenuItem = new ToolStripMenuItem("Draw Ellipse");
|
||||
drawEllipseModeMenuItem.Tag = "drawellipsemode";
|
||||
drawEllipseModeMenuItem.Click += InvokeTaggedAction;
|
||||
drawEllipseModeMenuItem.Image = Properties.Resources.DrawEllipseMode;
|
||||
drawEllipseModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(drawEllipseModeMenuItem, MenuSection.ModeDrawModes);
|
||||
|
||||
//draw grid
|
||||
drawGridModeMenuItem = new ToolStripMenuItem("Draw Grid");
|
||||
drawGridModeMenuItem.Tag = "drawgridmode";
|
||||
drawGridModeMenuItem.Click += InvokeTaggedAction;
|
||||
drawGridModeMenuItem.Image = Properties.Resources.DrawGridMode;
|
||||
drawGridModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(drawGridModeMenuItem, MenuSection.ModeDrawModes);
|
||||
|
||||
//draw rectangle
|
||||
drawRectModeMenuItem = new ToolStripMenuItem("Draw Rectangle");
|
||||
drawRectModeMenuItem.Tag = "drawrectanglemode";
|
||||
drawRectModeMenuItem.Click += InvokeTaggedAction;
|
||||
drawRectModeMenuItem.Image = Properties.Resources.DrawRectMode;
|
||||
drawRectModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(drawRectModeMenuItem, MenuSection.ModeDrawModes);
|
||||
|
||||
//draw curve
|
||||
drawCurveModeMenuItem = new ToolStripMenuItem("Draw Curve");
|
||||
drawCurveModeMenuItem.Tag = "drawcurvemode";
|
||||
drawCurveModeMenuItem.Click += InvokeTaggedAction;
|
||||
drawCurveModeMenuItem.Image = Properties.Resources.DrawCurveMode;
|
||||
drawCurveModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(drawCurveModeMenuItem, MenuSection.ModeDrawModes);
|
||||
|
||||
//draw lines
|
||||
drawLinesModeMenuItem = new ToolStripMenuItem("Draw Lines");
|
||||
drawLinesModeMenuItem.Tag = "drawlinesmode";
|
||||
drawLinesModeMenuItem.Click += InvokeTaggedAction;
|
||||
drawLinesModeMenuItem.Image = Properties.Resources.DrawLinesMode;
|
||||
drawLinesModeMenuItem.Enabled = false;
|
||||
General.Interface.AddMenu(drawLinesModeMenuItem, MenuSection.ModeDrawModes);
|
||||
|
||||
//mxd
|
||||
General.Actions.BindMethods(this);
|
||||
|
@ -284,15 +219,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Clean up
|
||||
General.Interface.RemoveDocker(undoredodocker);
|
||||
|
||||
//mxd
|
||||
General.Interface.RemoveMenu(exportToObjMenuItem);
|
||||
General.Interface.RemoveMenu(snapModeMenuItem);
|
||||
General.Interface.RemoveMenu(drawLinesModeMenuItem);
|
||||
General.Interface.RemoveMenu(drawCurveModeMenuItem);
|
||||
General.Interface.RemoveMenu(drawRectModeMenuItem);
|
||||
General.Interface.RemoveMenu(drawEllipseModeMenuItem);
|
||||
General.Interface.RemoveMenu(drawGridModeMenuItem);
|
||||
|
||||
undoredopanel.Dispose();
|
||||
menusform.Unregister();
|
||||
menusform.Dispose();
|
||||
|
@ -463,15 +389,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.AddDocker(drawingOverridesDocker);
|
||||
}
|
||||
drawingOverridesPanel.Setup();
|
||||
|
||||
//mxd
|
||||
exportToObjMenuItem.Enabled = true;
|
||||
snapModeMenuItem.Enabled = true;
|
||||
drawLinesModeMenuItem.Enabled = true;
|
||||
drawCurveModeMenuItem.Enabled = true;
|
||||
drawRectModeMenuItem.Enabled = true;
|
||||
drawEllipseModeMenuItem.Enabled = true;
|
||||
drawGridModeMenuItem.Enabled = true;
|
||||
}
|
||||
|
||||
// Map opened
|
||||
|
@ -488,16 +405,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.AddDocker(drawingOverridesDocker);
|
||||
}
|
||||
drawingOverridesPanel.Setup();
|
||||
|
||||
//mxd
|
||||
exportToObjMenuItem.Enabled = true;
|
||||
snapModeMenuItem.Enabled = true;
|
||||
drawLinesModeMenuItem.Enabled = true;
|
||||
drawCurveModeMenuItem.Enabled = true;
|
||||
drawRectModeMenuItem.Enabled = true;
|
||||
drawEllipseModeMenuItem.Enabled = true;
|
||||
drawGridModeMenuItem.Enabled = true;
|
||||
|
||||
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
|
||||
}
|
||||
|
||||
|
@ -513,15 +420,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
drawingOverridesPanel.Dispose();
|
||||
drawingOverridesPanel = null;
|
||||
|
||||
//mxd
|
||||
exportToObjMenuItem.Enabled = false;
|
||||
snapModeMenuItem.Enabled = false;
|
||||
drawLinesModeMenuItem.Enabled = false;
|
||||
drawCurveModeMenuItem.Enabled = false;
|
||||
drawRectModeMenuItem.Enabled = false;
|
||||
drawEllipseModeMenuItem.Enabled = false;
|
||||
drawGridModeMenuItem.Enabled = false;
|
||||
|
||||
//mxd. Save settings
|
||||
saveSettings();
|
||||
}
|
||||
|
@ -553,11 +451,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
base.OnUndoWithdrawn();
|
||||
undoredopanel.UpdateList();
|
||||
}
|
||||
|
||||
//mxd
|
||||
private void InvokeTaggedAction(object sender, EventArgs e) {
|
||||
General.Interface.InvokeTaggedAction(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
|
|||
}
|
||||
|
||||
//sort geometry
|
||||
Dictionary<string, List<WorldVertex[]>> geometryByTexture = sortGeometry(visualSectors, data.ExportTextures);
|
||||
Dictionary<string, List<WorldVertex[]>> geometryByTexture = sortGeometry(visualSectors);
|
||||
|
||||
//restore vm settings
|
||||
if(renderingEffectsDisabled)
|
||||
|
@ -162,8 +162,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
|
|||
data.Valid = true;
|
||||
}
|
||||
|
||||
private Dictionary<string, List<WorldVertex[]>> sortGeometry(List<BaseVisualSector> visualSectors, bool exportTextures) {
|
||||
Dictionary<string, List<WorldVertex[]>> geo = new Dictionary<string, List<WorldVertex[]>>();
|
||||
private Dictionary<string, List<WorldVertex[]>> sortGeometry(List<BaseVisualSector> visualSectors) {
|
||||
var geo = new Dictionary<string, List<WorldVertex[]>>(StringComparer.Ordinal);
|
||||
geo.Add(DEFAULT, new List<WorldVertex[]>());
|
||||
string texture;
|
||||
|
||||
|
@ -295,7 +295,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
|
|||
Dictionary<Vector3D, int> uniqueNormals = new Dictionary<Vector3D, int>();
|
||||
Dictionary<PointF, int> uniqueUVs = new Dictionary<PointF, int>();
|
||||
|
||||
Dictionary<string, Dictionary<WorldVertex, VertexIndices>> vertexDataByTexture = new Dictionary<string, Dictionary<WorldVertex, VertexIndices>>();
|
||||
var vertexDataByTexture = new Dictionary<string, Dictionary<WorldVertex, VertexIndices>>(StringComparer.Ordinal);
|
||||
int ni;
|
||||
int pc = 0;
|
||||
int nc = 0;
|
||||
|
|
129
Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs
generated
Normal file
129
Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,129 @@
|
|||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
partial class DrawCurveOptionsPanel
|
||||
{
|
||||
/// <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.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.hints = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.seglen = new System.Windows.Forms.NumericUpDown();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.seglen)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.hints);
|
||||
this.groupBox2.Location = new System.Drawing.Point(3, 63);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 150);
|
||||
this.groupBox2.TabIndex = 6;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Quick Help:";
|
||||
//
|
||||
// hints
|
||||
//
|
||||
this.hints.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.hints.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.hints.Location = new System.Drawing.Point(9, 19);
|
||||
this.hints.Name = "hints";
|
||||
this.hints.ReadOnly = true;
|
||||
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.hints.ShortcutsEnabled = false;
|
||||
this.hints.Size = new System.Drawing.Size(228, 125);
|
||||
this.hints.TabIndex = 0;
|
||||
this.hints.Text = "";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.seglen);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(243, 54);
|
||||
this.groupBox1.TabIndex = 5;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Draw Options:";
|
||||
//
|
||||
// seglen
|
||||
//
|
||||
this.seglen.Location = new System.Drawing.Point(99, 23);
|
||||
this.seglen.Maximum = new decimal(new int[] {
|
||||
32767,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.seglen.Minimum = new decimal(new int[] {
|
||||
32768,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.seglen.Name = "seglen";
|
||||
this.seglen.Size = new System.Drawing.Size(72, 20);
|
||||
this.seglen.TabIndex = 3;
|
||||
this.seglen.ValueChanged += new System.EventHandler(this.seglen_ValueChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(6, 26);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(90, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Segment Length:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// DrawCurveOptionsPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.Name = "DrawCurveOptionsPanel";
|
||||
this.Size = new System.Drawing.Size(249, 330);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.seglen)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.RichTextBox hints;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.NumericUpDown seglen;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes
|
||||
{
|
||||
public partial class DrawCurveOptionsPanel : UserControl
|
||||
{
|
||||
public event EventHandler OnValueChanged;
|
||||
private bool blockEvents;
|
||||
|
||||
public int SegmentLength { get { return (int)seglen.Value; } set { blockEvents = true; seglen.Value = value; blockEvents = false; } }
|
||||
|
||||
public DrawCurveOptionsPanel(int minLength, int maxLength) {
|
||||
InitializeComponent();
|
||||
|
||||
seglen.Minimum = minLength;
|
||||
seglen.Maximum = maxLength;
|
||||
|
||||
//set hints
|
||||
string help = "Use <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + "</b> and <b>" + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + "</b> to change curve detail level";
|
||||
hints.SelectedRtf = HintsManager.GetRtfString(help);
|
||||
}
|
||||
|
||||
private DrawCurveOptionsPanel() { InitializeComponent(); }
|
||||
|
||||
private void seglen_ValueChanged(object sender, EventArgs e) {
|
||||
if(!blockEvents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
120
Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.resx
Normal file
120
Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?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>
|
||||
</root>
|
|
@ -28,11 +28,11 @@
|
|||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.hints = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.reset = new System.Windows.Forms.Button();
|
||||
this.subdivs = new System.Windows.Forms.NumericUpDown();
|
||||
this.spikiness = new System.Windows.Forms.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.reset = new System.Windows.Forms.Button();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.subdivs)).BeginInit();
|
||||
|
@ -82,6 +82,16 @@
|
|||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Draw Options:";
|
||||
//
|
||||
// reset
|
||||
//
|
||||
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
|
||||
this.reset.Location = new System.Drawing.Point(156, 21);
|
||||
this.reset.Name = "reset";
|
||||
this.reset.Size = new System.Drawing.Size(26, 49);
|
||||
this.reset.TabIndex = 6;
|
||||
this.reset.UseVisualStyleBackColor = true;
|
||||
this.reset.Click += new System.EventHandler(this.reset_Click);
|
||||
//
|
||||
// subdivs
|
||||
//
|
||||
this.subdivs.Location = new System.Drawing.Point(78, 23);
|
||||
|
@ -139,16 +149,6 @@
|
|||
this.label1.Text = "Spikiness:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// reset
|
||||
//
|
||||
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
|
||||
this.reset.Location = new System.Drawing.Point(156, 21);
|
||||
this.reset.Name = "reset";
|
||||
this.reset.Size = new System.Drawing.Size(26, 49);
|
||||
this.reset.TabIndex = 6;
|
||||
this.reset.UseVisualStyleBackColor = true;
|
||||
this.reset.Click += new System.EventHandler(this.reset_Click);
|
||||
//
|
||||
// DrawEllipseOptionsPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -157,7 +157,7 @@
|
|||
this.Controls.Add(this.groupBox1);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.Name = "DrawEllipseOptionsPanel";
|
||||
this.Size = new System.Drawing.Size(249, 243);
|
||||
this.Size = new System.Drawing.Size(249, 330);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.subdivs)).EndInit();
|
||||
|
|
|
@ -34,9 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private void ValueChanged(object sender, EventArgs e) {
|
||||
aquityValue = (int)spikiness.Value;
|
||||
subdivsValue = (int)subdivs.Value;
|
||||
|
||||
if(blockEvents) return;
|
||||
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
if(!blockEvents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void reset_Click(object sender, EventArgs e) {
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
this.groupBox2.Controls.Add(this.hints);
|
||||
this.groupBox2.Location = new System.Drawing.Point(3, 134);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 132);
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 150);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Quick Help:";
|
||||
|
@ -146,7 +146,7 @@
|
|||
this.hints.ReadOnly = true;
|
||||
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.hints.ShortcutsEnabled = false;
|
||||
this.hints.Size = new System.Drawing.Size(228, 107);
|
||||
this.hints.Size = new System.Drawing.Size(228, 146);
|
||||
this.hints.TabIndex = 0;
|
||||
this.hints.Text = "";
|
||||
//
|
||||
|
@ -158,7 +158,7 @@
|
|||
this.Controls.Add(this.groupBox1);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.Name = "DrawGridOptionsPanel";
|
||||
this.Size = new System.Drawing.Size(249, 332);
|
||||
this.Size = new System.Drawing.Size(249, 330);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slicesV)).EndInit();
|
||||
|
|
|
@ -29,8 +29,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
private void ValueChanged(object sender, EventArgs e) {
|
||||
if(blockEvents) return;
|
||||
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
if(!blockEvents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void gridlock_CheckedChanged(object sender, EventArgs e) {
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.hints = new System.Windows.Forms.RichTextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.reset = new System.Windows.Forms.Button();
|
||||
this.subdivs = new System.Windows.Forms.NumericUpDown();
|
||||
this.radius = new System.Windows.Forms.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.reset = new System.Windows.Forms.Button();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.subdivs)).BeginInit();
|
||||
|
@ -46,7 +46,7 @@
|
|||
this.groupBox2.Controls.Add(this.hints);
|
||||
this.groupBox2.Location = new System.Drawing.Point(3, 89);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 115);
|
||||
this.groupBox2.Size = new System.Drawing.Size(243, 150);
|
||||
this.groupBox2.TabIndex = 4;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Quick Help:";
|
||||
|
@ -62,7 +62,7 @@
|
|||
this.hints.ReadOnly = true;
|
||||
this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.hints.ShortcutsEnabled = false;
|
||||
this.hints.Size = new System.Drawing.Size(228, 90);
|
||||
this.hints.Size = new System.Drawing.Size(228, 125);
|
||||
this.hints.TabIndex = 0;
|
||||
this.hints.Text = "";
|
||||
//
|
||||
|
@ -82,6 +82,16 @@
|
|||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Draw Options:";
|
||||
//
|
||||
// reset
|
||||
//
|
||||
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
|
||||
this.reset.Location = new System.Drawing.Point(170, 22);
|
||||
this.reset.Name = "reset";
|
||||
this.reset.Size = new System.Drawing.Size(26, 49);
|
||||
this.reset.TabIndex = 5;
|
||||
this.reset.UseVisualStyleBackColor = true;
|
||||
this.reset.Click += new System.EventHandler(this.reset_Click);
|
||||
//
|
||||
// subdivs
|
||||
//
|
||||
this.subdivs.Location = new System.Drawing.Point(92, 50);
|
||||
|
@ -129,16 +139,6 @@
|
|||
this.label1.Text = "Bevel Radius:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// reset
|
||||
//
|
||||
this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset;
|
||||
this.reset.Location = new System.Drawing.Point(170, 22);
|
||||
this.reset.Name = "reset";
|
||||
this.reset.Size = new System.Drawing.Size(26, 49);
|
||||
this.reset.TabIndex = 5;
|
||||
this.reset.UseVisualStyleBackColor = true;
|
||||
this.reset.Click += new System.EventHandler(this.reset_Click);
|
||||
//
|
||||
// DrawRectangleOptionsPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -147,7 +147,7 @@
|
|||
this.Controls.Add(this.groupBox1);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.Name = "DrawRectangleOptionsPanel";
|
||||
this.Size = new System.Drawing.Size(249, 240);
|
||||
this.Size = new System.Drawing.Size(249, 330);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.subdivs)).EndInit();
|
||||
|
|
|
@ -34,8 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
radiusValue = (int)radius.Value;
|
||||
subdivsValue = (int)subdivs.Value;
|
||||
|
||||
if(blockEvents) return;
|
||||
if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
if(!blockEvents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void reset_Click(object sender, EventArgs e) {
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.menustrip = new System.Windows.Forms.MenuStrip();
|
||||
this.linedefsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingsl = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.selectsinglesideditem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectdoublesideditem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -48,14 +49,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.alignCeilingToBackItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sectorsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.globalstrip = new System.Windows.Forms.ToolStrip();
|
||||
|
@ -76,9 +79,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.buttonMarqueSelectTouching = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.selectInSectorsItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectInSectorsItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.buttonMakeDoor = new System.Windows.Forms.ToolStripButton();
|
||||
this.menustrip.SuspendLayout();
|
||||
this.manualstrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
@ -92,7 +93,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.vertsmenu});
|
||||
this.menustrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menustrip.Name = "menustrip";
|
||||
this.menustrip.Size = new System.Drawing.Size(423, 24);
|
||||
this.menustrip.Size = new System.Drawing.Size(588, 24);
|
||||
this.menustrip.TabIndex = 0;
|
||||
this.menustrip.Text = "menustrip";
|
||||
//
|
||||
|
@ -121,20 +122,27 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// placethingsl
|
||||
//
|
||||
this.placethingsl.Name = "placethingsl";
|
||||
this.placethingsl.Size = new System.Drawing.Size(205, 22);
|
||||
this.placethingsl.Size = new System.Drawing.Size(245, 22);
|
||||
this.placethingsl.Tag = "placethings";
|
||||
this.placethingsl.Text = "&Place Things...";
|
||||
this.placethingsl.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// selectInSectorsItem3
|
||||
//
|
||||
this.selectInSectorsItem3.Name = "selectInSectorsItem3";
|
||||
this.selectInSectorsItem3.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem3.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem3.Text = "&Select Things in Selected Sectors";
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(202, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// selectsinglesideditem
|
||||
//
|
||||
this.selectsinglesideditem.Name = "selectsinglesideditem";
|
||||
this.selectsinglesideditem.Size = new System.Drawing.Size(205, 22);
|
||||
this.selectsinglesideditem.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectsinglesideditem.Tag = "selectsinglesided";
|
||||
this.selectsinglesideditem.Text = "Select &Single-sided only";
|
||||
this.selectsinglesideditem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -142,7 +150,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// selectdoublesideditem
|
||||
//
|
||||
this.selectdoublesideditem.Name = "selectdoublesideditem";
|
||||
this.selectdoublesideditem.Size = new System.Drawing.Size(205, 22);
|
||||
this.selectdoublesideditem.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectdoublesideditem.Tag = "selectdoublesided";
|
||||
this.selectdoublesideditem.Text = "Select &Double-sided only";
|
||||
this.selectdoublesideditem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -150,12 +158,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(202, 6);
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// fliplinedefsitem
|
||||
//
|
||||
this.fliplinedefsitem.Name = "fliplinedefsitem";
|
||||
this.fliplinedefsitem.Size = new System.Drawing.Size(205, 22);
|
||||
this.fliplinedefsitem.Size = new System.Drawing.Size(245, 22);
|
||||
this.fliplinedefsitem.Tag = "fliplinedefs";
|
||||
this.fliplinedefsitem.Text = "&Flip Linedefs";
|
||||
this.fliplinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -163,7 +171,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// flipsidedefsitem
|
||||
//
|
||||
this.flipsidedefsitem.Name = "flipsidedefsitem";
|
||||
this.flipsidedefsitem.Size = new System.Drawing.Size(205, 22);
|
||||
this.flipsidedefsitem.Size = new System.Drawing.Size(245, 22);
|
||||
this.flipsidedefsitem.Tag = "flipsidedefs";
|
||||
this.flipsidedefsitem.Text = "F&lip Sidedefs";
|
||||
this.flipsidedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -171,12 +179,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(202, 6);
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// curvelinedefsitem
|
||||
//
|
||||
this.curvelinedefsitem.Name = "curvelinedefsitem";
|
||||
this.curvelinedefsitem.Size = new System.Drawing.Size(205, 22);
|
||||
this.curvelinedefsitem.Size = new System.Drawing.Size(245, 22);
|
||||
this.curvelinedefsitem.Tag = "curvelinesmode";
|
||||
this.curvelinedefsitem.Text = "&Curve Linedefs...";
|
||||
this.curvelinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -184,12 +192,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(202, 6);
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// splitlinedefsitem
|
||||
//
|
||||
this.splitlinedefsitem.Name = "splitlinedefsitem";
|
||||
this.splitlinedefsitem.Size = new System.Drawing.Size(205, 22);
|
||||
this.splitlinedefsitem.Size = new System.Drawing.Size(245, 22);
|
||||
this.splitlinedefsitem.Tag = "splitlinedefs";
|
||||
this.splitlinedefsitem.Text = "S&plit Linedefs";
|
||||
this.splitlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -202,7 +210,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.alignCeilingToFrontItem,
|
||||
this.alignCeilingToBackItem});
|
||||
this.alignLinedefsItem.Name = "alignLinedefsItem";
|
||||
this.alignLinedefsItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.alignLinedefsItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.alignLinedefsItem.Text = "&Align Textures";
|
||||
//
|
||||
// alignFloorToFrontItem
|
||||
|
@ -259,6 +267,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.placethingss.Text = "&Place Things...";
|
||||
this.placethingss.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// selectInSectorsItem2
|
||||
//
|
||||
this.selectInSectorsItem2.Name = "selectInSectorsItem2";
|
||||
this.selectInSectorsItem2.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem2.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem2.Text = "&Select Things in Selected Sectors";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
|
@ -298,6 +313,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.thingsmenu.Text = "Things";
|
||||
this.thingsmenu.Visible = false;
|
||||
//
|
||||
// selectInSectorsItem
|
||||
//
|
||||
this.selectInSectorsItem.Name = "selectInSectorsItem";
|
||||
this.selectInSectorsItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
|
||||
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// alignToWallItem
|
||||
//
|
||||
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
|
||||
|
@ -316,14 +344,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.pointAtCursorItem.Text = "&Point at Cursor";
|
||||
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// selectInSectorsItem
|
||||
//
|
||||
this.selectInSectorsItem.Name = "selectInSectorsItem";
|
||||
this.selectInSectorsItem.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
|
||||
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// vertsmenu
|
||||
//
|
||||
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -345,7 +365,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//
|
||||
this.globalstrip.Location = new System.Drawing.Point(0, 24);
|
||||
this.globalstrip.Name = "globalstrip";
|
||||
this.globalstrip.Size = new System.Drawing.Size(423, 25);
|
||||
this.globalstrip.Size = new System.Drawing.Size(588, 25);
|
||||
this.globalstrip.TabIndex = 1;
|
||||
this.globalstrip.Text = "toolstrip";
|
||||
//
|
||||
|
@ -367,10 +387,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.brightnessGradientMode,
|
||||
this.buttonMarqueSelectTouching,
|
||||
this.buttonAlignThingsToWall,
|
||||
this.buttonTextureOffsetLock});
|
||||
this.buttonTextureOffsetLock,
|
||||
this.buttonMakeDoor});
|
||||
this.manualstrip.Location = new System.Drawing.Point(0, 49);
|
||||
this.manualstrip.Name = "manualstrip";
|
||||
this.manualstrip.Size = new System.Drawing.Size(423, 25);
|
||||
this.manualstrip.Size = new System.Drawing.Size(588, 25);
|
||||
this.manualstrip.TabIndex = 2;
|
||||
this.manualstrip.Text = "toolStrip1";
|
||||
//
|
||||
|
@ -541,30 +562,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
"tant while sector is dragged";
|
||||
this.buttonTextureOffsetLock.Click += new System.EventHandler(this.buttonTextureOffsetLock_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
// buttonMakeDoor
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(242, 6);
|
||||
//
|
||||
// selectInSectorsItem2
|
||||
//
|
||||
this.selectInSectorsItem2.Name = "selectInSectorsItem2";
|
||||
this.selectInSectorsItem2.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem2.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem2.Text = "&Select Things in Selected Sectors";
|
||||
//
|
||||
// selectInSectorsItem3
|
||||
//
|
||||
this.selectInSectorsItem3.Name = "selectInSectorsItem3";
|
||||
this.selectInSectorsItem3.Size = new System.Drawing.Size(245, 22);
|
||||
this.selectInSectorsItem3.Tag = "thingsselectinsectors";
|
||||
this.selectInSectorsItem3.Text = "&Select Things in Selected Sectors";
|
||||
this.buttonMakeDoor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttonMakeDoor.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
|
||||
this.buttonMakeDoor.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttonMakeDoor.Name = "buttonMakeDoor";
|
||||
this.buttonMakeDoor.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttonMakeDoor.Tag = "makedoor";
|
||||
this.buttonMakeDoor.Text = "Make Door From Selection";
|
||||
this.buttonMakeDoor.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// MenusForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(423, 248);
|
||||
this.ClientSize = new System.Drawing.Size(588, 100);
|
||||
this.Controls.Add(this.manualstrip);
|
||||
this.Controls.Add(this.globalstrip);
|
||||
this.Controls.Add(this.menustrip);
|
||||
|
@ -639,5 +652,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private System.Windows.Forms.ToolStripMenuItem selectInSectorsItem3;
|
||||
private System.Windows.Forms.ToolStripMenuItem selectInSectorsItem2;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripButton buttonMakeDoor;
|
||||
}
|
||||
}
|
|
@ -65,7 +65,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public ToolStripComboBox BrightnessGradientMode { get { return brightnessGradientMode; } } //mxd
|
||||
public ToolStripButton MarqueSelectTouching { get { return buttonMarqueSelectTouching; } } //mxd
|
||||
public ToolStripButton AlignThingsToWall { get { return buttonAlignThingsToWall; } } //mxd
|
||||
public ToolStripButton TextureOffsetLock { get { return buttonTextureOffsetLock; } }
|
||||
public ToolStripButton TextureOffsetLock { get { return buttonTextureOffsetLock; } } //mxd
|
||||
public ToolStripButton MakeDoor { get { return buttonMakeDoor; } } //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -135,7 +135,4 @@
|
|||
<metadata name="manualstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>210, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
// Runtime Version:2.0.50727.5420
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -116,6 +116,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Door {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Door", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap DrawCurveMode {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("DrawCurveMode", resourceCulture);
|
||||
|
|
|
@ -139,9 +139,6 @@
|
|||
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -154,6 +151,9 @@
|
|||
<data name="DrawRectMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DrawRectMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CeilsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CeilsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -169,8 +169,8 @@
|
|||
<data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="VisualModeGZ" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\VisualModeGZ.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -193,6 +193,12 @@
|
|||
<data name="FloorsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FloorsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Reset" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DrawCurveMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DrawCurveMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -202,10 +208,7 @@
|
|||
<data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Reset" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Door" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Door.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -195,17 +195,6 @@ bridgemode
|
|||
default = 131138;
|
||||
}
|
||||
|
||||
//mxd
|
||||
snapvertstogrid
|
||||
{
|
||||
title = "Snap Selected Map Elements to Grid";
|
||||
category = "edit";
|
||||
description = "Snaps selected map elements to grid.";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
||||
//mxd
|
||||
placethings
|
||||
{
|
||||
|
|
BIN
Source/Plugins/BuilderModes/Resources/Door.png
Normal file
BIN
Source/Plugins/BuilderModes/Resources/Door.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 723 B |
|
@ -26,16 +26,25 @@ namespace CodeImp.DoomBuilder.ColorPicker
|
|||
base.OnInitialize();
|
||||
me = this;
|
||||
|
||||
// Load menus form
|
||||
toolsform = new ToolsForm();
|
||||
|
||||
General.Actions.BindMethods(this);
|
||||
}
|
||||
|
||||
public override void OnMapOpenEnd() {
|
||||
if (toolsform == null)
|
||||
toolsform = new ToolsForm();
|
||||
base.OnMapOpenEnd();
|
||||
toolsform.Register();
|
||||
}
|
||||
|
||||
public override void OnMapNewEnd() {
|
||||
OnMapOpenEnd();
|
||||
base.OnMapNewEnd();
|
||||
toolsform.Register();
|
||||
}
|
||||
|
||||
public override void OnMapCloseEnd() {
|
||||
base.OnMapCloseEnd();
|
||||
toolsform.Unregister();
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
|
@ -45,8 +54,11 @@ namespace CodeImp.DoomBuilder.ColorPicker
|
|||
if (form != null) form.Close();
|
||||
form = null;
|
||||
|
||||
if (toolsform != null) toolsform.Dispose();
|
||||
toolsform = null;
|
||||
if (toolsform != null) {
|
||||
toolsform.Unregister();
|
||||
toolsform.Dispose();
|
||||
toolsform = null;
|
||||
}
|
||||
}
|
||||
|
||||
[BeginAction("togglelightpannel")]
|
||||
|
|
|
@ -26,29 +26,24 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.separator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.cpButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.separator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.modesmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cpMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.separator1,
|
||||
this.cpButton,
|
||||
this.separator2});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.cpButton});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(284, 25);
|
||||
this.toolStrip1.TabIndex = 0;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// separator1
|
||||
//
|
||||
this.separator1.Name = "separator1";
|
||||
this.separator1.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// cpButton
|
||||
//
|
||||
this.cpButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
|
@ -57,13 +52,35 @@
|
|||
this.cpButton.Name = "cpButton";
|
||||
this.cpButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.cpButton.Tag = "togglelightpannel";
|
||||
this.cpButton.Text = "Color Picker";
|
||||
this.cpButton.Text = "Pick Sector/Light Color";
|
||||
this.cpButton.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// separator2
|
||||
// menuStrip1
|
||||
//
|
||||
this.separator2.Name = "separator2";
|
||||
this.separator2.Size = new System.Drawing.Size(6, 25);
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.modesmenu});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(284, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// modesmenu
|
||||
//
|
||||
this.modesmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cpMenu});
|
||||
this.modesmenu.Name = "modesmenu";
|
||||
this.modesmenu.Size = new System.Drawing.Size(55, 20);
|
||||
this.modesmenu.Text = "Modes";
|
||||
//
|
||||
// cpMenu
|
||||
//
|
||||
this.cpMenu.Image = global::CodeImp.DoomBuilder.ColorPicker.Properties.Resources.cp;
|
||||
this.cpMenu.Name = "cpMenu";
|
||||
this.cpMenu.Size = new System.Drawing.Size(205, 22);
|
||||
this.cpMenu.Tag = "togglelightpannel";
|
||||
this.cpMenu.Text = "Pick Sector/Light Color...";
|
||||
this.cpMenu.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// ToolsForm
|
||||
//
|
||||
|
@ -71,10 +88,14 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "ToolsForm";
|
||||
this.Text = "ToolStrip";
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -84,7 +105,8 @@
|
|||
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton cpButton;
|
||||
private System.Windows.Forms.ToolStripSeparator separator1;
|
||||
private System.Windows.Forms.ToolStripSeparator separator2;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem modesmenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem cpMenu;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
namespace CodeImp.DoomBuilder.ColorPicker
|
||||
{
|
||||
|
@ -8,8 +7,16 @@ namespace CodeImp.DoomBuilder.ColorPicker
|
|||
{
|
||||
public ToolsForm() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
General.Interface.AddButton(cpButton, ToolbarSection.Modes);
|
||||
public void Register() {
|
||||
General.Interface.AddModesMenu(cpMenu, "002_modify");
|
||||
General.Interface.AddModesButton(cpButton, "002_modify");
|
||||
}
|
||||
|
||||
public void Unregister() {
|
||||
General.Interface.RemoveMenu(cpMenu);
|
||||
General.Interface.RemoveButton(cpButton);
|
||||
}
|
||||
|
||||
private void InvokeTaggedAction(object sender, EventArgs e) {
|
||||
|
|
|
@ -1,123 +1,126 @@
|
|||
<?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.
|
||||
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.
|
||||
-->
|
||||
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: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>
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
<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>
|
||||
<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>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -33,10 +33,10 @@ namespace CodeImp.DoomBuilder.CommentsPanel
|
|||
{
|
||||
#region ================== Variables
|
||||
|
||||
Dictionary<string, CommentInfo> v_comments = new Dictionary<string, CommentInfo>();
|
||||
Dictionary<string, CommentInfo> l_comments = new Dictionary<string, CommentInfo>();
|
||||
Dictionary<string, CommentInfo> s_comments = new Dictionary<string, CommentInfo>();
|
||||
Dictionary<string, CommentInfo> t_comments = new Dictionary<string, CommentInfo>();
|
||||
Dictionary<string, CommentInfo> v_comments = new Dictionary<string, CommentInfo>(StringComparer.Ordinal);
|
||||
Dictionary<string, CommentInfo> l_comments = new Dictionary<string, CommentInfo>(StringComparer.Ordinal);
|
||||
Dictionary<string, CommentInfo> s_comments = new Dictionary<string, CommentInfo>(StringComparer.Ordinal);
|
||||
Dictionary<string, CommentInfo> t_comments = new Dictionary<string, CommentInfo>(StringComparer.Ordinal);
|
||||
bool preventupdate;
|
||||
|
||||
#endregion
|
||||
|
@ -160,12 +160,10 @@ namespace CodeImp.DoomBuilder.CommentsPanel
|
|||
// This finds all comments and updates the list
|
||||
public void UpdateList()
|
||||
{
|
||||
//bool firstitem = (grid.Rows.Count == 0);
|
||||
|
||||
if(!preventupdate)
|
||||
{
|
||||
// Update vertices
|
||||
Dictionary<string, CommentInfo> newcomments = new Dictionary<string, CommentInfo>();
|
||||
Dictionary<string, CommentInfo> newcomments = new Dictionary<string, CommentInfo>(StringComparer.Ordinal);
|
||||
if(!filtermode.Checked || (General.Editing.Mode.GetType().Name == "VerticesMode"))
|
||||
{
|
||||
foreach(Vertex v in General.Map.Map.Vertices) AddComments(v, newcomments);
|
||||
|
|
|
@ -178,19 +178,19 @@ namespace CodeImp.DoomBuilder.TagExplorer
|
|||
treeView.Nodes.Add(category);
|
||||
|
||||
} else if(currentSortMode == SortMode.SORT_BY_INDEX) { //create thing categories
|
||||
Dictionary<string, TreeNode> categories = new Dictionary<string, TreeNode>();
|
||||
Dictionary<string, TreeNode> categories = new Dictionary<string, TreeNode>(StringComparer.Ordinal);
|
||||
foreach(TreeNode node in nodes) {
|
||||
NodeInfo nodeInfo = node.Tag as NodeInfo;
|
||||
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(General.Map.Map.GetThingByIndex(nodeInfo.Index).Type);
|
||||
|
||||
if(tti != null) {
|
||||
if(!categories.ContainsKey(tti.Category.Title))
|
||||
categories.Add(tti.Category.Title, new TreeNode(tti.Category.Title, 0, 0, new TreeNode[] { node }));
|
||||
categories.Add(tti.Category.Title, new TreeNode(tti.Category.Title, 0, 0, new[] { node }));
|
||||
else
|
||||
categories[tti.Category.Title].Nodes.Add(node);
|
||||
} else {
|
||||
if(!categories.ContainsKey("UNKNOWN"))
|
||||
categories.Add("UNKNOWN", new TreeNode("UNKNOWN", 0, 0, new TreeNode[] { node }));
|
||||
categories.Add("UNKNOWN", new TreeNode("UNKNOWN", 0, 0, new[] { node }));
|
||||
else
|
||||
categories["UNKNOWN"].Nodes.Add(node);
|
||||
}
|
||||
|
@ -677,7 +677,6 @@ namespace CodeImp.DoomBuilder.TagExplorer
|
|||
private void treeView_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e) {
|
||||
if (!udmf || !treeView.LabelEdit || e.Node.Tag == null) {
|
||||
e.CancelEdit = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue