mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
"File -> Export -> Selection as Wavefront .obj" menu command was not working.
"Preferences -> Editing -> When splitting a linedef" setting is now always used when splitting linedefs. "Preferences -> Editing -> When splitting a linedef": added "Reset X and Y" option. "Preferences -> Editing -> Auto-align textures of newly created linedefs" option now works in a more intelligent fashion.
This commit is contained in:
parent
6caf39227e
commit
ee6faba11c
20 changed files with 426 additions and 246 deletions
|
@ -808,6 +808,7 @@
|
|||
<Compile Include="Map\GroupInfo.cs" />
|
||||
<Compile Include="Map\SelectionType.cs" />
|
||||
<Compile Include="Map\MapElementCollection.cs" />
|
||||
<Compile Include="Map\SplitLineBehavior.cs" />
|
||||
<Compile Include="Rendering\SurfaceBufferSet.cs" />
|
||||
<Compile Include="Rendering\SurfaceEntry.cs" />
|
||||
<Compile Include="Rendering\SurfaceEntryCollection.cs" />
|
||||
|
|
|
@ -43,7 +43,6 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private Configuration cfg;
|
||||
|
||||
// Cached variables
|
||||
//private int undolevels;
|
||||
private bool blackbrowsers;
|
||||
private int visualfov;
|
||||
private float visualmousesensx;
|
||||
|
@ -89,6 +88,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private bool toolbarfile;
|
||||
private float filteranisotropy;
|
||||
private bool showtexturesizes;
|
||||
private SplitLineBehavior splitlinebehavior; //mxd
|
||||
|
||||
//mxd
|
||||
private bool gzDrawModels;
|
||||
|
@ -126,7 +126,6 @@ namespace CodeImp.DoomBuilder.Config
|
|||
#region ================== Properties
|
||||
|
||||
internal Configuration Config { get { return cfg; } }
|
||||
//public int UndoLevels { get { return undolevels; } internal set { undolevels = value; } }
|
||||
public bool BlackBrowsers { get { return blackbrowsers; } internal set { blackbrowsers = value; } }
|
||||
public int VisualFOV { get { return visualfov; } internal set { visualfov = value; } }
|
||||
public int ImageBrightness { get { return imagebrightness; } internal set { imagebrightness = value; } }
|
||||
|
@ -172,6 +171,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public bool ToolbarFile { get { return toolbarfile; } internal set { toolbarfile = value; } }
|
||||
public float FilterAnisotropy { get { return filteranisotropy; } internal set { filteranisotropy = value; } }
|
||||
public bool ShowTextureSizes { get { return showtexturesizes; } internal set { showtexturesizes = value; } }
|
||||
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
||||
|
||||
//mxd
|
||||
public bool GZDrawModels { get { return gzDrawModels; } internal set { gzDrawModels = value; } }
|
||||
|
@ -277,6 +277,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
toolbarfile = cfg.ReadSetting("toolbarfile", true);
|
||||
filteranisotropy = cfg.ReadSetting("filteranisotropy", 8.0f);
|
||||
showtexturesizes = cfg.ReadSetting("showtexturesizes", true);
|
||||
splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd
|
||||
|
||||
//mxd
|
||||
gzDrawModels = cfg.ReadSetting("gzdrawmodels", true);
|
||||
|
@ -363,6 +364,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
cfg.WriteSetting("toolbarfile", toolbarfile);
|
||||
cfg.WriteSetting("filteranisotropy", filteranisotropy);
|
||||
cfg.WriteSetting("showtexturesizes", showtexturesizes);
|
||||
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
||||
|
||||
//mxd
|
||||
cfg.WriteSetting("gzdrawmodels", gzDrawModels);
|
||||
|
|
|
@ -558,8 +558,8 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
}
|
||||
|
||||
// Update line
|
||||
if(ls.Line.Front != null) ls.Line.Front.RemoveUnneededTextures(wassinglesided);
|
||||
if(ls.Line.Back != null) ls.Line.Back.RemoveUnneededTextures(wassinglesided);
|
||||
if(ls.Line.Front != null)ls.Line.Front.RemoveUnneededTextures(wassinglesided, false, wassinglesided);
|
||||
if(ls.Line.Back != null) ls.Line.Back.RemoveUnneededTextures(wassinglesided, false, wassinglesided);
|
||||
|
||||
// Apply single/double sided flags if the double-sided-ness changed
|
||||
if( (wassinglesided && ((ls.Line.Front != null) && (ls.Line.Back != null))) ||
|
||||
|
@ -597,7 +597,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
ls.Line.ApplySidedFlags();
|
||||
|
||||
// We must remove the (now useless) middle texture on the other side
|
||||
if(ls.Line.Back != null) ls.Line.Back.RemoveUnneededTextures(true, true);
|
||||
if(ls.Line.Back != null) ls.Line.Back.RemoveUnneededTextures(true, true, true);
|
||||
}
|
||||
// Added 23-9-08, can we do this or will it break things?
|
||||
else if(!original.Sector.IsDisposed) //mxd
|
||||
|
@ -617,7 +617,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
ls.Line.ApplySidedFlags();
|
||||
|
||||
// We must remove the (now useless) middle texture on the other side
|
||||
if(ls.Line.Front != null) ls.Line.Front.RemoveUnneededTextures(true, true);
|
||||
if(ls.Line.Front != null) ls.Line.Front.RemoveUnneededTextures(true, true, true);
|
||||
}
|
||||
// Added 23-9-08, can we do this or will it break things?
|
||||
else if(!original.Sector.IsDisposed) //mxd
|
||||
|
@ -1433,23 +1433,56 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
|
||||
//mxd. Apply texture overrides
|
||||
if (useOverrides && !General.Settings.AutoClearSidedefTextures) {
|
||||
foreach(Linedef ld in newlines) {
|
||||
if(!newverts.Contains(ld.Start) || !newverts.Contains(ld.End)) continue;
|
||||
if (ld.Front != null) ApplyOverridesToSidedef(ld.Front);
|
||||
if (ld.Back != null) ApplyOverridesToSidedef(ld.Back);
|
||||
//if new sectors are created, apply overrides to the sides of these sectors, otherwise, apply overrides to all new lines
|
||||
if (insidesides.Count > 0) {
|
||||
foreach(Sidedef side in insidesides) {
|
||||
ApplyOverridesToSidedef(side);
|
||||
}
|
||||
} else {
|
||||
foreach(Linedef l in newlines) {
|
||||
if(l.IsDisposed) continue;
|
||||
if(!newverts.Contains(l.Start) || !newverts.Contains(l.End)) continue;
|
||||
ApplyOverridesToSidedef(l.Front);
|
||||
if(l.Back != null) ApplyOverridesToSidedef(l.Back);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//mxd. Auto-align new lines
|
||||
if(autoAlignTextureOffsets && newlines.Count > 1) {
|
||||
float totalLength = 0f;
|
||||
foreach(Linedef l in newlines) totalLength += l.Length;
|
||||
//mxd. Auto-align new lines
|
||||
if(autoAlignTextureOffsets && newlines.Count > 1 && !splittingonly) {
|
||||
List<List<Linedef>> strips = new List<List<Linedef>>();
|
||||
strips.Add(new List<Linedef> { newlines[0] });
|
||||
|
||||
if(General.Map.UDMF)
|
||||
autoAlignTexturesOnSidesUDMF(newlines, totalLength, (newlines[0].End != newlines[1].Start));
|
||||
else
|
||||
autoAlignTexturesOnSides(newlines, totalLength, (newlines[0].End != newlines[1].Start));
|
||||
for(int i = 1; i < newlines.Count; i++) {
|
||||
//skip double-sided line if it doesn't have lower or upper parts or they are not part of newly created sectors
|
||||
if(newlines[i].Back != null &&
|
||||
(((!newlines[i].Front.LowRequired() && !newlines[i].Front.HighRequired()) || !insidesides.Contains(newlines[i].Front))
|
||||
&& ((!newlines[i].Back.LowRequired() && !newlines[i].Back.HighRequired()) || !insidesides.Contains(newlines[i].Back))))
|
||||
continue;
|
||||
|
||||
bool added = false;
|
||||
foreach(List<Linedef> strip in strips) {
|
||||
if(newlines[i].Start == strip[0].Start || newlines[i].End == strip[0].Start) {
|
||||
strip.Insert(0, newlines[i]);
|
||||
added = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(newlines[i].Start == strip[strip.Count - 1].End || newlines[i].End == strip[strip.Count - 1].End) {
|
||||
strip.Add(newlines[i]);
|
||||
added = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!added) strips.Add(new List<Linedef> { newlines[i] });
|
||||
}
|
||||
|
||||
foreach(List<Linedef> strip in strips) {
|
||||
if(strip.Count < 2) continue;
|
||||
autoAlignLinedefStrip(strip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mark new geometry only
|
||||
|
@ -1462,6 +1495,19 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
return true;
|
||||
}
|
||||
|
||||
//mxd
|
||||
private static void autoAlignLinedefStrip(List<Linedef> strip) {
|
||||
if (strip.Count < 2) return;
|
||||
|
||||
float totalLength = 0f;
|
||||
foreach(Linedef l in strip) totalLength += l.Length;
|
||||
|
||||
if(General.Map.UDMF)
|
||||
autoAlignTexturesOnSidesUDMF(strip, totalLength, (strip[0].End != strip[1].Start));
|
||||
else
|
||||
autoAlignTexturesOnSides(strip, totalLength, (strip[0].End != strip[1].Start));
|
||||
}
|
||||
|
||||
//mxd
|
||||
private static void autoAlignTexturesOnSides(List<Linedef> lines, float totalLength, bool reversed) {
|
||||
float curLength = 0f;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Drawing;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
|
@ -823,27 +825,10 @@ namespace CodeImp.DoomBuilder.Map
|
|||
if(nsd == null) return null;
|
||||
back.CopyPropertiesTo(nsd);
|
||||
nsd.Marked = back.Marked;
|
||||
|
||||
//mxd. Make texture offset adjustments
|
||||
if((back.MiddleRequired() && back.LongMiddleTexture != MapSet.EmptyLongName) || back.HighRequired() || back.LowRequired()) {
|
||||
int distance = (int) Vector2D.Distance(nl.start.Position, nl.end.Position);
|
||||
if (General.Map.UDMF) {
|
||||
if (distance != 0) back.SetUdmfTextureOffsetX(distance);
|
||||
} else {
|
||||
back.OffsetX += distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//mxd. Make texture offset adjustments. Both sides of the new line are required, so we do it here...
|
||||
if(nl.front != null && ((nl.front.MiddleRequired() || nl.front.LongMiddleTexture != MapSet.EmptyLongName) || nl.front.HighRequired() || nl.front.LowRequired())) {
|
||||
int distance = (int)Vector2D.Distance(this.start.Position, this.end.Position);
|
||||
if(General.Map.UDMF) {
|
||||
if(distance != 0) nl.front.SetUdmfTextureOffsetX(distance);
|
||||
} else {
|
||||
nl.front.OffsetX += distance;
|
||||
}
|
||||
}
|
||||
//mxd
|
||||
AdjustSplitCoordinates(this, nl, General.Settings.SplitLineBehavior);
|
||||
|
||||
// Return result
|
||||
General.Map.IsChanged = true;
|
||||
|
@ -1091,6 +1076,166 @@ namespace CodeImp.DoomBuilder.Map
|
|||
this.updateneeded = true;
|
||||
}
|
||||
|
||||
// mxd. Moved here from BuilderModes.BuilderPlug
|
||||
// This adjusts texture coordinates for splitted lines according to the user preferences
|
||||
private static void AdjustSplitCoordinates(Linedef oldline, Linedef newline, SplitLineBehavior splitlinebehavior) {
|
||||
|
||||
switch(splitlinebehavior) {
|
||||
case SplitLineBehavior.Interpolate:
|
||||
//Make texture offset adjustments
|
||||
if(oldline.back != null) {
|
||||
if((oldline.back.MiddleRequired() && oldline.back.LongMiddleTexture != MapSet.EmptyLongName) || oldline.back.HighRequired() || oldline.back.LowRequired()) {
|
||||
int distance = (int)Vector2D.Distance(newline.start.Position, newline.end.Position);
|
||||
if (General.Map.UDMF) {
|
||||
if(distance != 0) oldline.back.SetUdmfTextureOffsetX(distance);
|
||||
} else {
|
||||
oldline.back.OffsetX += distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newline.front != null && ((newline.front.MiddleRequired() || newline.front.LongMiddleTexture != MapSet.EmptyLongName) || newline.front.HighRequired() || newline.front.LowRequired())) {
|
||||
int distance = (int)Vector2D.Distance(oldline.start.Position, oldline.end.Position);
|
||||
if(General.Map.UDMF) {
|
||||
if(distance != 0) newline.front.SetUdmfTextureOffsetX(distance);
|
||||
} else {
|
||||
newline.front.OffsetX += distance;
|
||||
}
|
||||
}
|
||||
|
||||
//Clamp texture coordinates
|
||||
if((oldline.front != null) && (newline.front != null)) {
|
||||
//get texture
|
||||
ImageData texture = null;
|
||||
|
||||
if(newline.front.MiddleRequired() && newline.front.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.front.LongMiddleTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.front.MiddleTexture);
|
||||
} else if(newline.front.HighRequired() && newline.front.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.front.LongHighTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.front.HighTexture);
|
||||
} else if(newline.front.LowRequired() && newline.front.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.front.LongLowTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.front.LowTexture);
|
||||
}
|
||||
|
||||
//clamp offsetX
|
||||
if(texture != null) newline.front.OffsetX %= texture.Width;
|
||||
}
|
||||
|
||||
if((oldline.back != null) && (newline.back != null)) {
|
||||
//get texture
|
||||
ImageData texture = null;
|
||||
|
||||
if(newline.back.MiddleRequired() && newline.back.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.back.LongMiddleTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.back.MiddleTexture);
|
||||
} else if(newline.back.HighRequired() && newline.back.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.back.LongHighTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.back.HighTexture);
|
||||
} else if(newline.back.LowRequired() && newline.back.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.back.LongLowTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.back.LowTexture);
|
||||
}
|
||||
|
||||
//clamp offsetX
|
||||
if(texture != null) newline.back.OffsetX %= texture.Width;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SplitLineBehavior.CopyXY:
|
||||
if((oldline.front != null) && (newline.front != null)) {
|
||||
newline.front.OffsetX = oldline.front.OffsetX;
|
||||
newline.front.OffsetY = oldline.front.OffsetY;
|
||||
|
||||
//mxd. Copy UDMF offsets as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_top", oldline.front.Fields.GetValue("offsetx_top", 0f));
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_mid", oldline.front.Fields.GetValue("offsetx_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_bottom", oldline.front.Fields.GetValue("offsetx_bottom", 0f));
|
||||
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_top", oldline.front.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_mid", oldline.front.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_bottom", oldline.front.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
|
||||
if((oldline.back != null) && (newline.back != null)) {
|
||||
newline.back.OffsetX = oldline.back.OffsetX;
|
||||
newline.back.OffsetY = oldline.back.OffsetY;
|
||||
|
||||
//mxd. Copy UDMF offsets as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_top", oldline.back.Fields.GetValue("offsetx_top", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_mid", oldline.back.Fields.GetValue("offsetx_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_bottom", oldline.back.Fields.GetValue("offsetx_bottom", 0f));
|
||||
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_top", oldline.back.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_mid", oldline.back.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_bottom", oldline.back.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SplitLineBehavior.ResetXCopyY:
|
||||
if((oldline.front != null) && (newline.front != null)) {
|
||||
newline.front.OffsetX = 0;
|
||||
newline.front.OffsetY = oldline.front.OffsetY;
|
||||
|
||||
//mxd. Reset UDMF X offset as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_bottom", 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if((oldline.back != null) && (newline.back != null)) {
|
||||
newline.back.OffsetX = 0;
|
||||
newline.back.OffsetY = oldline.back.OffsetY;
|
||||
|
||||
//mxd. Reset UDMF X offset and copy Y offset as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_bottom", 0f);
|
||||
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_top", oldline.back.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_mid", oldline.back.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_bottom", oldline.back.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SplitLineBehavior.ResetXY:
|
||||
if(newline.front != null) {
|
||||
newline.front.OffsetX = 0;
|
||||
newline.front.OffsetY = 0;
|
||||
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsetx_bottom", 0f);
|
||||
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_top", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.front.Fields, "offsety_bottom", 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if(newline.back != null) {
|
||||
newline.back.OffsetX = 0;
|
||||
newline.back.OffsetY = 0;
|
||||
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsetx_bottom", 0f);
|
||||
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_top", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.back.Fields, "offsety_bottom", 0f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -299,23 +299,19 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// This removes textures that are not required
|
||||
public void RemoveUnneededTextures(bool removemiddle)
|
||||
{
|
||||
RemoveUnneededTextures(removemiddle, false);
|
||||
RemoveUnneededTextures(removemiddle, false, false);
|
||||
}
|
||||
|
||||
// This removes textures that are not required
|
||||
public void RemoveUnneededTextures(bool removemiddle, bool force)
|
||||
{
|
||||
RemoveUnneededTextures(removemiddle, force, false);
|
||||
}
|
||||
|
||||
// This removes textures that are not required
|
||||
public void RemoveUnneededTextures(bool removemiddle, bool force)
|
||||
public void RemoveUnneededTextures(bool removemiddle, bool force, bool shiftmiddle)
|
||||
{
|
||||
bool changed = false; //mxd
|
||||
|
||||
// The middle texture can be removed regardless of any sector tag or linedef action
|
||||
if(!MiddleRequired() && removemiddle)
|
||||
{
|
||||
BeforePropsChange(); //mxd
|
||||
changed = true; //mxd
|
||||
this.texnamemid = "-";
|
||||
this.longtexnamemid = MapSet.EmptyLongName;
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
// Check if the line or sectors have no action or tags because
|
||||
// if they do, any texture on this side could be needed
|
||||
|
@ -324,23 +320,42 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
if(!HighRequired())
|
||||
{
|
||||
if(!changed) { //mxd
|
||||
BeforePropsChange();
|
||||
changed = true;
|
||||
}
|
||||
BeforePropsChange(); //mxd
|
||||
changed = true;
|
||||
this.texnamehigh = "-";
|
||||
this.longtexnamehigh = MapSet.EmptyLongName;
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
else if(shiftmiddle && this.longtexnamehigh == MapSet.EmptyLongName) //mxd
|
||||
{
|
||||
SetTextureHigh(this.texnamemid);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if(!LowRequired())
|
||||
{
|
||||
if(!changed) BeforePropsChange(); //mxd
|
||||
if(!changed) { //mxd
|
||||
BeforePropsChange();
|
||||
changed = true;
|
||||
}
|
||||
this.texnamelow = "-";
|
||||
this.longtexnamelow = MapSet.EmptyLongName;
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
else if(shiftmiddle && this.longtexnamelow == MapSet.EmptyLongName) //mxd
|
||||
{
|
||||
SetTextureLow(this.texnamemid);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// The middle texture can be removed regardless of any sector tag or linedef action
|
||||
if(!MiddleRequired() && removemiddle) {
|
||||
if(!changed) BeforePropsChange(); //mxd
|
||||
this.texnamemid = "-";
|
||||
this.longtexnamemid = MapSet.EmptyLongName;
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
10
Source/Core/Map/SplitLineBehavior.cs
Normal file
10
Source/Core/Map/SplitLineBehavior.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
namespace CodeImp.DoomBuilder.Map
|
||||
{
|
||||
public enum SplitLineBehavior
|
||||
{
|
||||
Interpolate,
|
||||
CopyXY,
|
||||
ResetXCopyY,
|
||||
ResetXY,
|
||||
}
|
||||
}
|
66
Source/Core/Windows/MainForm.Designer.cs
generated
66
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -188,6 +188,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttoninsertpreviousprefab = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonthingsfilter = new System.Windows.Forms.ToolStripButton();
|
||||
this.thingfilters = new System.Windows.Forms.ToolStripComboBox();
|
||||
this.separatorfilters = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton();
|
||||
this.separatorfullbrightness = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttonviewnormal = new System.Windows.Forms.ToolStripButton();
|
||||
|
@ -259,7 +260,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
|
||||
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.modecontrolsloolbar = new System.Windows.Forms.ToolStrip();
|
||||
this.separatorfilters = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.separatorio = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.itemimport = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemexport = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -384,7 +387,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(328, 24);
|
||||
this.menumain.Size = new System.Drawing.Size(420, 24);
|
||||
this.menumain.TabIndex = 0;
|
||||
//
|
||||
// menufile
|
||||
|
@ -399,6 +402,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.itemsavemapas,
|
||||
this.itemsavemapinto,
|
||||
this.seperatorfilesave,
|
||||
this.itemimport,
|
||||
this.itemexport,
|
||||
this.separatorio,
|
||||
this.itemnorecent,
|
||||
this.seperatorfilerecent,
|
||||
this.itemexit});
|
||||
|
@ -1244,7 +1250,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemreloadresources
|
||||
//
|
||||
this.itemreloadresources.Name = "itemreloadresources";
|
||||
this.itemreloadresources.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemreloadresources.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemreloadresources.Tag = "builder_reloadresources";
|
||||
this.itemreloadresources.Text = "&Reload Resources";
|
||||
this.itemreloadresources.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1252,7 +1258,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemReloadModedef
|
||||
//
|
||||
this.itemReloadModedef.Name = "itemReloadModedef";
|
||||
this.itemReloadModedef.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemReloadModedef.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemReloadModedef.Tag = "builder_gzreloadmodeldef";
|
||||
this.itemReloadModedef.Text = "Reload MODELDEF/VOXELDEF";
|
||||
this.itemReloadModedef.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1260,7 +1266,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemReloadGldefs
|
||||
//
|
||||
this.itemReloadGldefs.Name = "itemReloadGldefs";
|
||||
this.itemReloadGldefs.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemReloadGldefs.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemReloadGldefs.Tag = "builder_gzreloadgldefs";
|
||||
this.itemReloadGldefs.Text = "Reload GLDEFS";
|
||||
this.itemReloadGldefs.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1268,7 +1274,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// itemReloadMapinfo
|
||||
//
|
||||
this.itemReloadMapinfo.Name = "itemReloadMapinfo";
|
||||
this.itemReloadMapinfo.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemReloadMapinfo.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemReloadMapinfo.Tag = "builder_gzreloadmapinfo";
|
||||
this.itemReloadMapinfo.Text = "Reload (Z)MAPINFO";
|
||||
this.itemReloadMapinfo.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1277,7 +1283,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.itemshowerrors.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning;
|
||||
this.itemshowerrors.Name = "itemshowerrors";
|
||||
this.itemshowerrors.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemshowerrors.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemshowerrors.Tag = "builder_showerrors";
|
||||
this.itemshowerrors.Text = "&Errors and Warnings...";
|
||||
this.itemshowerrors.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1286,12 +1292,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.seperatortoolsresources.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.seperatortoolsresources.Name = "seperatortoolsresources";
|
||||
this.seperatortoolsresources.Size = new System.Drawing.Size(229, 6);
|
||||
this.seperatortoolsresources.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// configurationToolStripMenuItem
|
||||
//
|
||||
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.configurationToolStripMenuItem.Tag = "builder_configuration";
|
||||
this.configurationToolStripMenuItem.Text = "&Game Configurations...";
|
||||
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1299,7 +1305,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// preferencesToolStripMenuItem
|
||||
//
|
||||
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
|
||||
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.preferencesToolStripMenuItem.Tag = "builder_preferences";
|
||||
this.preferencesToolStripMenuItem.Text = "Preferences...";
|
||||
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1308,12 +1314,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
this.seperatortoolsconfig.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.seperatortoolsconfig.Name = "seperatortoolsconfig";
|
||||
this.seperatortoolsconfig.Size = new System.Drawing.Size(229, 6);
|
||||
this.seperatortoolsconfig.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// screenshotToolStripMenuItem
|
||||
//
|
||||
this.screenshotToolStripMenuItem.Name = "screenshotToolStripMenuItem";
|
||||
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.screenshotToolStripMenuItem.Tag = "builder_savescreenshot";
|
||||
this.screenshotToolStripMenuItem.Text = "Save Screenshot";
|
||||
this.screenshotToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1321,7 +1327,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// editAreaScreenshotToolStripMenuItem
|
||||
//
|
||||
this.editAreaScreenshotToolStripMenuItem.Name = "editAreaScreenshotToolStripMenuItem";
|
||||
this.editAreaScreenshotToolStripMenuItem.Size = new System.Drawing.Size(232, 22);
|
||||
this.editAreaScreenshotToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.editAreaScreenshotToolStripMenuItem.Tag = "builder_saveeditareascreenshot";
|
||||
this.editAreaScreenshotToolStripMenuItem.Text = "Save Screenshot (editing area)";
|
||||
this.editAreaScreenshotToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1329,13 +1335,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// separatortoolsscreenshots
|
||||
//
|
||||
this.separatortoolsscreenshots.Name = "separatortoolsscreenshots";
|
||||
this.separatortoolsscreenshots.Size = new System.Drawing.Size(229, 6);
|
||||
this.separatortoolsscreenshots.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// itemtestmap
|
||||
//
|
||||
this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
|
||||
this.itemtestmap.Name = "itemtestmap";
|
||||
this.itemtestmap.Size = new System.Drawing.Size(232, 22);
|
||||
this.itemtestmap.Size = new System.Drawing.Size(233, 22);
|
||||
this.itemtestmap.Tag = "builder_testmap";
|
||||
this.itemtestmap.Text = "&Test Map";
|
||||
this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -1681,6 +1687,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.thingfilters.SelectedIndexChanged += new System.EventHandler(this.thingfilters_SelectedIndexChanged);
|
||||
this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus);
|
||||
//
|
||||
// separatorfilters
|
||||
//
|
||||
this.separatorfilters.Name = "separatorfilters";
|
||||
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// buttonfullbrightness
|
||||
//
|
||||
this.buttonfullbrightness.CheckOnClick = true;
|
||||
|
@ -2381,12 +2392,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// modestoolbar
|
||||
//
|
||||
this.modestoolbar.AutoSize = false;
|
||||
this.modestoolbar.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.modestoolbar.Location = new System.Drawing.Point(0, 49);
|
||||
this.modestoolbar.Name = "modestoolbar";
|
||||
this.modestoolbar.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.modestoolbar.Size = new System.Drawing.Size(30, 515);
|
||||
this.modestoolbar.Padding = new Padding(2, 0, 2, 0);
|
||||
this.modestoolbar.AutoSize = false;
|
||||
this.modestoolbar.TabIndex = 8;
|
||||
this.modestoolbar.Text = "toolStrip1";
|
||||
this.modestoolbar.Visible = false;
|
||||
|
@ -2428,10 +2439,22 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.modecontrolsloolbar.Text = "toolStrip1";
|
||||
this.modecontrolsloolbar.Visible = false;
|
||||
//
|
||||
// separatorfilters
|
||||
// separatorio
|
||||
//
|
||||
this.separatorfilters.Name = "separatorfilters";
|
||||
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
|
||||
this.separatorio.Name = "separatorio";
|
||||
this.separatorio.Size = new System.Drawing.Size(220, 6);
|
||||
//
|
||||
// itemimport
|
||||
//
|
||||
this.itemimport.Name = "itemimport";
|
||||
this.itemimport.Size = new System.Drawing.Size(223, 22);
|
||||
this.itemimport.Text = "Import";
|
||||
//
|
||||
// itemexport
|
||||
//
|
||||
this.itemexport.Name = "itemexport";
|
||||
this.itemexport.Size = new System.Drawing.Size(223, 22);
|
||||
this.itemexport.Text = "Export";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
@ -2702,5 +2725,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.ToolStripButton buttonfullbrightness;
|
||||
private System.Windows.Forms.ToolStripSeparator separatorfullbrightness;
|
||||
private System.Windows.Forms.ToolStripSeparator separatorfilters;
|
||||
private ToolStripMenuItem itemimport;
|
||||
private ToolStripMenuItem itemexport;
|
||||
private ToolStripSeparator separatorio;
|
||||
}
|
||||
}
|
|
@ -2109,6 +2109,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
case MenuSection.FileNewOpenClose: menufile.DropDownItems.Insert(menufile.DropDownItems.IndexOf(seperatorfileopen), menu); break;
|
||||
case MenuSection.FileSave: menufile.DropDownItems.Insert(menufile.DropDownItems.IndexOf(seperatorfilesave), menu); break;
|
||||
case MenuSection.FileImport: itemimport.DropDownItems.Add(menu); break; //mxd
|
||||
case MenuSection.FileExport: itemexport.DropDownItems.Add(menu); break; //mxd
|
||||
case MenuSection.FileRecent: menufile.DropDownItems.Insert(menufile.DropDownItems.IndexOf(seperatorfilerecent), menu); break;
|
||||
case MenuSection.FileExit: menufile.DropDownItems.Insert(menufile.DropDownItems.IndexOf(itemexit), menu); break;
|
||||
case MenuSection.EditUndoRedo: menuedit.DropDownItems.Insert(menuedit.DropDownItems.IndexOf(seperatoreditundo), menu); break;
|
||||
|
@ -2259,6 +2261,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
itemsavemapinto.Enabled = (General.Map != null);
|
||||
itemtestmap.Enabled = (General.Map != null);
|
||||
itemopenmapincurwad.Enabled = (General.Map != null); //mxd
|
||||
itemimport.Enabled = (General.Map != null); //mxd
|
||||
itemexport.Enabled = (General.Map != null); //mxd
|
||||
|
||||
// Toolbar icons
|
||||
buttonnewmap.Enabled = itemnewmap.Enabled;
|
||||
|
|
|
@ -24,6 +24,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
FileNewOpenClose,
|
||||
FileSave,
|
||||
FileImport, //mxd
|
||||
FileExport, //mxd
|
||||
FileRecent,
|
||||
FileExit,
|
||||
EditUndoRedo,
|
||||
|
|
|
@ -27,12 +27,10 @@
|
|||
private void InitializeComponent() {
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
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.toolStripMenuItem3 = 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.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.jitterItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.toolStrip.SuspendLayout();
|
||||
|
@ -42,7 +40,6 @@
|
|||
//
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.importStripMenuItem,
|
||||
this.exportStripMenuItem,
|
||||
this.toolStripMenuItem3});
|
||||
this.menuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
|
@ -58,30 +55,13 @@
|
|||
this.importStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.importStripMenuItem.Text = "Import";
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem1.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Terrain;
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(215, 22);
|
||||
this.toolStripMenuItem1.Tag = "importobjasterrain";
|
||||
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);
|
||||
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";
|
||||
//
|
||||
// toolStrip
|
||||
//
|
||||
|
@ -104,19 +84,20 @@
|
|||
this.jitterButton.Text = "Apply Jitter";
|
||||
this.jitterButton.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
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";
|
||||
this.toolStripMenuItem1.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Terrain;
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(215, 22);
|
||||
this.toolStripMenuItem1.Tag = "importobjasterrain";
|
||||
this.toolStripMenuItem1.Text = "Wavefront .obj as Terrain...";
|
||||
this.toolStripMenuItem1.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// 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.Size = new System.Drawing.Size(133, 22);
|
||||
this.jitterItem.Tag = "applyjitter";
|
||||
this.jitterItem.Text = "Apply Jitter";
|
||||
this.jitterItem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
|
@ -145,8 +126,6 @@
|
|||
private System.Windows.Forms.MenuStrip menuStrip;
|
||||
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;
|
||||
|
|
|
@ -20,8 +20,10 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
// Add the menus to the core
|
||||
General.Interface.AddModesMenu(jitterItem, "002_modify");
|
||||
General.Interface.AddModesButton(jitterButton, "002_modify");
|
||||
General.Interface.AddMenu(importStripMenuItem, MenuSection.FileNewOpenClose);
|
||||
General.Interface.AddMenu(exportStripMenuItem, MenuSection.FileNewOpenClose);
|
||||
|
||||
for(int i = 0; i < importStripMenuItem.DropDownItems.Count; i++) {
|
||||
General.Interface.AddMenu(importStripMenuItem.DropDownItems[i] as ToolStripMenuItem, MenuSection.FileImport);
|
||||
}
|
||||
}
|
||||
|
||||
// This unregisters from the core
|
||||
|
@ -29,8 +31,10 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
// Remove the menus from the core
|
||||
General.Interface.RemoveMenu(jitterItem);
|
||||
General.Interface.RemoveButton(jitterButton);
|
||||
General.Interface.RemoveMenu(importStripMenuItem);
|
||||
General.Interface.RemoveMenu(exportStripMenuItem);
|
||||
|
||||
for (int i = 0; i < importStripMenuItem.DropDownItems.Count; i++) {
|
||||
General.Interface.RemoveMenu(importStripMenuItem.DropDownItems[i] as ToolStripMenuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ applyjitter
|
|||
importobjasterrain
|
||||
{
|
||||
title = "Import Wavefront .obj as terrain";
|
||||
category = "transform";
|
||||
category = "tools";
|
||||
description = "Creates sectors from given model (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
|
|
|
@ -1047,7 +1047,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.UndoRedo.WithdrawUndo();
|
||||
break;
|
||||
}
|
||||
BuilderPlug.Me.AdjustSplitCoordinates(ld, sld);
|
||||
//BuilderPlug.Me.AdjustSplitCoordinates(ld, sld);
|
||||
}
|
||||
|
||||
// Update cache values
|
||||
|
|
|
@ -325,7 +325,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.UndoRedo.WithdrawUndo();
|
||||
return;
|
||||
}
|
||||
BuilderPlug.Me.AdjustSplitCoordinates(l, sld);
|
||||
//BuilderPlug.Me.AdjustSplitCoordinates(l, sld);
|
||||
|
||||
// Update
|
||||
General.Map.Map.Update();
|
||||
|
@ -816,7 +816,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Map.UndoRedo.WithdrawUndo();
|
||||
return;
|
||||
}
|
||||
BuilderPlug.Me.AdjustSplitCoordinates(l, sld);
|
||||
//BuilderPlug.Me.AdjustSplitCoordinates(l, sld);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -82,7 +82,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private int showvisualthings; // 0 = none, 1 = sprite only, 2 = sprite caged
|
||||
private bool usegravity;
|
||||
private int changeheightbysidedef; // 0 = nothing, 1 = change ceiling, 2 = change floor
|
||||
private int splitlinebehavior; // 0 = adjust texcoords, 1 = copy texcoords, 2 = reset texcoords
|
||||
private bool editnewthing;
|
||||
private bool editnewsector;
|
||||
private bool additiveselect;
|
||||
|
@ -133,7 +132,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public int ShowVisualThings { get { return showvisualthings; } set { showvisualthings = value; } }
|
||||
public bool UseGravity { get { return usegravity; } set { usegravity = value; } }
|
||||
public int ChangeHeightBySidedef { get { return changeheightbysidedef; } }
|
||||
public int SplitLineBehavior { get { return splitlinebehavior; } }
|
||||
public bool EditNewThing { get { return editnewthing; } }
|
||||
public bool EditNewSector { get { return editnewsector; } }
|
||||
public bool AdditiveSelect { get { return additiveselect; } }
|
||||
|
@ -235,7 +233,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private void LoadSettings()
|
||||
{
|
||||
changeheightbysidedef = General.Settings.ReadPluginSetting("changeheightbysidedef", 0);
|
||||
splitlinebehavior = General.Settings.ReadPluginSetting("splitlinebehavior", 0);
|
||||
editnewthing = General.Settings.ReadPluginSetting("editnewthing", true);
|
||||
editnewsector = General.Settings.ReadPluginSetting("editnewsector", false);
|
||||
additiveselect = General.Settings.ReadPluginSetting("additiveselect", false);
|
||||
|
@ -471,115 +468,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
vertices[i].c = color;
|
||||
}
|
||||
}
|
||||
|
||||
// This adjusts texture coordinates for splitted lines according to the user preferences
|
||||
public void AdjustSplitCoordinates(Linedef oldline, Linedef newline)
|
||||
{
|
||||
//mxd. Clamp texture coordinates (they are already adjusted, we just need to clamp OffsetX by texture width)
|
||||
if(splitlinebehavior == 0) {
|
||||
if((oldline.Front != null) && (newline.Front != null)) {
|
||||
//get texture
|
||||
ImageData texture = null;
|
||||
|
||||
if(newline.Front.MiddleRequired() && newline.Front.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Front.LongMiddleTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Front.MiddleTexture);
|
||||
} else if(newline.Front.HighRequired() && newline.Front.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Front.LongHighTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Front.HighTexture);
|
||||
} else if(newline.Front.LowRequired() && newline.Front.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Front.LongLowTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Front.LowTexture);
|
||||
}
|
||||
|
||||
//clamp offsetX
|
||||
if(texture != null) newline.Front.OffsetX %= texture.Width;
|
||||
}
|
||||
|
||||
if((oldline.Back != null) && (newline.Back != null)) {
|
||||
//get texture
|
||||
ImageData texture = null;
|
||||
|
||||
if(newline.Back.MiddleRequired() && newline.Back.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Back.LongMiddleTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Back.MiddleTexture);
|
||||
} else if(newline.Back.HighRequired() && newline.Back.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Back.LongHighTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Back.HighTexture);
|
||||
} else if(newline.Back.LowRequired() && newline.Back.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(newline.Back.LongLowTexture)) {
|
||||
texture = General.Map.Data.GetTextureImage(newline.Back.LowTexture);
|
||||
}
|
||||
|
||||
//clamp offsetX
|
||||
if(texture != null) newline.Back.OffsetX %= texture.Width;
|
||||
}
|
||||
}
|
||||
// Copy X and Y coordinates
|
||||
if(splitlinebehavior == 1)
|
||||
{
|
||||
if((oldline.Front != null) && (newline.Front != null))
|
||||
{
|
||||
newline.Front.OffsetX = oldline.Front.OffsetX;
|
||||
newline.Front.OffsetY = oldline.Front.OffsetY;
|
||||
|
||||
//mxd. Copy UDMF offsets as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_top", oldline.Front.Fields.GetValue("offsetx_top", 0f));
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_mid", oldline.Front.Fields.GetValue("offsetx_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_bottom", oldline.Front.Fields.GetValue("offsetx_bottom", 0f));
|
||||
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsety_top", oldline.Front.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsety_mid", oldline.Front.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsety_bottom", oldline.Front.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
|
||||
if((oldline.Back != null) && (newline.Back != null))
|
||||
{
|
||||
newline.Back.OffsetX = oldline.Back.OffsetX;
|
||||
newline.Back.OffsetY = oldline.Back.OffsetY;
|
||||
|
||||
//mxd. Copy UDMF offsets as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_top", oldline.Back.Fields.GetValue("offsetx_top", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_mid", oldline.Back.Fields.GetValue("offsetx_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_bottom", oldline.Back.Fields.GetValue("offsetx_bottom", 0f));
|
||||
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_top", oldline.Back.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_mid", oldline.Back.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_bottom", oldline.Back.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reset X coordinate, copy Y coordinate
|
||||
else if(splitlinebehavior == 2)
|
||||
{
|
||||
if((oldline.Front != null) && (newline.Front != null))
|
||||
{
|
||||
newline.Front.OffsetX = 0;
|
||||
newline.Front.OffsetY = oldline.Front.OffsetY;
|
||||
|
||||
//mxd. Reset UDMF X offset as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.Front.Fields, "offsetx_bottom", 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if((oldline.Back != null) && (newline.Back != null))
|
||||
{
|
||||
newline.Back.OffsetX = 0;
|
||||
newline.Back.OffsetY = oldline.Back.OffsetY;
|
||||
|
||||
//mxd. Reset UDMF X offset and copy Y offset as well
|
||||
if(General.Map.UDMF) {
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_top", 0f);
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_mid", 0f);
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsetx_bottom", 0f);
|
||||
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_top", oldline.Back.Fields.GetValue("offsety_top", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_mid", oldline.Back.Fields.GetValue("offsety_mid", 0f));
|
||||
UDMFTools.SetFloat(newline.Back.Fields, "offsety_bottom", oldline.Back.Fields.GetValue("offsety_bottom", 0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This finds all class types that inherits from the given type
|
||||
public Type[] FindClasses(Type t)
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = 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();
|
||||
|
@ -81,9 +82,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonMakeDoor = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menustrip.SuspendLayout();
|
||||
this.manualstrip.SuspendLayout();
|
||||
this.fileMenuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menustrip
|
||||
|
@ -93,7 +97,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.sectorsmenu,
|
||||
this.thingsmenu,
|
||||
this.vertsmenu});
|
||||
this.menustrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.menustrip.Location = new System.Drawing.Point(0, 24);
|
||||
this.menustrip.Name = "menustrip";
|
||||
this.menustrip.Size = new System.Drawing.Size(588, 24);
|
||||
this.menustrip.TabIndex = 0;
|
||||
|
@ -313,6 +317,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.makedooritem.Text = "Make &Door";
|
||||
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(242, 6);
|
||||
this.toolStripSeparator4.Visible = false;
|
||||
//
|
||||
// thingsmenu
|
||||
//
|
||||
this.thingsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -375,7 +385,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//
|
||||
// globalstrip
|
||||
//
|
||||
this.globalstrip.Location = new System.Drawing.Point(0, 24);
|
||||
this.globalstrip.Location = new System.Drawing.Point(0, 48);
|
||||
this.globalstrip.Name = "globalstrip";
|
||||
this.globalstrip.Size = new System.Drawing.Size(588, 25);
|
||||
this.globalstrip.TabIndex = 1;
|
||||
|
@ -401,7 +411,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.buttonAlignThingsToWall,
|
||||
this.buttonTextureOffsetLock,
|
||||
this.buttonMakeDoor});
|
||||
this.manualstrip.Location = new System.Drawing.Point(0, 49);
|
||||
this.manualstrip.Location = new System.Drawing.Point(0, 73);
|
||||
this.manualstrip.Name = "manualstrip";
|
||||
this.manualstrip.Size = new System.Drawing.Size(588, 25);
|
||||
this.manualstrip.TabIndex = 2;
|
||||
|
@ -585,11 +595,31 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.buttonMakeDoor.Text = "Make Door From Selection";
|
||||
this.buttonMakeDoor.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
// fileMenuStrip
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(242, 6);
|
||||
this.toolStripSeparator4.Visible = false;
|
||||
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exportStripMenuItem});
|
||||
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.fileMenuStrip.Name = "fileMenuStrip";
|
||||
this.fileMenuStrip.Size = new System.Drawing.Size(588, 24);
|
||||
this.fileMenuStrip.TabIndex = 3;
|
||||
this.fileMenuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// exportStripMenuItem
|
||||
//
|
||||
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem5});
|
||||
this.exportStripMenuItem.Name = "exportStripMenuItem";
|
||||
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
|
||||
this.exportStripMenuItem.Text = "Export";
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
|
||||
this.toolStripMenuItem5.Tag = "exporttoobj";
|
||||
this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
|
||||
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// MenusForm
|
||||
//
|
||||
|
@ -599,6 +629,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.Controls.Add(this.manualstrip);
|
||||
this.Controls.Add(this.globalstrip);
|
||||
this.Controls.Add(this.menustrip);
|
||||
this.Controls.Add(this.fileMenuStrip);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MainMenuStrip = this.menustrip;
|
||||
|
@ -612,6 +643,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.menustrip.PerformLayout();
|
||||
this.manualstrip.ResumeLayout(false);
|
||||
this.manualstrip.PerformLayout();
|
||||
this.fileMenuStrip.ResumeLayout(false);
|
||||
this.fileMenuStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -673,5 +706,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private System.Windows.Forms.ToolStripButton buttonMakeDoor;
|
||||
private System.Windows.Forms.ToolStripMenuItem makedooritem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.MenuStrip fileMenuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -31,6 +32,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Menus list
|
||||
private ToolStripItem[] menus;
|
||||
|
||||
// mxd. More menus
|
||||
private ToolStripItem[] exportmenuitems;
|
||||
|
||||
// Buttons list
|
||||
private ToolStripItem[] buttons;
|
||||
|
||||
|
@ -90,6 +94,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
menus = new ToolStripItem[menustrip.Items.Count];
|
||||
for(int i = 0; i < menustrip.Items.Count; i++) menus[i] = menustrip.Items[i];
|
||||
|
||||
//mxd
|
||||
exportmenuitems = new ToolStripItem[exportStripMenuItem.DropDownItems.Count];
|
||||
for(int i = 0; i < exportStripMenuItem.DropDownItems.Count; i++)
|
||||
exportmenuitems[i] = exportStripMenuItem.DropDownItems[i];
|
||||
|
||||
// List all buttons
|
||||
buttons = new ToolStripItem[globalstrip.Items.Count];
|
||||
for(int i = 0; i < globalstrip.Items.Count; i++) buttons[i] = globalstrip.Items[i];
|
||||
|
@ -109,6 +118,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Add the buttons to the core
|
||||
foreach(ToolStripItem b in buttons)
|
||||
General.Interface.AddButton(b);
|
||||
|
||||
//mxd
|
||||
foreach(ToolStripMenuItem menu in exportmenuitems)
|
||||
General.Interface.AddMenu(menu, MenuSection.FileExport);
|
||||
}
|
||||
|
||||
// This unregisters from the core
|
||||
|
@ -121,6 +134,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Remove the buttons from the core
|
||||
foreach(ToolStripItem b in buttons)
|
||||
General.Interface.RemoveButton(b);
|
||||
|
||||
//mxd
|
||||
foreach(ToolStripMenuItem menu in exportmenuitems)
|
||||
General.Interface.RemoveMenu(menu);
|
||||
}
|
||||
|
||||
// This hides all menus
|
||||
|
|
|
@ -135,4 +135,7 @@
|
|||
<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="fileMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>326, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -493,7 +493,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.splitbehavior.Items.AddRange(new object[] {
|
||||
"Interpolate texture coordinates",
|
||||
"Duplicate texture coordinates",
|
||||
"Reset X coordinate, duplicate Y coordinate"});
|
||||
"Reset X coordinate, duplicate Y coordinate",
|
||||
"Reset X and Y coordinates"});
|
||||
this.splitbehavior.Location = new System.Drawing.Point(342, 55);
|
||||
this.splitbehavior.Name = "splitbehavior";
|
||||
this.splitbehavior.Size = new System.Drawing.Size(309, 22);
|
||||
|
@ -502,11 +503,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(158, 58);
|
||||
this.label10.Location = new System.Drawing.Point(203, 58);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(166, 14);
|
||||
this.label10.Size = new System.Drawing.Size(121, 14);
|
||||
this.label10.TabIndex = 1;
|
||||
this.label10.Text = "When splitting a linedef manually:";
|
||||
this.label10.Text = "When splitting a linedef:";
|
||||
this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
//
|
||||
// label1
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#region ================== Namespaces
|
||||
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
|
||||
#endregion
|
||||
|
@ -42,7 +43,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Apply current settings to interface
|
||||
heightbysidedef.SelectedIndex = General.Settings.ReadPluginSetting("changeheightbysidedef", 0);
|
||||
splitbehavior.SelectedIndex = General.Settings.ReadPluginSetting("splitlinebehavior", 0);
|
||||
editnewthing.Checked = General.Settings.ReadPluginSetting("editnewthing", true);
|
||||
editnewsector.Checked = General.Settings.ReadPluginSetting("editnewsector", false);
|
||||
additiveselect.Checked = General.Settings.ReadPluginSetting("additiveselect", false);
|
||||
|
@ -50,6 +50,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
highlightrange.Text = General.Settings.ReadPluginSetting("highlightrange", 20).ToString();
|
||||
highlightthingsrange.Text = General.Settings.ReadPluginSetting("highlightthingsrange", 10).ToString();
|
||||
splitlinedefsrange.Text = General.Settings.ReadPluginSetting("splitlinedefsrange", 10).ToString();
|
||||
splitbehavior.SelectedIndex = (int)General.Settings.SplitLineBehavior; //mxd
|
||||
autoclearselection.Checked = BuilderPlug.Me.AutoClearSelection;
|
||||
visualmodeclearselection.Checked = BuilderPlug.Me.VisualModeClearSelection;
|
||||
autodragonpaste.Checked = BuilderPlug.Me.AutoDragOnPaste;
|
||||
|
@ -71,7 +72,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Write preferred settings
|
||||
General.Settings.WritePluginSetting("changeheightbysidedef", heightbysidedef.SelectedIndex);
|
||||
General.Settings.WritePluginSetting("splitlinebehavior", splitbehavior.SelectedIndex);
|
||||
General.Settings.WritePluginSetting("editnewthing", editnewthing.Checked);
|
||||
General.Settings.WritePluginSetting("editnewsector", editnewsector.Checked);
|
||||
General.Settings.WritePluginSetting("additiveselect", additiveselect.Checked);
|
||||
|
@ -86,6 +86,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Settings.WritePluginSetting("autoaligntextureoffsetsoncreate", autoaligntexturesoncreate.Checked);//mxd
|
||||
General.Settings.WritePluginSetting("dontmovegeometryoutsidemapboundary", dontMoveGeometryOutsideBounds.Checked);//mxd
|
||||
General.Settings.WritePluginSetting("syncselection", syncSelection.Checked);//mxd
|
||||
General.Settings.SplitLineBehavior = (SplitLineBehavior)splitbehavior.SelectedIndex;//mxd
|
||||
|
||||
//default sector values
|
||||
General.Settings.DefaultBrightness = General.Clamp(defaultbrightness.GetResult(192), 0, 255);
|
||||
|
|
Loading…
Reference in a new issue