Added: guidelines color is now configurable.

Added: guidelines can now be enabled in Draw Rectangle/Ellipse/Grid modes.
Changed, Draw Lines mode: perpendicular guidelines are now drawn for horizontal/vertical lines.
Updated, Draw Ellipse mode: the shape now always touches all sides of the bounding box.
Updated ZDoom_ACS.cfg.
Updated ZDoom_DECORATE.cfg.
Updated ZDoom ACC.
This commit is contained in:
MaxED 2016-09-26 12:53:50 +00:00 committed by spherallic
parent b02175a779
commit ce91d27ad2
19 changed files with 358 additions and 155 deletions

Binary file not shown.

View file

@ -226,7 +226,8 @@ keywords
GetSectorUDMFInt = "int GetSectorUDMFInt(int tag, str key)"; GetSectorUDMFInt = "int GetSectorUDMFInt(int tag, str key)";
GetSideUDMFFixed = "fixed GetSideUDMFFixed(int lineid, bool side, str key)"; GetSideUDMFFixed = "fixed GetSideUDMFFixed(int lineid, bool side, str key)";
GetSideUDMFInt = "int GetSideUDMFInt(int lineid, bool side, str key)"; GetSideUDMFInt = "int GetSideUDMFInt(int lineid, bool side, str key)";
GetSigilPieces = "int GetSigilPieces(void)\nReturns the number of Sigil pieces that are held by the player"; GetSigilPieces = "int GetSigilPieces()\nReturns the number of Sigil pieces that are held by the player";
GetSpriteRotation = "int GetSpriteRotation(int ptr)";
GetThingUDMFFixed = "fixed GetThingUDMFFixed(int thingid, str key)"; GetThingUDMFFixed = "fixed GetThingUDMFFixed(int thingid, str key)";
GetThingUDMFInt = "int GetThingUDMFInt(int thingid, str key)"; GetThingUDMFInt = "int GetThingUDMFInt(int thingid, str key)";
GetUserArray = "void GetUserArray(int tid, str name, int pos)"; GetUserArray = "void GetUserArray(int tid, str name, int pos)";
@ -500,6 +501,7 @@ properties
LIGHTNING; LIGHTNING;
NET; NET;
OPEN; OPEN;
REOPEN;
RESPAWN; RESPAWN;
Restart; Restart;
return; return;

View file

@ -105,7 +105,6 @@ keywords
A_SentinelBob = "A_SentinelBob"; A_SentinelBob = "A_SentinelBob";
A_SetTeleFog = "A_SetTeleFog(str telefogsourceclass, str telefogdestclass)"; A_SetTeleFog = "A_SetTeleFog(str telefogsourceclass, str telefogdestclass)";
A_Srcr2Decide = "A_Srcr2Decide"; A_Srcr2Decide = "A_Srcr2Decide";
A_SwapTeleFog = "A_SwapTeleFog";
A_TurretLook = "A_TurretLook"; A_TurretLook = "A_TurretLook";
A_Teleport = "state A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]\nbool A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]"; A_Teleport = "state A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]\nbool A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]";
A_VileChase = "A_VileChase"; A_VileChase = "A_VileChase";
@ -250,6 +249,8 @@ keywords
A_SetTranslucent = "A_SetTranslucent(float alpha[, int mode = 0])"; A_SetTranslucent = "A_SetTranslucent(float alpha[, int mode = 0])";
A_SetUserVar = "A_SetUserVar(str name, int value)"; A_SetUserVar = "A_SetUserVar(str name, int value)";
A_SetUserVarFloat = "A_SetUserVarFloat(str name, float value)"; A_SetUserVarFloat = "A_SetUserVarFloat(str name, float value)";
A_SetVisibleRotation = "A_SetVisibleRotation(float anglestart[, float angleend = 0.0[, float pitchstart = 0.0[, float pitchend = 0.0[, int flags = 0[, int ptr = AAPTR_DEFAULT]]]]]])";
A_SwapTeleFog = "A_SwapTeleFog";
A_TransferPointer = "A_TransferPointer(int source, int recipient, int sourcefield, int recipientfield[, int flags])\nflags: PTROP flags."; A_TransferPointer = "A_TransferPointer(int source, int recipient, int sourcefield, int recipientfield[, int flags])\nflags: PTROP flags.";
A_UnHideThing = "A_UnHideThing"; A_UnHideThing = "A_UnHideThing";
A_UnsetFloat = "A_UnsetFloat"; A_UnsetFloat = "A_UnsetFloat";
@ -542,6 +543,10 @@ properties
TeleFogDestType; TeleFogDestType;
Threshold; Threshold;
DefThreshold; DefThreshold;
VisibleAngleStart;
VisibleAngleEnd;
VisiblePitchStart;
VisiblePitchEnd;
//Collision and 'Physics' //Collision and 'Physics'
Radius; Radius;
Height; Height;
@ -584,6 +589,11 @@ properties
Decal; Decal;
StencilColor; StencilColor;
FloatBobPhase; FloatBobPhase;
DistanceCheck;
SpriteAngle;
SpriteRotation;
VisibleAngles;
VisiblePitch;
//Obituaries //Obituaries
HitObituary; HitObituary;
Obituary; Obituary;
@ -742,6 +752,10 @@ constants
WALLSPRITE; WALLSPRITE;
DONTFLIP; DONTFLIP;
ROLLCENTER; ROLLCENTER;
SPRITEANGLE;
MASKROTATION;
ABSMASKANGLE;
ABSMASKPITCH;
//pointers //pointers
AAPTR_DEFAULT; AAPTR_DEFAULT;
AAPTR_NULL; AAPTR_NULL;
@ -1371,4 +1385,22 @@ constants
PSPF_ADDBOB; PSPF_ADDBOB;
PSPF_POWDOUBLE; PSPF_POWDOUBLE;
PSPF_CVARFAST; PSPF_CVARFAST;
//A_BFGSpray flags
BFGF_MISSILEORIGIN;
BFGF_HURTSOURCE;
//A_RadiusDamageSelf flags
RDSF_BFGDAMAGE;
//GetAngle flags
GAF_RELATIVE;
GAF_SWITCH;
//A_CopySpriteFrame flags
CPSF_NOSPRITE;
CPSF_NOFRAME;
//A_SetVisibleRotation flags
VRF_NOANGLESTART;
VRF_NOANGLEEND;
VRF_NOPITCHSTART;
VRF_NOPITCHEND;
VRF_NOANGLE;
VRF_NOPITCH;
} }

View file

@ -37,7 +37,7 @@ namespace CodeImp.DoomBuilder.Rendering
private const float DARK_ADDITION = -0.2f; private const float DARK_ADDITION = -0.2f;
// Palette size // Palette size
private const int NUM_COLORS = 62; private const int NUM_COLORS = 63;
public const int NUM_THING_COLORS = 20; public const int NUM_THING_COLORS = 20;
public const int THING_COLORS_OFFSET = 20; public const int THING_COLORS_OFFSET = 20;
@ -104,6 +104,7 @@ namespace CodeImp.DoomBuilder.Rendering
public const int PROPERTIES = 59; public const int PROPERTIES = 59;
public const int WAYPOINTCOLOR = 60; public const int WAYPOINTCOLOR = 60;
public const int WAYPOINTLOOPCOLOR = 61; public const int WAYPOINTLOOPCOLOR = 61;
public const int GUIDELINECOLOR = 62; //mxd
#endregion #endregion
#region ================== Variables #region ================== Variables
@ -136,6 +137,7 @@ namespace CodeImp.DoomBuilder.Rendering
//mxd //mxd
public PixelColor ModelWireframe { get { return colors[MODELWIRECOLOR]; } internal set { colors[MODELWIRECOLOR] = value; } } public PixelColor ModelWireframe { get { return colors[MODELWIRECOLOR]; } internal set { colors[MODELWIRECOLOR] = value; } }
public PixelColor InfoLine { get { return colors[INFOLINECOLOR]; } internal set { colors[INFOLINECOLOR] = value; } } public PixelColor InfoLine { get { return colors[INFOLINECOLOR]; } internal set { colors[INFOLINECOLOR] = value; } }
public PixelColor Guideline { get { return colors[GUIDELINECOLOR]; } internal set { colors[GUIDELINECOLOR] = value; } }
public PixelColor ThreeDFloor { get { return colors[THREEDFLOORCOLOR]; } internal set { colors[THREEDFLOORCOLOR] = value;} } public PixelColor ThreeDFloor { get { return colors[THREEDFLOORCOLOR]; } internal set { colors[THREEDFLOORCOLOR] = value;} }
public PixelColor Crosshair3D { get { return colors[CROSSHAIR3D]; } internal set { colors[CROSSHAIR3D] = value; } } public PixelColor Crosshair3D { get { return colors[CROSSHAIR3D]; } internal set { colors[CROSSHAIR3D] = value; } }
@ -181,8 +183,8 @@ namespace CodeImp.DoomBuilder.Rendering
// Read color // Read color
colors[i] = PixelColor.FromInt(cfg.ReadSetting("colors.color" + i.ToString(CultureInfo.InvariantCulture), 0)); colors[i] = PixelColor.FromInt(cfg.ReadSetting("colors.color" + i.ToString(CultureInfo.InvariantCulture), 0));
} }
// Set new colors // Set new colors
// Set new thing colors
if(colors[THINGCOLOR00].ToInt() == 0) colors[THINGCOLOR00] = PixelColor.FromColor(Color.DimGray); if(colors[THINGCOLOR00].ToInt() == 0) colors[THINGCOLOR00] = PixelColor.FromColor(Color.DimGray);
if(colors[THINGCOLOR01].ToInt() == 0) colors[THINGCOLOR01] = PixelColor.FromColor(Color.RoyalBlue); if(colors[THINGCOLOR01].ToInt() == 0) colors[THINGCOLOR01] = PixelColor.FromColor(Color.RoyalBlue);
if(colors[THINGCOLOR02].ToInt() == 0) colors[THINGCOLOR02] = PixelColor.FromColor(Color.ForestGreen); if(colors[THINGCOLOR02].ToInt() == 0) colors[THINGCOLOR02] = PixelColor.FromColor(Color.ForestGreen);
@ -207,6 +209,7 @@ namespace CodeImp.DoomBuilder.Rendering
if (colors[SCRIPTFOLDBACK].ToInt() == 0) colors[SCRIPTFOLDBACK] = PixelColor.FromColor(SystemColors.ControlLightLight); if (colors[SCRIPTFOLDBACK].ToInt() == 0) colors[SCRIPTFOLDBACK] = PixelColor.FromColor(SystemColors.ControlLightLight);
if (colors[WAYPOINTCOLOR].ToInt() == 0) colors[WAYPOINTCOLOR] = PixelColor.FromColor(Color.Orange); if (colors[WAYPOINTCOLOR].ToInt() == 0) colors[WAYPOINTCOLOR] = PixelColor.FromColor(Color.Orange);
if (colors[WAYPOINTLOOPCOLOR].ToInt() == 0) colors[WAYPOINTLOOPCOLOR] = PixelColor.FromColor(Color.SaddleBrown); if (colors[WAYPOINTLOOPCOLOR].ToInt() == 0) colors[WAYPOINTLOOPCOLOR] = PixelColor.FromColor(Color.SaddleBrown);
if (colors[GUIDELINECOLOR].ToInt() == 0) colors[GUIDELINECOLOR] = PixelColor.FromInt(-256);
// Create assist colors // Create assist colors
CreateAssistColors(); CreateAssistColors();

View file

@ -59,6 +59,9 @@ namespace CodeImp.DoomBuilder.Windows
// When form is shown // When form is shown
protected override void OnShown(EventArgs e) protected override void OnShown(EventArgs e)
{ {
//mxd
if(this.DesignMode) return;
//mxd. Restore location and size //mxd. Restore location and size
this.SuspendLayout(); this.SuspendLayout();

View file

@ -37,8 +37,6 @@ namespace CodeImp.DoomBuilder.Windows
System.Windows.Forms.GroupBox groupBox1; System.Windows.Forms.GroupBox groupBox1;
System.Windows.Forms.Label label1; System.Windows.Forms.Label label1;
System.Windows.Forms.Label label18; System.Windows.Forms.Label label18;
System.Windows.Forms.Label label20;
System.Windows.Forms.Label label21;
System.Windows.Forms.Label label29; System.Windows.Forms.Label label29;
System.Windows.Forms.Label label30; System.Windows.Forms.Label label30;
System.Windows.Forms.Label label31; System.Windows.Forms.Label label31;
@ -86,6 +84,7 @@ namespace CodeImp.DoomBuilder.Windows
this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl();
this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl();
this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl();
this.colorguidelines = new CodeImp.DoomBuilder.Controls.ColorControl();
this.cbStretchView = new System.Windows.Forms.CheckBox(); this.cbStretchView = new System.Windows.Forms.CheckBox();
this.qualitydisplay = new System.Windows.Forms.CheckBox(); this.qualitydisplay = new System.Windows.Forms.CheckBox();
this.cancel = new System.Windows.Forms.Button(); this.cancel = new System.Windows.Forms.Button();
@ -237,8 +236,6 @@ namespace CodeImp.DoomBuilder.Windows
groupBox1 = new System.Windows.Forms.GroupBox(); groupBox1 = new System.Windows.Forms.GroupBox();
label1 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label();
label18 = new System.Windows.Forms.Label(); label18 = new System.Windows.Forms.Label();
label20 = new System.Windows.Forms.Label();
label21 = new System.Windows.Forms.Label();
label29 = new System.Windows.Forms.Label(); label29 = new System.Windows.Forms.Label();
label30 = new System.Windows.Forms.Label(); label30 = new System.Windows.Forms.Label();
label31 = new System.Windows.Forms.Label(); label31 = new System.Windows.Forms.Label();
@ -627,7 +624,7 @@ namespace CodeImp.DoomBuilder.Windows
// //
label18.AutoSize = true; label18.AutoSize = true;
label18.Enabled = false; label18.Enabled = false;
label18.Location = new System.Drawing.Point(382, 227); label18.Location = new System.Drawing.Point(23, 206);
label18.Name = "label18"; label18.Name = "label18";
label18.Size = new System.Drawing.Size(147, 13); label18.Size = new System.Drawing.Size(147, 13);
label18.TabIndex = 25; label18.TabIndex = 25;
@ -637,30 +634,6 @@ namespace CodeImp.DoomBuilder.Windows
"de "); "de ");
label18.Visible = false; label18.Visible = false;
// //
// label20
//
label20.AutoSize = true;
label20.Enabled = false;
label20.Location = new System.Drawing.Point(609, 37);
label20.Name = "label20";
label20.Size = new System.Drawing.Size(94, 13);
label20.TabIndex = 28;
label20.Text = "Dynamic light size:";
label20.TextAlign = System.Drawing.ContentAlignment.TopRight;
label20.Visible = false;
//
// label21
//
label21.AutoSize = true;
label21.Enabled = false;
label21.Location = new System.Drawing.Point(382, 125);
label21.Name = "label21";
label21.Size = new System.Drawing.Size(114, 13);
label21.TabIndex = 31;
label21.Text = "Dynamic light intensity:";
label21.TextAlign = System.Drawing.ContentAlignment.TopRight;
label21.Visible = false;
//
// label29 // label29
// //
label29.AutoSize = true; label29.AutoSize = true;
@ -716,6 +689,7 @@ namespace CodeImp.DoomBuilder.Windows
// //
this.colorsgroup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.colorsgroup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.colorsgroup1.Controls.Add(this.label2);
this.colorsgroup1.Controls.Add(this.color3dFloors); this.colorsgroup1.Controls.Add(this.color3dFloors);
this.colorsgroup1.Controls.Add(this.colorInfo); this.colorsgroup1.Controls.Add(this.colorInfo);
this.colorsgroup1.Controls.Add(this.colorMD3); this.colorsgroup1.Controls.Add(this.colorMD3);
@ -724,12 +698,12 @@ namespace CodeImp.DoomBuilder.Windows
this.colorsgroup1.Controls.Add(this.colorgrid); this.colorsgroup1.Controls.Add(this.colorgrid);
this.colorsgroup1.Controls.Add(this.colorindication); this.colorsgroup1.Controls.Add(this.colorindication);
this.colorsgroup1.Controls.Add(this.colorbackcolor); this.colorsgroup1.Controls.Add(this.colorbackcolor);
this.colorsgroup1.Controls.Add(this.label2);
this.colorsgroup1.Controls.Add(this.doublesidedalphalabel); this.colorsgroup1.Controls.Add(this.doublesidedalphalabel);
this.colorsgroup1.Controls.Add(this.colorselection); this.colorsgroup1.Controls.Add(this.colorselection);
this.colorsgroup1.Controls.Add(this.colorvertices); this.colorsgroup1.Controls.Add(this.colorvertices);
this.colorsgroup1.Controls.Add(this.colorhighlight); this.colorsgroup1.Controls.Add(this.colorhighlight);
this.colorsgroup1.Controls.Add(this.colorlinedefs); this.colorsgroup1.Controls.Add(this.colorlinedefs);
this.colorsgroup1.Controls.Add(this.colorguidelines);
this.colorsgroup1.Location = new System.Drawing.Point(8, 8); this.colorsgroup1.Location = new System.Drawing.Point(8, 8);
this.colorsgroup1.Name = "colorsgroup1"; this.colorsgroup1.Name = "colorsgroup1";
this.colorsgroup1.Size = new System.Drawing.Size(203, 388); this.colorsgroup1.Size = new System.Drawing.Size(203, 388);
@ -775,7 +749,7 @@ namespace CodeImp.DoomBuilder.Windows
// //
this.doublesidedalpha.BackColor = System.Drawing.SystemColors.Window; this.doublesidedalpha.BackColor = System.Drawing.SystemColors.Window;
this.doublesidedalpha.LargeChange = 3; this.doublesidedalpha.LargeChange = 3;
this.doublesidedalpha.Location = new System.Drawing.Point(11, 341); this.doublesidedalpha.Location = new System.Drawing.Point(11, 337);
this.doublesidedalpha.Name = "doublesidedalpha"; this.doublesidedalpha.Name = "doublesidedalpha";
this.doublesidedalpha.Size = new System.Drawing.Size(130, 45); this.doublesidedalpha.Size = new System.Drawing.Size(130, 45);
this.doublesidedalpha.TabIndex = 2; this.doublesidedalpha.TabIndex = 2;
@ -829,7 +803,7 @@ namespace CodeImp.DoomBuilder.Windows
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 324); this.label2.Location = new System.Drawing.Point(12, 366);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(141, 13); this.label2.Size = new System.Drawing.Size(141, 13);
this.label2.TabIndex = 14; this.label2.TabIndex = 14;
@ -839,7 +813,7 @@ namespace CodeImp.DoomBuilder.Windows
// doublesidedalphalabel // doublesidedalphalabel
// //
this.doublesidedalphalabel.AutoSize = true; this.doublesidedalphalabel.AutoSize = true;
this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 353); this.doublesidedalphalabel.Location = new System.Drawing.Point(159, 366);
this.doublesidedalphalabel.Name = "doublesidedalphalabel"; this.doublesidedalphalabel.Name = "doublesidedalphalabel";
this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13); this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13);
this.doublesidedalphalabel.TabIndex = 16; this.doublesidedalphalabel.TabIndex = 16;
@ -889,6 +863,17 @@ namespace CodeImp.DoomBuilder.Windows
this.colorlinedefs.Size = new System.Drawing.Size(168, 23); this.colorlinedefs.Size = new System.Drawing.Size(168, 23);
this.colorlinedefs.TabIndex = 2; this.colorlinedefs.TabIndex = 2;
// //
// colorguidelines
//
this.colorguidelines.BackColor = System.Drawing.Color.Transparent;
this.colorguidelines.Label = "Guidelines:";
this.colorguidelines.Location = new System.Drawing.Point(15, 314);
this.colorguidelines.MaximumSize = new System.Drawing.Size(10000, 23);
this.colorguidelines.MinimumSize = new System.Drawing.Size(100, 23);
this.colorguidelines.Name = "colorguidelines";
this.colorguidelines.Size = new System.Drawing.Size(168, 23);
this.colorguidelines.TabIndex = 11;
//
// cbStretchView // cbStretchView
// //
this.cbStretchView.AutoSize = true; this.cbStretchView.AutoSize = true;
@ -1635,7 +1620,6 @@ namespace CodeImp.DoomBuilder.Windows
this.tabcolors.Controls.Add(this.appearancegroup1); this.tabcolors.Controls.Add(this.appearancegroup1);
this.tabcolors.Controls.Add(this.colorsgroup1); this.tabcolors.Controls.Add(this.colorsgroup1);
this.tabcolors.Controls.Add(this.nightsgroup); this.tabcolors.Controls.Add(this.nightsgroup);
this.tabcolors.Controls.Add(label20);
this.tabcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabcolors.Location = new System.Drawing.Point(4, 22); this.tabcolors.Location = new System.Drawing.Point(4, 22);
this.tabcolors.Name = "tabcolors"; this.tabcolors.Name = "tabcolors";
@ -1668,7 +1652,6 @@ namespace CodeImp.DoomBuilder.Windows
this.appearancegroup1.Controls.Add(this.capitalizetexturenames); this.appearancegroup1.Controls.Add(this.capitalizetexturenames);
this.appearancegroup1.Controls.Add(this.cbMarkExtraFloors); this.appearancegroup1.Controls.Add(this.cbMarkExtraFloors);
this.appearancegroup1.Controls.Add(this.cbOldHighlightMode); this.appearancegroup1.Controls.Add(this.cbOldHighlightMode);
this.appearancegroup1.Controls.Add(label21);
this.appearancegroup1.Controls.Add(this.cbStretchView); this.appearancegroup1.Controls.Add(this.cbStretchView);
this.appearancegroup1.Controls.Add(this.qualitydisplay); this.appearancegroup1.Controls.Add(this.qualitydisplay);
this.appearancegroup1.Controls.Add(label18); this.appearancegroup1.Controls.Add(label18);
@ -1847,7 +1830,7 @@ namespace CodeImp.DoomBuilder.Windows
// //
this.labelDynLightCount.AutoSize = true; this.labelDynLightCount.AutoSize = true;
this.labelDynLightCount.Enabled = false; this.labelDynLightCount.Enabled = false;
this.labelDynLightCount.Location = new System.Drawing.Point(425, 29); this.labelDynLightCount.Location = new System.Drawing.Point(336, 206);
this.labelDynLightCount.Name = "labelDynLightCount"; this.labelDynLightCount.Name = "labelDynLightCount";
this.labelDynLightCount.Size = new System.Drawing.Size(19, 13); this.labelDynLightCount.Size = new System.Drawing.Size(19, 13);
this.labelDynLightCount.TabIndex = 26; this.labelDynLightCount.TabIndex = 26;
@ -1859,7 +1842,7 @@ namespace CodeImp.DoomBuilder.Windows
this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window; this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightCount.Enabled = false; this.tbDynLightCount.Enabled = false;
this.tbDynLightCount.LargeChange = 3; this.tbDynLightCount.LargeChange = 3;
this.tbDynLightCount.Location = new System.Drawing.Point(375, 179); this.tbDynLightCount.Location = new System.Drawing.Point(176, 195);
this.tbDynLightCount.Maximum = 32; this.tbDynLightCount.Maximum = 32;
this.tbDynLightCount.Minimum = 1; this.tbDynLightCount.Minimum = 1;
this.tbDynLightCount.Name = "tbDynLightCount"; this.tbDynLightCount.Name = "tbDynLightCount";
@ -2671,7 +2654,7 @@ namespace CodeImp.DoomBuilder.Windows
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "PreferencesForm"; this.Name = "PreferencesForm";
this.Opacity = 0; this.Opacity = 0D;
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@ -2710,7 +2693,6 @@ namespace CodeImp.DoomBuilder.Windows
this.actioncontrolpanel.ResumeLayout(false); this.actioncontrolpanel.ResumeLayout(false);
this.actioncontrolpanel.PerformLayout(); this.actioncontrolpanel.PerformLayout();
this.tabcolors.ResumeLayout(false); this.tabcolors.ResumeLayout(false);
this.tabcolors.PerformLayout();
this.appearancegroup1.ResumeLayout(false); this.appearancegroup1.ResumeLayout(false);
this.appearancegroup1.PerformLayout(); this.appearancegroup1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).EndInit();
@ -2927,5 +2909,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.CheckBox textlabelfontbold; private System.Windows.Forms.CheckBox textlabelfontbold;
private System.Windows.Forms.Label label33; private System.Windows.Forms.Label label33;
private System.Windows.Forms.ComboBox textlabelfontsize; private System.Windows.Forms.ComboBox textlabelfontsize;
private CodeImp.DoomBuilder.Controls.ColorControl colorguidelines;
} }
} }

View file

@ -228,6 +228,7 @@ namespace CodeImp.DoomBuilder.Windows
//mxd //mxd
colorMD3.Color = General.Colors.ModelWireframe; colorMD3.Color = General.Colors.ModelWireframe;
colorInfo.Color = General.Colors.InfoLine; colorInfo.Color = General.Colors.InfoLine;
colorguidelines.Color = General.Colors.Guideline;
color3dFloors.Color = General.Colors.ThreeDFloor; color3dFloors.Color = General.Colors.ThreeDFloor;
// Script editor colors // Script editor colors
@ -409,6 +410,7 @@ namespace CodeImp.DoomBuilder.Windows
//mxd //mxd
General.Colors.ModelWireframe = colorMD3.Color; General.Colors.ModelWireframe = colorMD3.Color;
General.Colors.InfoLine = colorInfo.Color; General.Colors.InfoLine = colorInfo.Color;
General.Colors.Guideline = colorguidelines.Color;
General.Colors.ThreeDFloor = color3dFloors.Color; General.Colors.ThreeDFloor = color3dFloors.Color;
General.Colors.CreateAssistColors(); General.Colors.CreateAssistColors();

View file

@ -135,12 +135,6 @@
<metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="label20.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label29.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="label29.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>

View file

@ -67,9 +67,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.Subdivisions = subdivisions; panel.Subdivisions = subdivisions;
panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnValueChanged += OptionsPanelOnValueChanged;
panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged;
panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged;
// Needs to be set after adding the OnContinuousDrawingChanged event... // Needs to be set after adding the OnContinuousDrawingChanged event...
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawellipsemode.continuousdrawing", false); panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawellipsemode.continuousdrawing", false);
panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawellipsemode.showguidelines", false);
} }
override protected void AddInterface() override protected void AddInterface()
@ -84,6 +86,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("drawellipsemode.bevelwidth", bevelwidth); General.Settings.WritePluginSetting("drawellipsemode.bevelwidth", bevelwidth);
General.Settings.WritePluginSetting("drawellipsemode.angle", panel.Angle); General.Settings.WritePluginSetting("drawellipsemode.angle", panel.Angle);
General.Settings.WritePluginSetting("drawellipsemode.continuousdrawing", panel.ContinuousDrawing); General.Settings.WritePluginSetting("drawellipsemode.continuousdrawing", panel.ContinuousDrawing);
General.Settings.WritePluginSetting("drawellipsemode.showguidelines", panel.ShowGuidelines);
// Remove the buttons // Remove the buttons
panel.Unregister(); panel.Unregister();
@ -139,6 +142,60 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Add final point // Add final point
shape[subdivisions] = shape[0]; shape[subdivisions] = shape[0];
// Now fit it inside the bounding box
float minx = float.MaxValue;
float miny = float.MaxValue;
float maxx = float.MinValue;
float maxy = float.MinValue;
// Calculate shape extents
foreach(Vector2D v in shape)
{
if(v.x < minx) minx = v.x;
if(v.x > maxx) maxx = v.x;
if(v.y < miny) miny = v.y;
if(v.y > maxy) maxy = v.y;
}
// Calculate scalers
float scalerx = 1.0f;
float scalery = 1.0f;
if(minx != pStart.x || maxx != pEnd.x)
scalerx = (pEnd.x - pStart.x) / (maxx - minx);
if(miny != pStart.y)
scalery = (pEnd.y - pStart.y) / (maxy - miny);
// Apply scalers
if(scalerx != 1.0f || scalery != 1.0f)
{
for(int i = 0; i < shape.Length; i++)
{
shape[i].x = ((center.x - shape[i].x) * scalerx + center.x);
shape[i].y = ((center.y - shape[i].y) * scalery + center.y);
}
}
// Calculate shape extents again...
minx = float.MaxValue;
miny = float.MaxValue;
foreach(Vector2D v in shape)
{
if(v.x < minx) minx = v.x;
if(v.y < miny) miny = v.y;
}
// Calculate shape offset...
Vector2D offset = new Vector2D();
if(minx != pStart.x) offset.x = pStart.x - minx;
if(miny != pStart.y) offset.y = pStart.y - miny;
// Apply offset...
if(offset.x != 0.0f || offset.y != 0.0f)
for(int i = 0; i < shape.Length; i++) shape[i] += offset;
// Done
return shape; return shape;
} }

View file

@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
protected bool continuousdrawing; //mxd. Restart after finishing drawing? protected bool continuousdrawing; //mxd. Restart after finishing drawing?
protected bool autoclosedrawing; //mxd. Finish drawing when new points and existing geometry form a closed shape protected bool autoclosedrawing; //mxd. Finish drawing when new points and existing geometry form a closed shape
protected bool drawingautoclosed; //mxd protected bool drawingautoclosed; //mxd
private bool showguidelines; //mxd protected bool showguidelines; //mxd
//mxd. Map area bounds //mxd. Map area bounds
private Line2D top, bottom, left, right; private Line2D top, bottom, left, right;
@ -177,69 +177,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(showguidelines) if(showguidelines)
{ {
Vector2D prevp = points[points.Count - 1].pos; Vector2D prevp = points[points.Count - 1].pos;
PixelColor c = General.Colors.InfoLine.WithAlpha(80); renderguidelabels = (curp.pos.x != prevp.x && curp.pos.y != prevp.y);
if(curp.pos.x != prevp.x && curp.pos.y != prevp.y) RenderGuidelines(prevp, curp.pos, General.Colors.Guideline.WithAlpha(80));
{
renderguidelabels = true;
Vector2D tr = new Vector2D(Math.Max(curp.pos.x, prevp.x), Math.Max(curp.pos.y, prevp.y));
Vector2D bl = new Vector2D(Math.Min(curp.pos.x, prevp.x), Math.Min(curp.pos.y, prevp.y));
// Create guidelines
Line3D[] lines = new Line3D[5];
lines[0] = new Line3D(new Vector2D(tr.x, General.Map.Config.TopBoundary), new Vector2D(tr.x, General.Map.Config.BottomBoundary), c, false);
lines[1] = new Line3D(new Vector2D(bl.x, General.Map.Config.TopBoundary), new Vector2D(bl.x, General.Map.Config.BottomBoundary), c, false);
lines[2] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, tr.y), new Vector2D(General.Map.Config.RightBoundary, tr.y), c, false);
lines[3] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, bl.y), new Vector2D(General.Map.Config.RightBoundary, bl.y), c, false);
// Create current line extent. Make sure v1 is to the left of v2
Line2D current = (curp.pos.x < prevp.x ? new Line2D(curp.pos, prevp) : new Line2D(prevp, curp.pos));
Vector2D extentstart, extentend;
if(current.v1.y < current.v2.y) // Start is lower
{
// Start point can hit left or bottom boundaries
extentstart = Line2D.GetIntersectionPoint(left, current, false);
if(extentstart.y < General.Map.Config.BottomBoundary) extentstart = Line2D.GetIntersectionPoint(bottom, current, false);
// End point can hit right or top boundaries
extentend = Line2D.GetIntersectionPoint(right, current, false);
if(extentend.y > General.Map.Config.TopBoundary) extentend = Line2D.GetIntersectionPoint(top, current, false);
}
else // Start is higher
{
// Start point can hit left or top boundaries
extentstart = Line2D.GetIntersectionPoint(left, current, false);
if(extentstart.y > General.Map.Config.TopBoundary) extentstart = Line2D.GetIntersectionPoint(top, current, false);
// End point can hit right or bottom boundaries
extentend = Line2D.GetIntersectionPoint(right, current, false);
if(extentend.y < General.Map.Config.BottomBoundary) extentend = Line2D.GetIntersectionPoint(bottom, current, false);
}
lines[4] = new Line3D(extentstart, extentend, c, false);
// Render them
renderer.RenderArrows(lines);
// Update horiz/vert length labels
guidelabels[0].Move(tr, new Vector2D(tr.x, bl.y));
guidelabels[1].Move(new Vector2D(bl.x, tr.y), tr);
guidelabels[2].Move(new Vector2D(tr.x, bl.y), bl);
guidelabels[3].Move(bl, new Vector2D(bl.x, tr.y));
}
// Render horizontal line
else if(curp.pos.x != prevp.x)
{
Line3D l = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, curp.pos.y), new Vector2D(General.Map.Config.RightBoundary, curp.pos.y), c, false);
renderer.RenderArrows(new List<Line3D>{ l });
}
// Render vertical line
else if(curp.pos.y != prevp.y)
{
Line3D l = new Line3D(new Vector2D(curp.pos.x, General.Map.Config.TopBoundary), new Vector2D(curp.pos.x, General.Map.Config.BottomBoundary), c, false);
renderer.RenderArrows(new List<Line3D> { l });
}
} }
// Render lines // Render lines
@ -294,6 +233,89 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.Present(); renderer.Present();
} }
//mxd
protected void RenderGuidelines(Vector2D start, Vector2D end, PixelColor c)
{
if(end.x != start.x && end.y != start.y)
{
Vector2D tr = new Vector2D(Math.Max(end.x, start.x), Math.Max(end.y, start.y));
Vector2D bl = new Vector2D(Math.Min(end.x, start.x), Math.Min(end.y, start.y));
// Create guidelines
Line3D[] lines = new Line3D[5];
lines[0] = new Line3D(new Vector2D(tr.x, General.Map.Config.TopBoundary), new Vector2D(tr.x, General.Map.Config.BottomBoundary), c, false);
lines[1] = new Line3D(new Vector2D(bl.x, General.Map.Config.TopBoundary), new Vector2D(bl.x, General.Map.Config.BottomBoundary), c, false);
lines[2] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, tr.y), new Vector2D(General.Map.Config.RightBoundary, tr.y), c, false);
lines[3] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, bl.y), new Vector2D(General.Map.Config.RightBoundary, bl.y), c, false);
// Create current line extent. Make sure v1 is to the left of v2
Line2D current = (end.x < start.x ? new Line2D(end, start) : new Line2D(start, end));
Vector2D extentstart, extentend;
if(current.v1.y < current.v2.y) // Start is lower
{
// Start point can hit left or bottom boundaries
extentstart = Line2D.GetIntersectionPoint(left, current, false);
if(extentstart.y < General.Map.Config.BottomBoundary)
extentstart = Line2D.GetIntersectionPoint(bottom, current, false);
// End point can hit right or top boundaries
extentend = Line2D.GetIntersectionPoint(right, current, false);
if(extentend.y > General.Map.Config.TopBoundary)
extentend = Line2D.GetIntersectionPoint(top, current, false);
}
else // Start is higher
{
// Start point can hit left or top boundaries
extentstart = Line2D.GetIntersectionPoint(left, current, false);
if(extentstart.y > General.Map.Config.TopBoundary)
extentstart = Line2D.GetIntersectionPoint(top, current, false);
// End point can hit right or bottom boundaries
extentend = Line2D.GetIntersectionPoint(right, current, false);
if(extentend.y < General.Map.Config.BottomBoundary)
extentend = Line2D.GetIntersectionPoint(bottom, current, false);
}
lines[4] = new Line3D(extentstart, extentend, c, false);
// Render them
renderer.RenderArrows(lines);
// Update horiz/vert length labels
if(guidelabels != null)
{
guidelabels[0].Move(tr, new Vector2D(tr.x, bl.y));
guidelabels[1].Move(new Vector2D(bl.x, tr.y), tr);
guidelabels[2].Move(new Vector2D(tr.x, bl.y), bl);
guidelabels[3].Move(bl, new Vector2D(bl.x, tr.y));
}
}
// Render horizontal line + 2 vertical guidelines
else if(end.x != start.x)
{
Line3D l = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, end.y), new Vector2D(General.Map.Config.RightBoundary, end.y), c, false);
Line3D gs = new Line3D(new Vector2D(start.x, General.Map.Config.TopBoundary), new Vector2D(start.x, General.Map.Config.BottomBoundary), c, false);
Line3D ge = new Line3D(new Vector2D(end.x, General.Map.Config.TopBoundary), new Vector2D(end.x, General.Map.Config.BottomBoundary), c, false);
renderer.RenderArrows(new List<Line3D> { l, gs, ge });
}
// Render vertical line + 2 horizontal guidelines
else if(end.y != start.y)
{
Line3D l = new Line3D(new Vector2D(end.x, General.Map.Config.TopBoundary), new Vector2D(end.x, General.Map.Config.BottomBoundary), c, false);
Line3D gs = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, start.y), new Vector2D(General.Map.Config.RightBoundary, start.y), c, false);
Line3D ge = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, end.y), new Vector2D(General.Map.Config.RightBoundary, end.y), c, false);
renderer.RenderArrows(new List<Line3D> {l, gs, ge});
}
// Start and end match. Render a cross
else
{
Line3D gs = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, start.y), new Vector2D(General.Map.Config.RightBoundary, start.y), c, false);
Line3D ge = new Line3D(new Vector2D(start.x, General.Map.Config.TopBoundary), new Vector2D(start.x, General.Map.Config.BottomBoundary), c, false);
renderer.RenderArrows(new List<Line3D> { gs, ge });
}
}
//mxd //mxd
private void RenderLinedefDirectionIndicator(Vector2D start, Vector2D end, PixelColor color) private void RenderLinedefDirectionIndicator(Vector2D start, Vector2D end, PixelColor color)
{ {
@ -891,7 +913,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
} }
//mxd //mxd
private void OnShowGuidelinesChanged(object value, EventArgs e) protected void OnShowGuidelinesChanged(object value, EventArgs e)
{ {
showguidelines = (bool)value; showguidelines = (bool)value;
General.Interface.RedrawDisplay(); General.Interface.RedrawDisplay();

View file

@ -227,6 +227,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
UpdateReferencePoints(points[0], curp); UpdateReferencePoints(points[0], curp);
List<Vector2D[]> shapes = GetShapes(start, end); List<Vector2D[]> shapes = GetShapes(start, end);
// Render guidelines
if(showguidelines)
RenderGuidelines(start, end, General.Colors.Guideline.WithAlpha(80));
//render shape //render shape
foreach(Vector2D[] shape in shapes) foreach(Vector2D[] shape in shapes)
{ {
@ -242,12 +246,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
} }
//and labels //and labels
Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; if(width == 0 || height == 0)
{
// Render label for line
labels[0].Move(start, end);
renderer.RenderText(labels[0].TextLabel);
}
else
{
// Render labels for grid
Vector2D[] labelCoords = { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start };
for(int i = 1; i < 5; i++) for(int i = 1; i < 5; i++)
{ {
labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]);
renderer.RenderText(labels[i - 1].TextLabel); renderer.RenderText(labels[i - 1].TextLabel);
} }
}
//render hint //render hint
if(horizontalslices > 1 || verticalslices > 1) if(horizontalslices > 1 || verticalslices > 1)
@ -511,9 +525,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnValueChanged += OptionsPanelOnValueChanged;
panel.OnGridLockModeChanged += OptionsPanelOnGridLockChanged; panel.OnGridLockModeChanged += OptionsPanelOnGridLockChanged;
panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged;
panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged;
// Needs to be set after adding the OnContinuousDrawingChanged event... // Needs to be set after adding the OnContinuousDrawingChanged event...
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawgridmode.continuousdrawing", false); panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawgridmode.continuousdrawing", false);
panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawgridmode.showguidelines", false);
} }
protected override void AddInterface() protected override void AddInterface()
@ -534,6 +550,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("drawgridmode.horizontalinterpolation", (int)horizontalinterpolation); General.Settings.WritePluginSetting("drawgridmode.horizontalinterpolation", (int)horizontalinterpolation);
General.Settings.WritePluginSetting("drawgridmode.verticalinterpolation", (int)verticalinterpolation); General.Settings.WritePluginSetting("drawgridmode.verticalinterpolation", (int)verticalinterpolation);
General.Settings.WritePluginSetting("drawgridmode.continuousdrawing", panel.ContinuousDrawing); General.Settings.WritePluginSetting("drawgridmode.continuousdrawing", panel.ContinuousDrawing);
General.Settings.WritePluginSetting("drawgridmode.showguidelines", panel.ShowGuidelines);
// Remove docker // Remove docker
General.Interface.RemoveDocker(docker); General.Interface.RemoveDocker(docker);

View file

@ -98,9 +98,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
panel.Subdivisions = subdivisions; panel.Subdivisions = subdivisions;
panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnValueChanged += OptionsPanelOnValueChanged;
panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged;
panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged;
// Needs to be set after adding the OnContinuousDrawingChanged event... // Needs to be set after adding the OnContinuousDrawingChanged event...
panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawrectanglemode.continuousdrawing", false); panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawrectanglemode.continuousdrawing", false);
panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawrectanglemode.showguidelines", false);
} }
protected override void AddInterface() protected override void AddInterface()
@ -114,6 +116,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("drawrectanglemode.subdivisions", subdivisions); General.Settings.WritePluginSetting("drawrectanglemode.subdivisions", subdivisions);
General.Settings.WritePluginSetting("drawrectanglemode.bevelwidth", bevelwidth); General.Settings.WritePluginSetting("drawrectanglemode.bevelwidth", bevelwidth);
General.Settings.WritePluginSetting("drawrectanglemode.continuousdrawing", panel.ContinuousDrawing); General.Settings.WritePluginSetting("drawrectanglemode.continuousdrawing", panel.ContinuousDrawing);
General.Settings.WritePluginSetting("drawrectanglemode.showguidelines", panel.ShowGuidelines);
// Remove the buttons // Remove the buttons
panel.Unregister(); panel.Unregister();
@ -145,6 +148,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
UpdateReferencePoints(points[0], curp); UpdateReferencePoints(points[0], curp);
Vector2D[] shape = GetShape(start, end); Vector2D[] shape = GetShape(start, end);
// Render guidelines
if(showguidelines)
RenderGuidelines(start, end, General.Colors.Guideline.WithAlpha(80));
//render shape //render shape
for(int i = 1; i < shape.Length; i++) for(int i = 1; i < shape.Length; i++)
renderer.RenderLine(shape[i - 1], shape[i], LINE_THICKNESS, color, true); renderer.RenderLine(shape[i - 1], shape[i], LINE_THICKNESS, color, true);
@ -154,7 +161,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderRectangleFilled(new RectangleF(shape[i].x - vsize, shape[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); renderer.RenderRectangleFilled(new RectangleF(shape[i].x - vsize, shape[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true);
//and labels //and labels
Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; if(shape.Length == 2)
{
// Render label for line
labels[0].Move(start, end);
renderer.RenderText(labels[0].TextLabel);
}
else if(shape.Length > 3)
{
// Render labels for rectangle
Vector2D[] labelCoords = { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start };
for(int i = 1; i < 5; i++) for(int i = 1; i < 5; i++)
{ {
labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]);
@ -177,6 +193,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true); renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true);
} }
} }
}
else else
{ {
// Render vertex at cursor // Render vertex at cursor

View file

@ -38,6 +38,7 @@
this.anglelabel = new System.Windows.Forms.ToolStripLabel(); this.anglelabel = new System.Windows.Forms.ToolStripLabel();
this.angle = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.angle = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown();
this.reset = new System.Windows.Forms.ToolStripButton(); this.reset = new System.Windows.Forms.ToolStripButton();
this.showguidelines = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -45,6 +46,7 @@
// //
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.continuousdrawing, this.continuousdrawing,
this.showguidelines,
this.toolStripSeparator1, this.toolStripSeparator1,
this.subdivslabel, this.subdivslabel,
this.subdivs, this.subdivs,
@ -55,7 +57,7 @@
this.reset}); this.reset});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(582, 25); this.toolStrip1.Size = new System.Drawing.Size(646, 25);
this.toolStrip1.TabIndex = 6; this.toolStrip1.TabIndex = 6;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
@ -171,13 +173,24 @@
this.reset.Text = "Reset"; this.reset.Text = "Reset";
this.reset.Click += new System.EventHandler(this.reset_Click); this.reset.Click += new System.EventHandler(this.reset_Click);
// //
// showguidelines
//
this.showguidelines.CheckOnClick = true;
this.showguidelines.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Guidelines;
this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta;
this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2);
this.showguidelines.Name = "showguidelines";
this.showguidelines.Size = new System.Drawing.Size(82, 22);
this.showguidelines.Text = "Guidelines";
this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged);
//
// DrawEllipseOptionsPanel // DrawEllipseOptionsPanel
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Name = "DrawEllipseOptionsPanel"; this.Name = "DrawEllipseOptionsPanel";
this.Size = new System.Drawing.Size(582, 60); this.Size = new System.Drawing.Size(646, 60);
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout(); this.toolStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
@ -197,5 +210,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripLabel anglelabel; private System.Windows.Forms.ToolStripLabel anglelabel;
private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown angle; private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown angle;
private System.Windows.Forms.ToolStripButton showguidelines;
} }
} }

View file

@ -7,6 +7,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
public event EventHandler OnValueChanged; public event EventHandler OnValueChanged;
public event EventHandler OnContinuousDrawingChanged; public event EventHandler OnContinuousDrawingChanged;
public event EventHandler OnShowGuidelinesChanged;
private bool blockevents; private bool blockevents;
public int Spikiness { get { return (int)spikiness.Value; } set { blockevents = true; spikiness.Value = value; blockevents = false; } } public int Spikiness { get { return (int)spikiness.Value; } set { blockevents = true; spikiness.Value = value; blockevents = false; } }
@ -17,6 +19,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public int MaxSpikiness { get { return (int)spikiness.Maximum; } set { spikiness.Maximum = value; } } public int MaxSpikiness { get { return (int)spikiness.Maximum; } set { spikiness.Maximum = value; } }
public int MinSpikiness { get { return (int)spikiness.Minimum; } set { spikiness.Minimum = value; } } public int MinSpikiness { get { return (int)spikiness.Minimum; } set { spikiness.Minimum = value; } }
public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } }
public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } }
public DrawEllipseOptionsPanel() public DrawEllipseOptionsPanel()
{ {
@ -30,6 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
angle.ValueChanged += ValueChanged; angle.ValueChanged += ValueChanged;
General.Interface.AddButton(continuousdrawing); General.Interface.AddButton(continuousdrawing);
General.Interface.AddButton(showguidelines);
General.Interface.AddButton(toolStripSeparator1); General.Interface.AddButton(toolStripSeparator1);
General.Interface.AddButton(subdivslabel); General.Interface.AddButton(subdivslabel);
General.Interface.AddButton(subdivs); General.Interface.AddButton(subdivs);
@ -50,6 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(subdivs); General.Interface.RemoveButton(subdivs);
General.Interface.RemoveButton(subdivslabel); General.Interface.RemoveButton(subdivslabel);
General.Interface.RemoveButton(toolStripSeparator1); General.Interface.RemoveButton(toolStripSeparator1);
General.Interface.RemoveButton(showguidelines);
General.Interface.RemoveButton(continuousdrawing); General.Interface.RemoveButton(continuousdrawing);
} }
@ -75,5 +80,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty);
} }
private void showguidelines_CheckedChanged(object sender, EventArgs e)
{
if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty);
}
} }
} }

View file

@ -43,6 +43,7 @@
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.showguidelines = new System.Windows.Forms.CheckBox();
this.continuousdrawing = new System.Windows.Forms.CheckBox(); this.continuousdrawing = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slicesV)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.slicesV)).BeginInit();
@ -214,14 +215,26 @@
// //
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.showguidelines);
this.groupBox3.Controls.Add(this.continuousdrawing); this.groupBox3.Controls.Add(this.continuousdrawing);
this.groupBox3.Location = new System.Drawing.Point(3, 225); this.groupBox3.Location = new System.Drawing.Point(3, 225);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(200, 55); this.groupBox3.Size = new System.Drawing.Size(200, 71);
this.groupBox3.TabIndex = 11; this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "Additional options"; this.groupBox3.Text = "Additional options";
// //
// showguidelines
//
this.showguidelines.AutoSize = true;
this.showguidelines.Location = new System.Drawing.Point(20, 47);
this.showguidelines.Name = "showguidelines";
this.showguidelines.Size = new System.Drawing.Size(75, 17);
this.showguidelines.TabIndex = 16;
this.showguidelines.Text = "Guidelines";
this.showguidelines.UseVisualStyleBackColor = true;
this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged);
//
// continuousdrawing // continuousdrawing
// //
this.continuousdrawing.AutoSize = true; this.continuousdrawing.AutoSize = true;
@ -272,5 +285,6 @@
private System.Windows.Forms.CheckBox continuousdrawing; private System.Windows.Forms.CheckBox continuousdrawing;
private System.Windows.Forms.ComboBox gridlockmode; private System.Windows.Forms.ComboBox gridlockmode;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox showguidelines;
} }
} }

View file

@ -10,6 +10,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
public event EventHandler OnValueChanged; public event EventHandler OnValueChanged;
public event EventHandler OnGridLockModeChanged; public event EventHandler OnGridLockModeChanged;
public event EventHandler OnContinuousDrawingChanged; public event EventHandler OnContinuousDrawingChanged;
public event EventHandler OnShowGuidelinesChanged;
private bool blockevents; private bool blockevents;
public bool Triangulate { get { return triangulate.Checked; } set { blockevents = true; triangulate.Checked = value; blockevents = false; } } public bool Triangulate { get { return triangulate.Checked; } set { blockevents = true; triangulate.Checked = value; blockevents = false; } }
@ -19,6 +21,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
public int VerticalSlices { get { return (int)slicesV.Value; } set { blockevents = true; slicesV.Value = value; blockevents = false; } } public int VerticalSlices { get { return (int)slicesV.Value; } set { blockevents = true; slicesV.Value = value; blockevents = false; } }
public int MaxVerticalSlices { get { return (int)slicesV.Maximum; } set { slicesV.Maximum = value; } } public int MaxVerticalSlices { get { return (int)slicesV.Maximum; } set { slicesV.Maximum = value; } }
public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } }
public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } }
public InterpolationMode HorizontalInterpolationMode public InterpolationMode HorizontalInterpolationMode
{ {
get get
@ -89,5 +93,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty);
} }
private void showguidelines_CheckedChanged(object sender, EventArgs e)
{
if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty);
}
} }
} }

View file

@ -75,8 +75,8 @@
this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta; this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta;
this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2);
this.showguidelines.Name = "showguidelines"; this.showguidelines.Name = "showguidelines";
this.showguidelines.Size = new System.Drawing.Size(113, 22); this.showguidelines.Size = new System.Drawing.Size(82, 22);
this.showguidelines.Text = "Show guidelines"; this.showguidelines.Text = "Guidelines";
this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged); this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged);
// //
// DrawLineOptionsPanel // DrawLineOptionsPanel

View file

@ -29,12 +29,13 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.continuousdrawing = new System.Windows.Forms.ToolStripButton();
this.showguidelines = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.radiuslabel = new System.Windows.Forms.ToolStripLabel(); this.radiuslabel = new System.Windows.Forms.ToolStripLabel();
this.radius = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.radius = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown();
this.subdivslabel = new System.Windows.Forms.ToolStripLabel(); this.subdivslabel = new System.Windows.Forms.ToolStripLabel();
this.subdivs = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.subdivs = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown();
this.continuousdrawing = new System.Windows.Forms.ToolStripButton();
this.reset = new System.Windows.Forms.ToolStripButton(); this.reset = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -43,6 +44,7 @@
// //
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.continuousdrawing, this.continuousdrawing,
this.showguidelines,
this.toolStripSeparator1, this.toolStripSeparator1,
this.radiuslabel, this.radiuslabel,
this.radius, this.radius,
@ -51,10 +53,31 @@
this.reset}); this.reset});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(488, 25); this.toolStrip1.Size = new System.Drawing.Size(750, 25);
this.toolStrip1.TabIndex = 7; this.toolStrip1.TabIndex = 7;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// continuousdrawing
//
this.continuousdrawing.CheckOnClick = true;
this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat;
this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta;
this.continuousdrawing.Name = "continuousdrawing";
this.continuousdrawing.Size = new System.Drawing.Size(135, 22);
this.continuousdrawing.Text = "Continuous drawing";
this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged);
//
// showguidelines
//
this.showguidelines.CheckOnClick = true;
this.showguidelines.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Guidelines;
this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta;
this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2);
this.showguidelines.Name = "showguidelines";
this.showguidelines.Size = new System.Drawing.Size(82, 22);
this.showguidelines.Text = "Guidelines";
this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged);
//
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
@ -117,16 +140,6 @@
0, 0,
0, 0,
0}); 0});
//
// continuousdrawing
//
this.continuousdrawing.CheckOnClick = true;
this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat;
this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta;
this.continuousdrawing.Name = "continuousdrawing";
this.continuousdrawing.Size = new System.Drawing.Size(135, 22);
this.continuousdrawing.Text = "Continuous drawing";
this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged);
// //
// reset // reset
// //
@ -144,7 +157,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Name = "DrawRectangleOptionsPanel"; this.Name = "DrawRectangleOptionsPanel";
this.Size = new System.Drawing.Size(488, 60); this.Size = new System.Drawing.Size(750, 60);
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout(); this.toolStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
@ -162,5 +175,6 @@
private System.Windows.Forms.ToolStripButton reset; private System.Windows.Forms.ToolStripButton reset;
private System.Windows.Forms.ToolStripButton continuousdrawing; private System.Windows.Forms.ToolStripButton continuousdrawing;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton showguidelines;
} }
} }

View file

@ -7,6 +7,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
public event EventHandler OnValueChanged; public event EventHandler OnValueChanged;
public event EventHandler OnContinuousDrawingChanged; public event EventHandler OnContinuousDrawingChanged;
public event EventHandler OnShowGuidelinesChanged;
private bool blockevents; private bool blockevents;
public int BevelWidth { get { return (int)radius.Value; } set { blockevents = true; radius.Value = value; blockevents = false; } } public int BevelWidth { get { return (int)radius.Value; } set { blockevents = true; radius.Value = value; blockevents = false; } }
@ -16,6 +18,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public int MaxSubdivisions { get { return (int)subdivs.Maximum; } set { subdivs.Maximum = value; } } public int MaxSubdivisions { get { return (int)subdivs.Maximum; } set { subdivs.Maximum = value; } }
public int MinSubdivisions { get { return (int)subdivs.Minimum; } set { subdivs.Minimum = value; } } public int MinSubdivisions { get { return (int)subdivs.Minimum; } set { subdivs.Minimum = value; } }
public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } }
public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } }
public DrawRectangleOptionsPanel() public DrawRectangleOptionsPanel()
{ {
@ -28,6 +31,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
subdivs.ValueChanged += ValueChanged; subdivs.ValueChanged += ValueChanged;
General.Interface.AddButton(continuousdrawing); General.Interface.AddButton(continuousdrawing);
General.Interface.AddButton(showguidelines);
General.Interface.AddButton(toolStripSeparator1); General.Interface.AddButton(toolStripSeparator1);
General.Interface.AddButton(radiuslabel); General.Interface.AddButton(radiuslabel);
General.Interface.AddButton(radius); General.Interface.AddButton(radius);
@ -44,6 +48,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(radius); General.Interface.RemoveButton(radius);
General.Interface.RemoveButton(radiuslabel); General.Interface.RemoveButton(radiuslabel);
General.Interface.RemoveButton(toolStripSeparator1); General.Interface.RemoveButton(toolStripSeparator1);
General.Interface.RemoveButton(showguidelines);
General.Interface.RemoveButton(continuousdrawing); General.Interface.RemoveButton(continuousdrawing);
} }
@ -68,5 +73,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty);
} }
private void showguidelines_CheckedChanged(object sender, EventArgs e)
{
if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty);
}
} }
} }