Classic modes, UDMF: floor/ceiling texture offsets can now be locked in place while sector is dragged.

Fixed another bug in Tools.autoAlignTexturesOnSidesUDMF()
Replaced Math.PI-related equations with stuff from Angle2D class.
This commit is contained in:
MaxED 2013-04-11 09:27:16 +00:00
parent 043590100b
commit 8f47c316b9
38 changed files with 616 additions and 444 deletions

View file

@ -83,7 +83,7 @@ namespace CodeImp.DoomBuilder.Controls
int cl = (int)s.Fields["lightceiling"].Value;
if(s.Fields.ContainsKey("lightceilingabsolute") && Boolean.Parse(s.Fields["lightceilingabsolute"].Value.ToString()))
if(s.Fields.GetValue("lightceilingabsolute", false))
ceilingLight.Text = cl + " (abs.)";
else
ceilingLight.Text = cl + " (" + Math.Min(255, Math.Max(0, (cl + s.Brightness))) + ")";
@ -101,7 +101,7 @@ namespace CodeImp.DoomBuilder.Controls
int fl = (int)s.Fields["lightfloor"].Value;
if(s.Fields.ContainsKey("lightfloorabsolute") && Boolean.Parse(s.Fields["lightfloorabsolute"].Value.ToString()))
if(s.Fields.GetValue("lightfloorabsolute", false))
floorLight.Text = fl + " (abs.)";
else
floorLight.Text = fl + " (" + Math.Min(255, Math.Max(0, (fl + s.Brightness))) + ")";
@ -112,14 +112,9 @@ namespace CodeImp.DoomBuilder.Controls
floorLightLabel.Enabled = false;
}
//offsets
float panX = 0f;
float panY = 0f;
if(s.Fields.ContainsKey("xpanningceiling"))
panX = (float)s.Fields["xpanningceiling"].Value;
if(s.Fields.ContainsKey("ypanningceiling"))
panY = (float)s.Fields["ypanningceiling"].Value;
//ceiling offsets
float panX = s.Fields.GetValue("xpanningceiling", 0f);
float panY = s.Fields.GetValue("ypanningceiling", 0f);
if(panX != 0 || panY != 0) {
showExtededCeilingInfo = true;
@ -132,13 +127,9 @@ namespace CodeImp.DoomBuilder.Controls
ceilingOffsetLabel.Enabled = false;
}
panX = 0f;
panY = 0f;
if(s.Fields.ContainsKey("xpanningfloor"))
panX = (float)s.Fields["xpanningfloor"].Value;
if(s.Fields.ContainsKey("ypanningfloor"))
panY = (float)s.Fields["ypanningfloor"].Value;
//floor offsets
panX = s.Fields.GetValue("xpanningfloor", 0f);
panY = s.Fields.GetValue("ypanningfloor", 0f);
if(panX != 0 || panY != 0) {
showExtededFloorInfo = true;
@ -151,15 +142,9 @@ namespace CodeImp.DoomBuilder.Controls
floorOffsetLabel.Enabled = false;
}
//scale
float scaleX = 1.0f;
float scaleY = 1.0f;
if(s.Fields.ContainsKey("xscaleceiling"))
scaleX = (float)s.Fields["xscaleceiling"].Value;
if(s.Fields.ContainsKey("yscaleceiling"))
scaleY = (float)s.Fields["yscaleceiling"].Value;
//ceiling scale
float scaleX = s.Fields.GetValue("xscaleceiling", 1.0f);//1.0f;
float scaleY = s.Fields.GetValue("yscaleceiling", 1.0f);
if(scaleX != 1.0f || scaleY != 1.0f) {
showExtededCeilingInfo = true;
@ -172,14 +157,9 @@ namespace CodeImp.DoomBuilder.Controls
ceilingScaleLabel.Enabled = false;
}
scaleX = 1.0f;
scaleY = 1.0f;
if(s.Fields.ContainsKey("xscalefloor"))
scaleX = (float)s.Fields["xscalefloor"].Value;
if(s.Fields.ContainsKey("yscalefloor"))
scaleY = (float)s.Fields["yscalefloor"].Value;
//floor scale
scaleX = s.Fields.GetValue("xscalefloor", 1.0f);
scaleY = s.Fields.GetValue("yscalefloor", 1.0f);
if(scaleX != 1.0f || scaleY != 1.0f) {
showExtededFloorInfo = true;

View file

@ -8,6 +8,7 @@ using SlimDX;
using SlimDX.Direct3D9;
using CodeImp.DoomBuilder.GZBuilder.Data;
using CodeImp.DoomBuilder.Geometry;
namespace CodeImp.DoomBuilder.GZBuilder.GZDoom {
internal sealed class ModeldefStructure {
@ -314,9 +315,9 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom {
ModeldefEntry mde = new ModeldefEntry();
mde.Scale = scale;
mde.zOffset = zOffset;
mde.AngleOffset = angleOffset * (float)Math.PI / 180.0f;
mde.RollOffset = rollOffset * (float)Math.PI / 180.0f;
mde.PitchOffset = pitchOffset * (float)Math.PI / 180.0f;
mde.AngleOffset = Angle2D.DegToRad(angleOffset);// *(float)Math.PI / 180.0f;
mde.RollOffset = Angle2D.DegToRad(rollOffset);// *(float)Math.PI / 180.0f;
mde.PitchOffset = Angle2D.DegToRad(pitchOffset);// *(float)Math.PI / 180.0f;
for(int i = 0; i < modelNames.Length; i++) {
if (!string.IsNullOrEmpty(modelNames[i])) {

View file

@ -38,7 +38,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
public static void Init() {
//bind actions
General.Actions.BindMethods(typeof(GZGeneral));
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
//actions
@ -47,7 +47,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZDrawModels = !General.Settings.GZDrawModels;
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering is " + (General.Settings.GZDrawModels ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglelights")]
@ -55,7 +55,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZDrawLights = !General.Settings.GZDrawLights;
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering is " + (General.Settings.GZDrawLights ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglelightsanimation")]
@ -63,7 +63,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZAnimateLights = !General.Settings.GZAnimateLights;
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights animation is " + (General.Settings.GZAnimateLights ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglefog")]
@ -71,7 +71,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZDrawFog = !General.Settings.GZDrawFog;
General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gzdrawselectedmodelsonly")]
@ -79,7 +79,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZDrawSelectedModelsOnly = !General.Settings.GZDrawSelectedModelsOnly;
General.MainWindow.DisplayStatus(StatusType.Action, "Rendering " + (General.Settings.GZDrawSelectedModelsOnly ? "only selected" : "all") + " models.");
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglefx")]
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED") );
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztoggleeventlines")]
@ -105,7 +105,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglevisualvertices")]
@ -113,7 +113,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPannel();
General.MainWindow.UpdateGZDoomPanel();
}
//main menu actions

View file

@ -36,7 +36,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Geometry {
public float GetAngle() {
// Calculate and return the angle
Vector2D d = GetDelta();
return -(float)Math.Atan2(-d.y, d.x) + (float)Math.PI * 0.5f;
return -(float)Math.Atan2(-d.y, d.x) + Angle2D.PIHALF;//mxd // (float)Math.PI * 0.5f;
}
}
}

View file

@ -14,6 +14,7 @@ using CodeImp.DoomBuilder.GZBuilder.GZDoom;
using SlimDX;
using SlimDX.Direct3D9;
using CodeImp.DoomBuilder.Geometry;
//mxd. Original version taken from here: http://colladadotnet.codeplex.com/SourceControl/changeset/view/40680
namespace CodeImp.DoomBuilder.GZBuilder.MD3
@ -427,7 +428,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
s.Position += 16; //frame name
//rotation angles
float angle = mde.AngleOffset - 0.5f * (float)Math.PI; //subtract 90 degrees to get correct rotation
float angle = mde.AngleOffset - Angle2D.PIHALF;// 0.5f * (float)Math.PI; //subtract 90 degrees to get correct rotation
float angleOfsetCos = (float)Math.Cos(angle);
float angleOfsetSin = (float)Math.Sin(angle);
float pitchOfsetCos = (float)Math.Cos(-mde.PitchOffset);

View file

@ -1021,7 +1021,7 @@ namespace CodeImp.DoomBuilder
mainwindow.UpdateThingsFilters();
mainwindow.UpdateInterface();
//mxd
mainwindow.UpdateGZDoomPannel();
mainwindow.UpdateGZDoomPanel();
mainwindow.HideInfo();
if(errorlogger.IsErrorAdded)
@ -1074,7 +1074,7 @@ namespace CodeImp.DoomBuilder
mainwindow.HideInfo();
mainwindow.UpdateThingsFilters();
//mxd
mainwindow.UpdateGZDoomPannel();
mainwindow.UpdateGZDoomPanel();
mainwindow.UpdateInterface();
mainwindow.DisplayReady();
General.WriteLogLine("Map unload done");
@ -1113,7 +1113,7 @@ namespace CodeImp.DoomBuilder
OpenMapFile(openfile.FileName, null);
//mxd
mainwindow.UpdateGZDoomPannel();
mainwindow.UpdateGZDoomPanel();
General.Settings.GZForceDefaultTextures = false;
}
@ -1170,7 +1170,7 @@ namespace CodeImp.DoomBuilder
mainwindow.AddRecentFile(filename);
//mxd
mainwindow.UpdateGZDoomPannel();
mainwindow.UpdateGZDoomPanel();
}
else
{

View file

@ -120,14 +120,14 @@ namespace CodeImp.DoomBuilder.Geometry
float theta = (float)Math.Atan2(ry, rx); // angle of the new vector
float controlDist = Math.Min(a, b) * z; // Distance of curve control points from current point: a fraction the length of the shorter adjacent triangle side
float controlScaleFactor = C / (float)Math.PI; // Scale the distance based on the acuteness of the angle. Prevents big loops around long, sharp-angled triangles.
float controlScaleFactor = C / Angle2D.PI; // Scale the distance based on the acuteness of the angle. Prevents big loops around long, sharp-angled triangles.
controlDist *= ((1 - angleFactor) + angleFactor * controlScaleFactor); // Mess with this for some fine-tuning
float controlAngle = theta + (float)Math.PI / 2; // The angle from the current point to control points: the new vector angle plus 90 degrees (tangent to the curve).
float controlAngle = theta + Angle2D.PIHALF; // The angle from the current point to control points: the new vector angle plus 90 degrees (tangent to the curve).
Vector2D controlPoint2 = new Vector2D(controlDist, 0);
Vector2D controlPoint1 = new Vector2D(controlDist, 0);
controlPoint2 = controlPoint2.GetRotated(controlAngle);
controlPoint1 = controlPoint1.GetRotated(controlAngle + (float)Math.PI);
controlPoint1 = controlPoint1.GetRotated(controlAngle + Angle2D.PI);
// Offset control points to put them in the correct absolute position
controlPoint1 += p1;

View file

@ -207,7 +207,7 @@ namespace CodeImp.DoomBuilder.Geometry
{
// Calculate and return the angle
Vector2D d = GetDelta();
return -(float)Math.Atan2(-d.y, d.x) + (float)Math.PI * 0.5f;
return -(float)Math.Atan2(-d.y, d.x) + Angle2D.PIHALF;//mxd // (float)Math.PI * 0.5f;
}
public Vector2D GetDelta() { return v2 - v1; }

View file

@ -1545,7 +1545,7 @@ namespace CodeImp.DoomBuilder.Geometry
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_mid", new UniValue(UniversalType.Float, offset));
l.Back.Fields.Add("offsetx_mid", new UniValue(UniversalType.Float, offset));
}
if(!l.Back.Fields.ContainsKey("offsetx_top") && l.Back.HighRequired() && l.Back.HighTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.HighTexture)) {
@ -1553,7 +1553,7 @@ namespace CodeImp.DoomBuilder.Geometry
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_top", new UniValue(UniversalType.Float, offset));
l.Back.Fields.Add("offsetx_top", new UniValue(UniversalType.Float, offset));
}
if(!l.Back.Fields.ContainsKey("offsetx_bottom") && l.Back.LowRequired() && l.Back.LowTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.LowTexture)) {
@ -1561,7 +1561,7 @@ namespace CodeImp.DoomBuilder.Geometry
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_bottom", new UniValue(UniversalType.Float, offset));
l.Back.Fields.Add("offsetx_bottom", new UniValue(UniversalType.Float, offset));
}
}

View file

@ -218,7 +218,7 @@ namespace CodeImp.DoomBuilder.Geometry
public static float GetAngle(Vector2D a, Vector2D b)
{
// Calculate and return the angle
return -(float)Math.Atan2(-(a.y - b.y), (a.x - b.x)) + (float)Math.PI * 0.5f;
return -(float)Math.Atan2(-(a.y - b.y), (a.x - b.x)) + Angle2D.PIHALF;//mxd //(float)Math.PI * 0.5f;
}
// This returns the square distance between two points
@ -262,7 +262,7 @@ namespace CodeImp.DoomBuilder.Geometry
public float GetAngle()
{
// Calculate and return the angle
return -(float)Math.Atan2(-y, x) + (float)Math.PI * 0.5f;
return -(float)Math.Atan2(-y, x) + Angle2D.PIHALF; //mxd // (float)Math.PI * 0.5f;
}
// This calculates the length

View file

@ -238,7 +238,7 @@ namespace CodeImp.DoomBuilder.Geometry
public float GetAngleXY()
{
// Calculate and return the angle
return -(float)Math.Atan2(-y, x) + (float)Math.PI * 0.5f;
return -(float)Math.Atan2(-y, x) + Angle2D.PIHALF;//mxd // (float)Math.PI * 0.5f;
}
// This calculates the angle
@ -247,7 +247,7 @@ namespace CodeImp.DoomBuilder.Geometry
Vector2D xy = new Vector2D(x, y);
// Calculate and return the angle
return (float)Math.Atan2(xy.GetLength(), z) + (float)Math.PI * 0.5f;
return (float)Math.Atan2(xy.GetLength(), z) + Angle2D.PIHALF;//mxd // (float)Math.PI * 0.5f;
}
// This calculates the length

View file

@ -23,6 +23,7 @@ using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Geometry;
#endregion
@ -113,7 +114,7 @@ namespace CodeImp.DoomBuilder.Rendering
level = General.Clamp(level - hAmmount - vAmmount, 0, 255);
} else { //only horizontal/verticel walls are shaded
int angle = (int)(sd.Angle * 180.0f / Math.PI);
int angle = (int)Angle2D.RadToDeg(sd.Angle);// * 180.0f / Math.PI);
//horizontal wall
if (angle == 270 || angle == 90) {
level = General.Clamp(level + General.Map.Data.MapInfo.HorizWallShade, 0, 255);

View file

@ -315,7 +315,7 @@ namespace CodeImp.DoomBuilder.VisualModes
//everything should be valid, let's move player start here
start.Move(new Vector3D(camPos.x, camPos.y, pz));
start.Rotate(General.Map.VisualCamera.AngleXY - (float)Math.PI);
start.Rotate(General.Map.VisualCamera.AngleXY - Angle2D.PI);// (float)Math.PI);
}
return true;
}

View file

@ -153,6 +153,17 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorhelpmanual = new System.Windows.Forms.ToolStripSeparator();
this.itemhelpabout = new System.Windows.Forms.ToolStripMenuItem();
this.toolbar = new System.Windows.Forms.ToolStrip();
this.toolbarContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toggleFile = new System.Windows.Forms.ToolStripMenuItem();
this.toggleScript = new System.Windows.Forms.ToolStripMenuItem();
this.toggleUndo = new System.Windows.Forms.ToolStripMenuItem();
this.toggleCopy = new System.Windows.Forms.ToolStripMenuItem();
this.togglePrefabs = new System.Windows.Forms.ToolStripMenuItem();
this.toggleFilter = new System.Windows.Forms.ToolStripMenuItem();
this.toggleViewModes = new System.Windows.Forms.ToolStripMenuItem();
this.toggleGeometry = new System.Windows.Forms.ToolStripMenuItem();
this.toggleTesting = new System.Windows.Forms.ToolStripMenuItem();
this.toggleRendering = new System.Windows.Forms.ToolStripMenuItem();
this.buttonnewmap = new System.Windows.Forms.ToolStripButton();
this.buttonopenmap = new System.Windows.Forms.ToolStripButton();
this.buttonsavemap = new System.Windows.Forms.ToolStripButton();
@ -173,7 +184,7 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviews = new System.Windows.Forms.ToolStripSeparator();
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
this.separatorgzmodes = new System.Windows.Forms.ToolStripSeparator();
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
this.buttontoggledynlight = new System.Windows.Forms.ToolStripButton();
this.buttontoggleanimatedlight = new System.Windows.Forms.ToolStripButton();
@ -182,7 +193,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglefog = new System.Windows.Forms.ToolStripButton();
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
this.buttontogglevisualvertices = new System.Windows.Forms.ToolStripButton();
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
this.separatorgzmodes = new System.Windows.Forms.ToolStripSeparator();
this.buttontest = new System.Windows.Forms.ToolStripSplitButton();
this.seperatortesting = new System.Windows.Forms.ToolStripSeparator();
this.statusbar = new System.Windows.Forms.StatusStrip();
@ -229,17 +240,6 @@ namespace CodeImp.DoomBuilder.Windows
this.dockersspace = new System.Windows.Forms.Panel();
this.dockerspanel = new CodeImp.DoomBuilder.Controls.DockersControl();
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
this.toolbarContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toggleFile = new System.Windows.Forms.ToolStripMenuItem();
this.toggleScript = new System.Windows.Forms.ToolStripMenuItem();
this.toggleUndo = new System.Windows.Forms.ToolStripMenuItem();
this.toggleCopy = new System.Windows.Forms.ToolStripMenuItem();
this.togglePrefabs = new System.Windows.Forms.ToolStripMenuItem();
this.toggleFilter = new System.Windows.Forms.ToolStripMenuItem();
this.toggleViewModes = new System.Windows.Forms.ToolStripMenuItem();
this.toggleGeometry = new System.Windows.Forms.ToolStripMenuItem();
this.toggleTesting = new System.Windows.Forms.ToolStripMenuItem();
this.toggleRendering = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
@ -248,9 +248,9 @@ namespace CodeImp.DoomBuilder.Windows
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menumain.SuspendLayout();
this.toolbar.SuspendLayout();
this.toolbarContextMenu.SuspendLayout();
this.statusbar.SuspendLayout();
this.panelinfo.SuspendLayout();
this.toolbarContextMenu.SuspendLayout();
this.SuspendLayout();
//
// toolStripSeparator1
@ -1323,7 +1323,7 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviews,
this.buttonsnaptogrid,
this.buttonautomerge,
this.separatorgzmodes,
this.seperatorgeometry,
this.buttontogglefx,
this.buttontoggledynlight,
this.buttontoggleanimatedlight,
@ -1332,7 +1332,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglefog,
this.buttontoggleeventlines,
this.buttontogglevisualvertices,
this.seperatorgeometry,
this.separatorgzmodes,
this.buttontest,
this.seperatortesting});
this.toolbar.Location = new System.Drawing.Point(0, 24);
@ -1340,6 +1340,94 @@ namespace CodeImp.DoomBuilder.Windows
this.toolbar.Size = new System.Drawing.Size(1012, 25);
this.toolbar.TabIndex = 1;
//
// toolbarContextMenu
//
this.toolbarContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toggleFile,
this.toggleScript,
this.toggleUndo,
this.toggleCopy,
this.togglePrefabs,
this.toggleFilter,
this.toggleViewModes,
this.toggleGeometry,
this.toggleTesting,
this.toggleRendering});
this.toolbarContextMenu.Name = "toolbarContextMenu";
this.toolbarContextMenu.Size = new System.Drawing.Size(174, 224);
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
this.toolbarContextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.toolbarContextMenu_Closing);
//
// toggleFile
//
this.toggleFile.Name = "toggleFile";
this.toggleFile.Size = new System.Drawing.Size(173, 22);
this.toggleFile.Text = "New / Open / Save";
this.toggleFile.Click += new System.EventHandler(this.toggleFile_Click);
//
// toggleScript
//
this.toggleScript.Name = "toggleScript";
this.toggleScript.Size = new System.Drawing.Size(173, 22);
this.toggleScript.Text = "Script Editor";
this.toggleScript.Click += new System.EventHandler(this.toggleScript_Click);
//
// toggleUndo
//
this.toggleUndo.Name = "toggleUndo";
this.toggleUndo.Size = new System.Drawing.Size(173, 22);
this.toggleUndo.Text = "Undo / Redo";
this.toggleUndo.Click += new System.EventHandler(this.toggleUndo_Click);
//
// toggleCopy
//
this.toggleCopy.Name = "toggleCopy";
this.toggleCopy.Size = new System.Drawing.Size(173, 22);
this.toggleCopy.Text = "Cut / Copy / Paste";
this.toggleCopy.Click += new System.EventHandler(this.toggleCopy_Click);
//
// togglePrefabs
//
this.togglePrefabs.Name = "togglePrefabs";
this.togglePrefabs.Size = new System.Drawing.Size(173, 22);
this.togglePrefabs.Text = "Prefabs";
this.togglePrefabs.Click += new System.EventHandler(this.togglePrefabs_Click);
//
// toggleFilter
//
this.toggleFilter.Name = "toggleFilter";
this.toggleFilter.Size = new System.Drawing.Size(173, 22);
this.toggleFilter.Text = "Things Filter";
this.toggleFilter.Click += new System.EventHandler(this.toggleFilter_Click);
//
// toggleViewModes
//
this.toggleViewModes.Name = "toggleViewModes";
this.toggleViewModes.Size = new System.Drawing.Size(173, 22);
this.toggleViewModes.Text = "View Modes";
this.toggleViewModes.Click += new System.EventHandler(this.toggleViewModes_Click);
//
// toggleGeometry
//
this.toggleGeometry.Name = "toggleGeometry";
this.toggleGeometry.Size = new System.Drawing.Size(173, 22);
this.toggleGeometry.Text = "Snap / Merge";
this.toggleGeometry.Click += new System.EventHandler(this.toggleGeometry_Click);
//
// toggleTesting
//
this.toggleTesting.Name = "toggleTesting";
this.toggleTesting.Size = new System.Drawing.Size(173, 22);
this.toggleTesting.Text = "Testing";
this.toggleTesting.Click += new System.EventHandler(this.toggleTesting_Click);
//
// toggleRendering
//
this.toggleRendering.Name = "toggleRendering";
this.toggleRendering.Size = new System.Drawing.Size(173, 22);
this.toggleRendering.Text = "Rendering";
this.toggleRendering.Click += new System.EventHandler(this.toggleRendering_Click);
//
// buttonnewmap
//
this.buttonnewmap.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -1571,10 +1659,10 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonautomerge.Text = "Merge Geometry";
this.buttonautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorgzmodes
// seperatorgeometry
//
this.separatorgzmodes.Name = "separatorgzmodes";
this.separatorgzmodes.Size = new System.Drawing.Size(6, 25);
this.seperatorgeometry.Name = "seperatorgeometry";
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
//
// buttontogglefx
//
@ -1677,11 +1765,11 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglevisualvertices.Text = "Show Editable Vertices in Visual Mode";
this.buttontogglevisualvertices.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorgeometry
// separatorgzmodes
//
this.seperatorgeometry.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorgeometry.Name = "seperatorgeometry";
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
this.separatorgzmodes.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorgzmodes.Name = "separatorgzmodes";
this.separatorgzmodes.Size = new System.Drawing.Size(6, 25);
//
// buttontest
//
@ -2151,94 +2239,6 @@ namespace CodeImp.DoomBuilder.Windows
this.dockerscollapser.Interval = 200;
this.dockerscollapser.Tick += new System.EventHandler(this.dockerscollapser_Tick);
//
// toolbarContextMenu
//
this.toolbarContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toggleFile,
this.toggleScript,
this.toggleUndo,
this.toggleCopy,
this.togglePrefabs,
this.toggleFilter,
this.toggleViewModes,
this.toggleGeometry,
this.toggleTesting,
this.toggleRendering});
this.toolbarContextMenu.Name = "toolbarContextMenu";
this.toolbarContextMenu.Size = new System.Drawing.Size(174, 246);
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
this.toolbarContextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.toolbarContextMenu_Closing);
//
// toggleNew
//
this.toggleFile.Name = "toggleNew";
this.toggleFile.Size = new System.Drawing.Size(173, 22);
this.toggleFile.Text = "New / Open / Save";
this.toggleFile.Click += new System.EventHandler(this.toggleFile_Click);
//
// toggleScript
//
this.toggleScript.Name = "toggleScript";
this.toggleScript.Size = new System.Drawing.Size(173, 22);
this.toggleScript.Text = "Script Editor";
this.toggleScript.Click += new System.EventHandler(this.toggleScript_Click);
//
// toggleUndo
//
this.toggleUndo.Name = "toggleUndo";
this.toggleUndo.Size = new System.Drawing.Size(173, 22);
this.toggleUndo.Text = "Undo / Redo";
this.toggleUndo.Click += new System.EventHandler(this.toggleUndo_Click);
//
// togglePaste
//
this.toggleCopy.Name = "togglePaste";
this.toggleCopy.Size = new System.Drawing.Size(173, 22);
this.toggleCopy.Text = "Cut / Copy / Paste";
this.toggleCopy.Click += new System.EventHandler(this.toggleCopy_Click);
//
// togglePrefabs
//
this.togglePrefabs.Name = "togglePrefabs";
this.togglePrefabs.Size = new System.Drawing.Size(173, 22);
this.togglePrefabs.Text = "Prefabs";
this.togglePrefabs.Click += new System.EventHandler(this.togglePrefabs_Click);
//
// toggleFilters
//
this.toggleFilter.Name = "toggleFilters";
this.toggleFilter.Size = new System.Drawing.Size(173, 22);
this.toggleFilter.Text = "Things Filter";
this.toggleFilter.Click += new System.EventHandler(this.toggleFilter_Click);
//
// toggleViewModes
//
this.toggleViewModes.Name = "toggleViewModes";
this.toggleViewModes.Size = new System.Drawing.Size(173, 22);
this.toggleViewModes.Text = "View Modes";
this.toggleViewModes.Click += new System.EventHandler(this.toggleViewModes_Click);
//
// toggleSnap
//
this.toggleGeometry.Name = "toggleSnap";
this.toggleGeometry.Size = new System.Drawing.Size(173, 22);
this.toggleGeometry.Text = "Snap / Merge";
this.toggleGeometry.Click += new System.EventHandler(this.toggleGeometry_Click);
//
// toggleTesting
//
this.toggleTesting.Name = "toggleTesting";
this.toggleTesting.Size = new System.Drawing.Size(173, 22);
this.toggleTesting.Text = "Testing";
this.toggleTesting.Click += new System.EventHandler(this.toggleTesting_Click);
//
// toggleRendering
//
this.toggleRendering.Name = "toggleRendering";
this.toggleRendering.Size = new System.Drawing.Size(173, 22);
this.toggleRendering.Text = "Rendering";
this.toggleRendering.Click += new System.EventHandler(this.toggleRendering_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -2272,11 +2272,11 @@ namespace CodeImp.DoomBuilder.Windows
this.menumain.PerformLayout();
this.toolbar.ResumeLayout(false);
this.toolbar.PerformLayout();
this.toolbarContextMenu.ResumeLayout(false);
this.statusbar.ResumeLayout(false);
this.statusbar.PerformLayout();
this.panelinfo.ResumeLayout(false);
this.panelinfo.PerformLayout();
this.toolbarContextMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -2352,7 +2352,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripMenuItem itemautomerge;
private System.Windows.Forms.ToolStripSeparator seperatormodes;
private System.Windows.Forms.Timer processor;
private System.Windows.Forms.ToolStripSeparator seperatorgeometry;
private System.Windows.Forms.ToolStripSeparator separatorgzmodes;
private System.Windows.Forms.ToolStripSeparator seperatorfilesave;
private System.Windows.Forms.ToolStripSeparator seperatortesting;
private System.Windows.Forms.ToolStripSeparator seperatoreditgeometry;
@ -2426,7 +2426,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripSeparator seperatorfilerecent;
private System.Windows.Forms.ToolStripSeparator seperatoreditgrid;
private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste;
private System.Windows.Forms.ToolStripSeparator separatorgzmodes;
private System.Windows.Forms.ToolStripSeparator seperatorgeometry;
private System.Windows.Forms.ToolStripButton buttontoggledynlight;
private System.Windows.Forms.ToolStripButton buttontogglemodels;
private System.Windows.Forms.ToolStripButton buttonselectedmodelsonly;

View file

@ -1818,7 +1818,7 @@ namespace CodeImp.DoomBuilder.Windows
}
//mxd
public void UpdateGZDoomPannel() {
public void UpdateGZDoomPanel() {
if (General.Map != null) {
buttontogglemodels.Enabled = true;
buttonselectedmodelsonly.Enabled = true;

View file

@ -201,30 +201,6 @@
<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">
<value>True</value>
</metadata>
<metadata name="vertexinfo.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="buttontoggleinfo.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="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="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>433, 17</value>
</metadata>

View file

@ -403,6 +403,9 @@
<ItemGroup>
<None Include="Resources\ThingPointAtCursor.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\TextureLock.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.

View file

@ -134,7 +134,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
if (form.MirrorMode) {
Vector2D pos = handle.RelativePosition;
//handle angle
float angle = (float)Math.Atan2(-pos.y, -pos.x) + (float)Math.PI / 2f;
float angle = (float)Math.Atan2(-pos.y, -pos.x) + Angle2D.PIHALF;// (float)Math.PI / 2f;
//angle of line, connecting handles ControlledPoints
float dirAngle = -(float)Math.Atan2(handle.Pair.ControlledPoint.y - handle.ControlledPoint.y, handle.Pair.ControlledPoint.x - handle.ControlledPoint.x);
float length = (float)Math.Sqrt(Math.Pow(Math.Abs(pos.x), 2.0) + Math.Pow(Math.Abs(pos.y), 2.0));
@ -486,7 +486,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
p0 = pointGroup[i - 1];
p1 = pointGroup[i];
curAngle = (float)Math.Atan2(p0.y - p1.y, p0.x - p1.x);
diff = (angle + (float)Math.PI) - (curAngle + (float)Math.PI);
diff = (angle + Angle2D.PI) - (curAngle + Angle2D.PI);
segLen = (int)(Vector2D.Distance(p0, p1) * Math.Cos(diff));
relLenGroup[i] = relLenGroup[i - 1] + segLen / length;
}
@ -501,10 +501,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
float angle = -(float)Math.Atan2(start.y - end.y, start.x - end.x);
float dirAngle = -(float)Math.Atan2(direction.y - start.y, direction.x - start.x);
float length = (float)Math.Sqrt(Math.Pow(Math.Abs(start.x - end.x), 2.0) + Math.Pow(Math.Abs(start.y - end.y), 2.0)) * 0.3f;
float diff = (angle + (float)Math.PI) - (dirAngle + (float)Math.PI);
float diff = (angle + Angle2D.PI) - (dirAngle + Angle2D.PI);
if (diff > Math.PI || (diff < 0 && diff > -Math.PI))
angle += (float)Math.PI;
if(diff > Angle2D.PI || (diff < 0 && diff > -Angle2D.PI))
angle += Angle2D.PI;
return new Vector2D((float)(Math.Sin(angle) * length), (float)(Math.Cos(angle) * length));
}
@ -633,7 +633,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
private int easeInSine(int val1, int val2, float delta) {
float f_val1 = (float)val1;
float f_val2 = (float)val2 - f_val1;
return (int)(-f_val2 * Math.Cos(delta * (Math.PI / 2.0f)) + f_val2 + f_val1);
return (int)(-f_val2 * Math.Cos(delta * Angle2D.PIHALF) + f_val2 + f_val1);
}
/**
@ -642,7 +642,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
private int easeOutSine(int val1, int val2, float delta) {
float f_val1 = (float)val1;
float f_val2 = (float)val2;
return (int)((f_val2 - f_val1) * Math.Sin(delta * ((float)Math.PI / 2.0f)) + f_val1);
return (int)((f_val2 - f_val1) * Math.Sin(delta * Angle2D.PIHALF) + f_val1);
}
/**
@ -651,7 +651,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
private int easeInOutSine(int val1, int val2, float delta) {
float f_val1 = (float)val1;
float f_val2 = (float)val2;
return (int)(-f_val2 / 2.0f * (Math.Cos(Math.PI * delta) - 1.0f) + f_val1);
return (int)(-f_val2 / 2.0f * (Math.Cos(Angle2D.PI * delta) - 1.0f) + f_val1);
}
private int intepolateValue(int val1, int val2, float delta, string mode) {

View file

@ -133,7 +133,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//the curve starts at PI/2 - theta/2 and is segmented into vertices+1 segments
//this assumes the line is horisontal and on y = 0, the point is rotated and moved later
a = ((float)Math.PI - theta) / 2 + v * (theta / (vertices + 1));
a = (Angle2D.PI - theta) / 2 + v * (theta / (vertices + 1));
//calculate the coordinates of the point, and distort the y coordinate
//using the deform factor calculated above

View file

@ -19,19 +19,12 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
using System.Drawing;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Types;
#endregion
@ -61,6 +54,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// List of non-selected items
protected ICollection<Vertex> unselectedverts;
//mxd. List of sectors
private List<Sector> selectedSectors;
// List of unstable lines
protected ICollection<Linedef> unstablelines;
protected List<float> unstableLinesInitialLengths; //mxd
@ -158,6 +154,34 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach (Linedef l in unstablelines)
unstableLinesInitialLengths.Add(l.Length);
//mxd. Collect selected sectors
if(General.Map.UDMF) {
ICollection<Linedef> selectedLines = General.Map.Map.LinedefsFromMarkedVertices(false, true, false);
List<Sector> affectedSectors = new List<Sector>();
foreach(Linedef l in selectedLines) {
if(l.Front != null && l.Front.Sector != null && !affectedSectors.Contains(l.Front.Sector))
affectedSectors.Add(l.Front.Sector);
if(l.Back != null && l.Back.Sector != null && !affectedSectors.Contains(l.Back.Sector))
affectedSectors.Add(l.Back.Sector);
}
selectedSectors = new List<Sector>();
foreach(Sector s in affectedSectors) {
bool selected = true;
foreach(Sidedef side in s.Sidedefs) {
if(!selectedLines.Contains(side.Line)) {
selected = false;
break;
}
}
if(selected)
selectedSectors.Add(s);
}
}
// Make text labels
labels = new LineLengthLabel[unstablelines.Count];
int index = 0;
@ -394,12 +418,79 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();
//mxd. Update floor/ceiling texture offsets
if(General.Map.UDMF && BuilderPlug.Me.LockSectorTextureOffsetsWhileDragging && selectedSectors.Count > 0) {
Vector2D offset = dragitemposition - dragitem.Position;
foreach(Sector s in selectedSectors) {
s.Fields.BeforeFieldsChange();
//update ceiling offset
if(s.CeilTexture.Length > 1) {
ImageData texture = General.Map.Data.GetFlatImage(s.CeilTexture);
if(texture != null) {
float scaleX = s.Fields.GetValue("xscaleceiling", 1.0f);
float scaleY = s.Fields.GetValue("yscaleceiling", 1.0f);
if(scaleX != 0 && scaleY != 0) {
Vector2D ceilOffset = new Vector2D(offset.x, -offset.y).GetRotated(-Angle2D.DegToRad((int)s.Fields.GetValue("rotationceiling", 0f)));
ceilOffset.x += s.Fields.GetValue("xpanningceiling", 0f);
ceilOffset.y += s.Fields.GetValue("ypanningceiling", 0f);
int textureWidth = (int)Math.Round(texture.Width / scaleX);
int textureHeight = (int)Math.Round(texture.Height / scaleY);
if(!s.Fields.ContainsKey("xpanningceiling"))
s.Fields.Add("xpanningceiling", new UniValue(UniversalType.Float, (float)Math.Round(ceilOffset.x % textureWidth)));
else
s.Fields["xpanningceiling"].Value = (float)Math.Round(ceilOffset.x % textureWidth);
if(!s.Fields.ContainsKey("ypanningceiling"))
s.Fields.Add("ypanningceiling", new UniValue(UniversalType.Float, (float)Math.Round(ceilOffset.y % textureHeight)));
else
s.Fields["ypanningceiling"].Value = (float)Math.Round(ceilOffset.y % textureHeight);
}
}
}
//update floor offset
if(s.FloorTexture.Length > 1) {
ImageData texture = General.Map.Data.GetFlatImage(s.FloorTexture);
if(texture != null) {
float scaleX = s.Fields.GetValue("xscalefloor", 1.0f);
float scaleY = s.Fields.GetValue("yscalefloor", 1.0f);
if(scaleX != 0 && scaleY != 0) {
Vector2D floorOffset = new Vector2D(offset.x, -offset.y).GetRotated(-Angle2D.DegToRad((int)s.Fields.GetValue("rotationfloor", 0f)));
floorOffset.x += s.Fields.GetValue("xpanningfloor", 0f);
floorOffset.y += s.Fields.GetValue("ypanningfloor", 0f);
int textureWidth = (int)Math.Round(texture.Width / scaleX);
int textureHeight = (int)Math.Round(texture.Height / scaleY);
if(!s.Fields.ContainsKey("xpanningfloor"))
s.Fields.Add("xpanningfloor", new UniValue(UniversalType.Float, (float)Math.Round(floorOffset.x % textureWidth)));
else
s.Fields["xpanningfloor"].Value = (float)Math.Round(floorOffset.x % textureWidth);
if(!s.Fields.ContainsKey("ypanningfloor"))
s.Fields.Add("ypanningfloor", new UniValue(UniversalType.Float, (float)Math.Round(floorOffset.y % textureHeight)));
else
s.Fields["ypanningfloor"].Value = (float)Math.Round(floorOffset.y % textureHeight);
}
}
}
}
}
// Update cached values
General.Map.Map.Update();
//mxd
if (BuilderPlug.Me.AutoAlignTextureOffsetsOnDrag)
if(BuilderPlug.Me.AutoAlignTextureOffsetsOnDrag)
updateTextureOffsetX();
// Done

View file

@ -58,7 +58,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes {
Vector2D center = new Vector2D(pStart.x + hw, pStart.y + hh);
float curAngle = 0;
float angleStep = -(float)Math.PI / subdivisions * 2;
float angleStep = -Angle2D.PI / subdivisions * 2;
int px, py;
for (int i = 0; i < subdivisions; i++) {

View file

@ -167,11 +167,11 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
private Vector2D[] getCornerPoints(Vector2D startPoint, int bevel_width, int bevel_height, bool reverse) {
Vector2D[] points;
Vector2D center = (bevelWidth > 0 ? new Vector2D(startPoint.x + bevel_width, startPoint.y + bevel_height) : startPoint);
float curAngle = (float)Math.PI;
float curAngle = Angle2D.PI;
int steps = subdivisions + 2;
points = new Vector2D[steps];
float stepAngle = (float)Math.PI / 2.0f / (subdivisions + 1);
float stepAngle = Angle2D.PIHALF / (subdivisions + 1);
for (int i = 0; i < steps; i++) {
points[i] = new Vector2D(center.x + (float)Math.Sin(curAngle) * bevel_width, center.y + (float)Math.Cos(curAngle) * bevel_height);

View file

@ -212,6 +212,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);//mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CurveLinedefs);
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
// Convert geometry selection to linedefs selection
General.Map.Map.ConvertSelection(SelectionType.Linedefs);
@ -229,6 +230,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);//mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CurveLinedefs);
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)

View file

@ -418,6 +418,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientCeilings);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
// Convert geometry selection to sectors only
General.Map.Map.ConvertSelection(SelectionType.Sectors);
@ -446,6 +447,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientCeilings);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
// Keep only sectors selected
General.Map.Map.ClearSelectedLinedefs();

View file

@ -899,7 +899,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
if(info == null || info.Category == null || info.Category.Arrow == 0)
continue;
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position) + (float)Math.PI);
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
}
} else { //point at
foreach(Thing t in selected) {

View file

@ -95,6 +95,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
// Convert geometry selection to vertices only
General.Map.Map.ConvertSelection(SelectionType.Vertices);
@ -108,6 +109,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)

View file

@ -119,7 +119,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
private bool syncSelection; //mxd. Sync selection between Visual and Classic modes.
private bool objExportTextures; //mxd
private bool objGZDoomScale; //mxd
private float objScale;
private float objScale; //mxd
private bool lockSectorTextureOffsetsWhileDragging; //mxd
#endregion
@ -181,6 +182,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public bool ObjExportTextures { get { return objExportTextures; } internal set { objExportTextures = value; } } //mxd
public bool ObjGZDoomScale { get { return objGZDoomScale; } internal set { objGZDoomScale = value; } } //mxd
public float ObjScale { get { return objScale; } internal set { objScale = value; } } //mxd
public bool LockSectorTextureOffsetsWhileDragging { get { return lockSectorTextureOffsetsWhileDragging; } internal set { lockSectorTextureOffsetsWhileDragging = value; } } //mxd
#endregion
@ -201,6 +203,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Load menus form and register it
menusform = new MenusForm();
menusform.Register();
menusform.TextureOffsetLock.Checked = lockSectorTextureOffsetsWhileDragging; //mxd
// Load curve linedefs form
curvelinedefsform = new CurveLinedefsForm();
@ -329,6 +332,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
objExportTextures = General.Settings.ReadPluginSetting("objexporttextures", false); //mxd
objGZDoomScale = General.Settings.ReadPluginSetting("objgzdoomscale", false); //mxd
objScale = General.Settings.ReadPluginSetting("objscale", 1.0f); //mxd
lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false); //mxd
}
#endregion
@ -480,6 +484,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
drawCurveModeMenuItem.Enabled = false;
drawRectModeMenuItem.Enabled = false;
drawEllipseModeMenuItem.Enabled = false;
General.Settings.WritePluginSetting("locktextureoffsets", lockSectorTextureOffsetsWhileDragging);
}
// Redo performed

View file

@ -111,7 +111,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd
if(showAngle) {
int angle = (int)Math.Round(delta.GetAngle() * 180 / Math.PI);
int angle = (int)Math.Round(Angle2D.RadToDeg(delta.GetAngle()));// * 180 / Math.PI);
label.Text = "l:" + length.ToString(VALUE_FORMAT) + "; a:" + angle;
} else {
label.Text = length.ToString(VALUE_FORMAT);

View file

@ -61,9 +61,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.absrot = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.orgCenterY = new System.Windows.Forms.Button();
this.orgCenterX = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.relCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.relCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.absCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.absCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.label22 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
@ -82,19 +96,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox1.Controls.Add(this.absposx);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Location = new System.Drawing.Point(3, 130);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 219);
this.groupBox1.Size = new System.Drawing.Size(243, 117);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = " Position ";
this.groupBox1.Text = "Position:";
//
// orgposy
//
this.orgposy.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgposy.Location = new System.Drawing.Point(109, 54);
this.orgposy.Location = new System.Drawing.Point(136, 23);
this.orgposy.Name = "orgposy";
this.orgposy.Size = new System.Drawing.Size(79, 24);
this.orgposy.Size = new System.Drawing.Size(72, 24);
this.orgposy.TabIndex = 29;
this.orgposy.Text = "-2000";
this.orgposy.UseVisualStyleBackColor = true;
@ -103,9 +117,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// orgposx
//
this.orgposx.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgposx.Location = new System.Drawing.Point(21, 54);
this.orgposx.Location = new System.Drawing.Point(58, 23);
this.orgposx.Name = "orgposx";
this.orgposx.Size = new System.Drawing.Size(79, 24);
this.orgposx.Size = new System.Drawing.Size(72, 24);
this.orgposx.TabIndex = 28;
this.orgposx.Text = "-2000";
this.orgposx.UseVisualStyleBackColor = true;
@ -114,7 +128,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(197, 59);
this.label16.Location = new System.Drawing.Point(214, 28);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(21, 14);
this.label16.TabIndex = 26;
@ -123,7 +137,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(18, 37);
this.label19.Location = new System.Drawing.Point(9, 28);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(46, 14);
this.label19.TabIndex = 23;
@ -132,7 +146,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(197, 174);
this.label6.Location = new System.Drawing.Point(214, 88);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(21, 14);
this.label6.TabIndex = 13;
@ -141,7 +155,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(197, 118);
this.label5.Location = new System.Drawing.Point(214, 58);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(21, 14);
this.label5.TabIndex = 12;
@ -153,9 +167,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relposy.AllowNegative = true;
this.relposy.AllowRelative = true;
this.relposy.ButtonStep = 1;
this.relposy.Location = new System.Drawing.Point(109, 169);
this.relposy.Location = new System.Drawing.Point(136, 83);
this.relposy.Name = "relposy";
this.relposy.Size = new System.Drawing.Size(82, 24);
this.relposy.Size = new System.Drawing.Size(72, 24);
this.relposy.StepValues = null;
this.relposy.TabIndex = 11;
this.relposy.WhenEnterPressed += new System.EventHandler(this.relposy_Validated);
@ -169,9 +183,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relposx.AllowNegative = true;
this.relposx.AllowRelative = true;
this.relposx.ButtonStep = 1;
this.relposx.Location = new System.Drawing.Point(21, 169);
this.relposx.Location = new System.Drawing.Point(58, 83);
this.relposx.Name = "relposx";
this.relposx.Size = new System.Drawing.Size(82, 24);
this.relposx.Size = new System.Drawing.Size(72, 24);
this.relposx.StepValues = null;
this.relposx.TabIndex = 10;
this.relposx.WhenEnterPressed += new System.EventHandler(this.relposx_Validated);
@ -185,9 +199,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absposy.AllowNegative = true;
this.absposy.AllowRelative = true;
this.absposy.ButtonStep = 1;
this.absposy.Location = new System.Drawing.Point(109, 113);
this.absposy.Location = new System.Drawing.Point(136, 53);
this.absposy.Name = "absposy";
this.absposy.Size = new System.Drawing.Size(82, 24);
this.absposy.Size = new System.Drawing.Size(72, 24);
this.absposy.StepValues = null;
this.absposy.TabIndex = 9;
this.absposy.WhenEnterPressed += new System.EventHandler(this.absposy_Validated);
@ -201,9 +215,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absposx.AllowNegative = true;
this.absposx.AllowRelative = true;
this.absposx.ButtonStep = 1;
this.absposx.Location = new System.Drawing.Point(21, 113);
this.absposx.Location = new System.Drawing.Point(58, 53);
this.absposx.Name = "absposx";
this.absposx.Size = new System.Drawing.Size(82, 24);
this.absposx.Size = new System.Drawing.Size(72, 24);
this.absposx.StepValues = null;
this.absposx.TabIndex = 8;
this.absposx.WhenEnterPressed += new System.EventHandler(this.absposx_Validated);
@ -214,7 +228,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 152);
this.label2.Location = new System.Drawing.Point(7, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 14);
this.label2.TabIndex = 1;
@ -223,7 +237,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 96);
this.label1.Location = new System.Drawing.Point(6, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 14);
this.label1.TabIndex = 0;
@ -245,19 +259,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox2.Controls.Add(this.abssizey);
this.groupBox2.Controls.Add(this.abssizex);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Location = new System.Drawing.Point(3, 228);
this.groupBox2.Location = new System.Drawing.Point(3, 253);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(243, 219);
this.groupBox2.Size = new System.Drawing.Size(243, 117);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = " Size ";
this.groupBox2.Text = "Size:";
//
// orgsizey
//
this.orgsizey.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgsizey.Location = new System.Drawing.Point(109, 51);
this.orgsizey.Location = new System.Drawing.Point(136, 23);
this.orgsizey.Name = "orgsizey";
this.orgsizey.Size = new System.Drawing.Size(79, 24);
this.orgsizey.Size = new System.Drawing.Size(72, 24);
this.orgsizey.TabIndex = 31;
this.orgsizey.Text = "-2000";
this.orgsizey.UseVisualStyleBackColor = true;
@ -266,9 +280,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// orgsizex
//
this.orgsizex.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgsizex.Location = new System.Drawing.Point(21, 51);
this.orgsizex.Location = new System.Drawing.Point(58, 23);
this.orgsizex.Name = "orgsizex";
this.orgsizex.Size = new System.Drawing.Size(79, 24);
this.orgsizex.Size = new System.Drawing.Size(72, 24);
this.orgsizex.TabIndex = 30;
this.orgsizex.Text = "-2000";
this.orgsizex.UseVisualStyleBackColor = true;
@ -277,7 +291,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(197, 56);
this.label12.Location = new System.Drawing.Point(214, 28);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(21, 14);
this.label12.TabIndex = 21;
@ -286,7 +300,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(18, 34);
this.label9.Location = new System.Drawing.Point(9, 28);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(46, 14);
this.label9.TabIndex = 18;
@ -295,7 +309,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(197, 173);
this.label8.Location = new System.Drawing.Point(214, 88);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(17, 14);
this.label8.TabIndex = 17;
@ -304,7 +318,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(197, 115);
this.label7.Location = new System.Drawing.Point(214, 58);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(21, 14);
this.label7.TabIndex = 16;
@ -316,9 +330,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relsizey.AllowNegative = true;
this.relsizey.AllowRelative = true;
this.relsizey.ButtonStep = 1;
this.relsizey.Location = new System.Drawing.Point(109, 168);
this.relsizey.Location = new System.Drawing.Point(136, 83);
this.relsizey.Name = "relsizey";
this.relsizey.Size = new System.Drawing.Size(82, 24);
this.relsizey.Size = new System.Drawing.Size(72, 24);
this.relsizey.StepValues = null;
this.relsizey.TabIndex = 15;
this.relsizey.WhenEnterPressed += new System.EventHandler(this.relsizey_Validated);
@ -332,9 +346,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.relsizex.AllowNegative = true;
this.relsizex.AllowRelative = true;
this.relsizex.ButtonStep = 1;
this.relsizex.Location = new System.Drawing.Point(21, 168);
this.relsizex.Location = new System.Drawing.Point(58, 83);
this.relsizex.Name = "relsizex";
this.relsizex.Size = new System.Drawing.Size(82, 24);
this.relsizex.Size = new System.Drawing.Size(72, 24);
this.relsizex.StepValues = null;
this.relsizex.TabIndex = 14;
this.relsizex.WhenEnterPressed += new System.EventHandler(this.relsizex_Validated);
@ -345,7 +359,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(18, 151);
this.label4.Location = new System.Drawing.Point(15, 88);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(37, 14);
this.label4.TabIndex = 13;
@ -357,9 +371,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.abssizey.AllowNegative = true;
this.abssizey.AllowRelative = true;
this.abssizey.ButtonStep = 1;
this.abssizey.Location = new System.Drawing.Point(109, 110);
this.abssizey.Location = new System.Drawing.Point(136, 53);
this.abssizey.Name = "abssizey";
this.abssizey.Size = new System.Drawing.Size(82, 24);
this.abssizey.Size = new System.Drawing.Size(72, 24);
this.abssizey.StepValues = null;
this.abssizey.TabIndex = 12;
this.abssizey.WhenEnterPressed += new System.EventHandler(this.abssizey_Validated);
@ -373,9 +387,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.abssizex.AllowNegative = true;
this.abssizex.AllowRelative = true;
this.abssizex.ButtonStep = 1;
this.abssizex.Location = new System.Drawing.Point(21, 110);
this.abssizex.Location = new System.Drawing.Point(58, 53);
this.abssizex.Name = "abssizex";
this.abssizex.Size = new System.Drawing.Size(82, 24);
this.abssizex.Size = new System.Drawing.Size(72, 24);
this.abssizex.StepValues = null;
this.abssizex.TabIndex = 11;
this.abssizex.WhenEnterPressed += new System.EventHandler(this.abssizex_Validated);
@ -386,7 +400,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 93);
this.label3.Location = new System.Drawing.Point(2, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 14);
this.label3.TabIndex = 10;
@ -402,17 +416,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Controls.Add(this.absrot);
this.groupBox3.Location = new System.Drawing.Point(3, 453);
this.groupBox3.Location = new System.Drawing.Point(3, 376);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(243, 129);
this.groupBox3.Size = new System.Drawing.Size(243, 91);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Transform ";
this.groupBox3.Text = "Transform:";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(18, 81);
this.label14.Location = new System.Drawing.Point(9, 61);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(46, 14);
this.label14.TabIndex = 27;
@ -422,7 +436,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
this.flipv.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.flipv.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FlipSelectionV;
this.flipv.Location = new System.Drawing.Point(123, 73);
this.flipv.Location = new System.Drawing.Point(94, 53);
this.flipv.Name = "flipv";
this.flipv.Size = new System.Drawing.Size(30, 30);
this.flipv.TabIndex = 26;
@ -433,7 +447,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
this.fliph.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.fliph.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FlipSelectionH;
this.fliph.Location = new System.Drawing.Point(87, 73);
this.fliph.Location = new System.Drawing.Point(58, 53);
this.fliph.Name = "fliph";
this.fliph.Size = new System.Drawing.Size(30, 30);
this.fliph.TabIndex = 25;
@ -443,7 +457,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(18, 39);
this.label13.Location = new System.Drawing.Point(6, 28);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(49, 14);
this.label13.TabIndex = 23;
@ -452,9 +466,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(175, 39);
this.label11.Location = new System.Drawing.Point(146, 28);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(12, 14);
this.label11.Size = new System.Drawing.Size(13, 14);
this.label11.TabIndex = 22;
this.label11.Text = "º";
//
@ -464,7 +478,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absrot.AllowNegative = true;
this.absrot.AllowRelative = true;
this.absrot.ButtonStep = 1;
this.absrot.Location = new System.Drawing.Point(87, 34);
this.absrot.Location = new System.Drawing.Point(58, 23);
this.absrot.Name = "absrot";
this.absrot.Size = new System.Drawing.Size(82, 24);
this.absrot.StepValues = null;
@ -474,10 +488,156 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.absrot.WhenButtonsClicked += new System.EventHandler(this.absrot_Validated);
this.absrot.WhenTextChanged += new System.EventHandler(this.WhenTextChanged);
//
// groupBox5
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.orgCenterY);
this.groupBox5.Controls.Add(this.orgCenterX);
this.groupBox5.Controls.Add(this.label10);
this.groupBox5.Controls.Add(this.label18);
this.groupBox5.Controls.Add(this.label20);
this.groupBox5.Controls.Add(this.label21);
this.groupBox5.Controls.Add(this.relCenterY);
this.groupBox5.Controls.Add(this.relCenterX);
this.groupBox5.Controls.Add(this.absCenterY);
this.groupBox5.Controls.Add(this.absCenterX);
this.groupBox5.Controls.Add(this.label22);
this.groupBox5.Controls.Add(this.label23);
this.groupBox5.Location = new System.Drawing.Point(3, 7);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(243, 117);
this.groupBox5.TabIndex = 30;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Center:";
//
// orgCenterY
//
this.orgCenterY.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgCenterY.Location = new System.Drawing.Point(136, 23);
this.orgCenterY.Name = "orgCenterY";
this.orgCenterY.Size = new System.Drawing.Size(72, 24);
this.orgCenterY.TabIndex = 29;
this.orgCenterY.Text = "-2000";
this.orgCenterY.UseVisualStyleBackColor = true;
//
// orgCenterX
//
this.orgCenterX.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.orgCenterX.Location = new System.Drawing.Point(58, 23);
this.orgCenterX.Name = "orgCenterX";
this.orgCenterX.Size = new System.Drawing.Size(72, 24);
this.orgCenterX.TabIndex = 28;
this.orgCenterX.Text = "-2000";
this.orgCenterX.UseVisualStyleBackColor = true;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(214, 28);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(21, 14);
this.label10.TabIndex = 26;
this.label10.Text = "mp";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(9, 28);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(46, 14);
this.label18.TabIndex = 23;
this.label18.Text = "Original:";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(214, 88);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(21, 14);
this.label20.TabIndex = 13;
this.label20.Text = "mp";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(214, 58);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(21, 14);
this.label21.TabIndex = 12;
this.label21.Text = "mp";
//
// relCenterY
//
this.relCenterY.AllowDecimal = true;
this.relCenterY.AllowNegative = true;
this.relCenterY.AllowRelative = true;
this.relCenterY.ButtonStep = 1;
this.relCenterY.Location = new System.Drawing.Point(136, 83);
this.relCenterY.Name = "relCenterY";
this.relCenterY.Size = new System.Drawing.Size(72, 24);
this.relCenterY.StepValues = null;
this.relCenterY.TabIndex = 11;
//
// relCenterX
//
this.relCenterX.AllowDecimal = true;
this.relCenterX.AllowNegative = true;
this.relCenterX.AllowRelative = true;
this.relCenterX.ButtonStep = 1;
this.relCenterX.Location = new System.Drawing.Point(58, 83);
this.relCenterX.Name = "relCenterX";
this.relCenterX.Size = new System.Drawing.Size(72, 24);
this.relCenterX.StepValues = null;
this.relCenterX.TabIndex = 10;
//
// absCenterY
//
this.absCenterY.AllowDecimal = true;
this.absCenterY.AllowNegative = true;
this.absCenterY.AllowRelative = true;
this.absCenterY.ButtonStep = 1;
this.absCenterY.Location = new System.Drawing.Point(136, 53);
this.absCenterY.Name = "absCenterY";
this.absCenterY.Size = new System.Drawing.Size(72, 24);
this.absCenterY.StepValues = null;
this.absCenterY.TabIndex = 9;
//
// absCenterX
//
this.absCenterX.AllowDecimal = true;
this.absCenterX.AllowNegative = true;
this.absCenterX.AllowRelative = true;
this.absCenterX.ButtonStep = 1;
this.absCenterX.Location = new System.Drawing.Point(58, 53);
this.absCenterX.Name = "absCenterX";
this.absCenterX.Size = new System.Drawing.Size(72, 24);
this.absCenterX.StepValues = null;
this.absCenterX.TabIndex = 8;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(7, 88);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(48, 14);
this.label22.TabIndex = 1;
this.label22.Text = "Relative:";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(6, 58);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(53, 14);
this.label23.TabIndex = 0;
this.label23.Text = "Absolute:";
//
// EditSelectionPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@ -490,6 +650,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false);
}
@ -529,5 +691,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.Button orgposy;
private System.Windows.Forms.Button orgsizey;
private System.Windows.Forms.Button orgsizex;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button orgCenterY;
private System.Windows.Forms.Button orgCenterX;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterY;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterX;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterY;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterX;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
}
}

View file

@ -117,105 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="orgposy.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="orgposx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label16.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label19.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="relposy.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="relposx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="absposy.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="absposx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="orgsizey.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="orgsizex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label12.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label9.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label8.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="relsizey.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="relsizex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="abssizey.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="abssizex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label14.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flipv.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fliph.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label13.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label11.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="absrot.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -44,23 +44,24 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.buttoncopyproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpasteproperties = new System.Windows.Forms.ToolStripButton();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
this.buttonfloorgradient = new System.Windows.Forms.ToolStripButton();
this.buttonceilinggradient = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionh = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionv = new System.Windows.Forms.ToolStripButton();
this.buttoncurvelinedefs = new System.Windows.Forms.ToolStripButton();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.buttonMarqueSelectTouching = new System.Windows.Forms.ToolStripButton();
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.menustrip.SuspendLayout();
this.manualstrip.SuspendLayout();
@ -200,15 +201,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.thingsmenu.Text = "Things";
this.thingsmenu.Visible = false;
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(202, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// globalstrip
//
this.globalstrip.Location = new System.Drawing.Point(0, 24);
@ -233,13 +225,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs,
this.brightnessGradientMode,
this.buttonMarqueSelectTouching,
this.buttonAlignThingsToWall});
this.buttonAlignThingsToWall,
this.buttonTextureOffsetLock});
this.manualstrip.Location = new System.Drawing.Point(0, 49);
this.manualstrip.Name = "manualstrip";
this.manualstrip.Size = new System.Drawing.Size(423, 25);
this.manualstrip.TabIndex = 2;
this.manualstrip.Text = "toolStrip1";
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
//
// buttoncopyproperties
//
this.buttoncopyproperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -262,12 +274,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonpasteproperties.Text = "Paste Properties";
this.buttonpasteproperties.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// buttonselectionnumbers
//
this.buttonselectionnumbers.CheckOnClick = true;
@ -279,12 +285,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonselectionnumbers.Text = "View Selection Numbering";
this.buttonselectionnumbers.Click += new System.EventHandler(this.buttonselectionnumbers_Click);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonbrightnessgradient
//
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -352,13 +352,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs.Text = "Curve Linedefs";
this.buttoncurvelinedefs.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
//
// buttonMarqueSelectTouching
//
this.buttonMarqueSelectTouching.CheckOnClick = true;
@ -383,6 +376,27 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonAlignThingsToWall.ToolTipText = "Align selected things to closest linedef";
this.buttonAlignThingsToWall.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonTextureOffsetLock
//
this.buttonTextureOffsetLock.CheckOnClick = true;
this.buttonTextureOffsetLock.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonTextureOffsetLock.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.TextureLock;
this.buttonTextureOffsetLock.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonTextureOffsetLock.Name = "buttonTextureOffsetLock";
this.buttonTextureOffsetLock.Size = new System.Drawing.Size(23, 22);
this.buttonTextureOffsetLock.ToolTipText = "When enabled, keeps floor and ceiling texture offsets\r\nconstant while sector is d" +
"ragged\r\n";
this.buttonTextureOffsetLock.Click += new System.EventHandler(this.buttonTextureOffsetLock_Click);
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(202, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
@ -454,5 +468,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.ToolStripMenuItem alignToWallItem;
private System.Windows.Forms.ToolStripButton buttonAlignThingsToWall;
private System.Windows.Forms.ToolStripMenuItem pointAtCursorItem;
private System.Windows.Forms.ToolStripButton buttonTextureOffsetLock;
}
}

View file

@ -74,6 +74,7 @@ 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; } }
#endregion
@ -178,6 +179,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
private void buttonMarqueSelectTouching_Click(object sender, EventArgs e) {
BuilderPlug.Me.MarqueSelectTouching = buttonMarqueSelectTouching.Checked;
}
//mxd
private void buttonTextureOffsetLock_Click(object sender, EventArgs e) {
BuilderPlug.Me.LockSectorTextureOffsetsWhileDragging = buttonTextureOffsetLock.Checked;
}
#endregion
}

View file

@ -123,18 +123,18 @@
<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="globalstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="globalstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 17</value>
</metadata>
<metadata name="globalstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="manualstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<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="manualstrip.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:2.0.50727.4927
// This code was generated by a tool.
// Runtime Version:2.0.50727.5466
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -13,12 +13,12 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
// с помощью такого средства, как ResGen или Visual Studio.
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
// с параметром /str или перестройте свой проект VS.
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@ -47,8 +47,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@ -214,6 +214,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap TextureLock {
get {
object obj = ResourceManager.GetObject("TextureLock", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ThingPointAtCursor {
get {
object obj = ResourceManager.GetObject("ThingPointAtCursor", resourceCulture);

View file

@ -121,8 +121,8 @@
<data name="DrawEllipseMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawEllipseMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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 name="AlignThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlignThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SelectTouching" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SelectTouching.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -136,8 +136,8 @@
<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="AlignThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlignThings.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="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>
@ -151,9 +151,6 @@
<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 +166,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="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 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="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>
@ -187,6 +184,9 @@
<data name="FloorAlign" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FloorAlign.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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="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>
@ -196,4 +196,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="TextureLock" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextureLock.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

View file

@ -132,10 +132,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Modify offsets based on surface and camera angles
if (General.Map.UDMF) {
float angle = 0;
if (GeometryType == VisualGeometryType.CEILING && level.sector.Fields.ContainsKey("rotationceiling"))
angle = (float)level.sector.Fields["rotationceiling"].Value * (float)Math.PI / 180f;
else if (GeometryType == VisualGeometryType.FLOOR && level.sector.Fields.ContainsKey("rotationfloor"))
angle = (float)level.sector.Fields["rotationfloor"].Value * (float)Math.PI / 180f;
if(GeometryType == VisualGeometryType.CEILING && level.sector.Fields.ContainsKey("rotationceiling"))
angle = Angle2D.DegToRad((float)level.sector.Fields["rotationceiling"].Value);// * (float)Math.PI / 180f;
else if(GeometryType == VisualGeometryType.FLOOR && level.sector.Fields.ContainsKey("rotationfloor"))
angle = Angle2D.DegToRad((float)level.sector.Fields["rotationfloor"].Value);// *(float)Math.PI / 180f;
Vector2D v = new Vector2D(offsetx, offsety).GetRotated(angle);
Point p = getTranslatedTextureOffset(new Point((int)Math.Round(v.x), (int)Math.Round(v.y)));
@ -161,7 +161,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Modify texture offsets based on camera angle (so "movetextureleft" action always moves texture more or less "left" etc.)
protected Point getTranslatedTextureOffset(Point p) {
Point tp = new Point();
int camAngle = (int)(General.Map.VisualCamera.AngleXY * 180f / (float)Math.PI);
int camAngle = (int)Angle2D.RadToDeg(General.Map.VisualCamera.AngleXY);// * 180f / (float)Math.PI);
if (camAngle > 315 || camAngle < 46) {
tp = p;

View file

@ -536,9 +536,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
//move things...
if (!absolutePosition) { //...relatively (that's easy)
int camAngle = (int)Math.Round(General.Map.VisualCamera.AngleXY * 180 / Math.PI);
int camAngle = (int)Math.Round(Angle2D.RadToDeg(General.Map.VisualCamera.AngleXY));// * 180 / Math.PI);
int sector = General.ClampAngle(camAngle - 45) / 90;
direction = direction.GetRotated((float)(sector * Math.PI / 2f));
direction = direction.GetRotated(sector * Angle2D.PIHALF);
for (int i = 0; i < coordinates.Length; i++)
translatedCoords[i] = coordinates[i] + new Vector3D(direction);