Implement polyobject previews, clean up zoom tube & NiGHTS rendering

This commit is contained in:
spherallic 2023-05-01 20:08:25 +02:00
parent 65604bab03
commit 5c13cbb011
36 changed files with 416 additions and 134 deletions

View file

@ -727,7 +727,10 @@
<None Include="Resources\ZBLogo.png" />
<None Include="Resources\axis1.png" />
<None Include="Resources\ZB16.png" />
<None Include="Resources\polycenter.png" />
<Content Include="Resources\Snap1mp.png" />
<None Include="Resources\zoomtube.bmp" />
<None Include="Resources\zoomtube.png" />
<Content Include="ZB.ico" />
<None Include="Resources\zonebuilder.png" />
<None Include="Resources\ZoneBuilder.bmp" />

View file

@ -148,6 +148,8 @@ namespace CodeImp.DoomBuilder.Config
private bool fixedthingsscale; //mxd
private bool rendergrid;
private bool rendernightspath;
private bool renderzoomtubes;
private bool renderpolypreview;
private bool dynamicgridsize;
private int ignoredremoterevision;
private bool drawscreenshotinfo;
@ -283,6 +285,8 @@ namespace CodeImp.DoomBuilder.Config
public bool FixedThingsScale { get { return fixedthingsscale; } internal set { fixedthingsscale = value; } } //mxd
public bool RenderGrid { get { return rendergrid; } internal set { rendergrid = value; } } //mxd
public bool RenderNiGHTSPath { get { return rendernightspath; } internal set { rendernightspath = value; } }
public bool RenderZoomtubes { get { return renderzoomtubes; } internal set { renderzoomtubes = value; } }
public bool RenderPolyPreview { get { return renderpolypreview; } internal set { renderpolypreview = value; } }
public bool DynamicGridSize { get { return dynamicgridsize; } internal set { dynamicgridsize = value; } } //mxd
internal int IgnoredRemoteRevision { get { return ignoredremoterevision; } set { ignoredremoterevision = value; } } //mxd
public bool DrawScreenshotInfo { get { return drawscreenshotinfo; } set { drawscreenshotinfo = value; } }
@ -426,6 +430,8 @@ namespace CodeImp.DoomBuilder.Config
fixedthingsscale = cfg.ReadSetting("fixedthingsscale", false); //mxd
rendergrid = cfg.ReadSetting("rendergrid", true); //mxd
rendernightspath = cfg.ReadSetting("rendernightspath", true);
renderzoomtubes = cfg.ReadSetting("renderzoomtubes", true);
renderpolypreview = cfg.ReadSetting("renderpolypreview", true);
dynamicgridsize = cfg.ReadSetting("dynamicgridsize", true); //mxd
ignoredremoterevision = cfg.ReadSetting("ignoredremoterevision", 0); //mxd
drawscreenshotinfo = cfg.ReadSetting("drawscreenshotinfo", true);
@ -552,7 +558,9 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("rendercomments", rendercomments); //mxd
cfg.WriteSetting("fixedthingsscale", fixedthingsscale); //mxd
cfg.WriteSetting("rendergrid", rendergrid); //mxd
cfg.WriteSetting("rendernightspath", rendernightspath); //mxd
cfg.WriteSetting("rendernightspath", rendernightspath);
cfg.WriteSetting("renderzoomtubes", renderzoomtubes);
cfg.WriteSetting("renderpolypreview", renderpolypreview);
cfg.WriteSetting("dynamicgridsize", dynamicgridsize); //mxd
cfg.WriteSetting("ignoredremoterevision", ignoredremoterevision); //mxd
cfg.WriteSetting("drawscreenshotinfo", drawscreenshotinfo);

View file

@ -980,6 +980,16 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap polycenter {
get {
object obj = ResourceManager.GetObject("polycenter", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -1689,5 +1699,15 @@ namespace CodeImp.DoomBuilder.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap zoomtube {
get {
object obj = ResourceManager.GetObject("zoomtube", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -607,4 +607,10 @@
<data name="Snap1mp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Snap1mp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="polycenter" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\polycenter.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zoomtube" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zoomtube.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.Rendering
void PlotVerticesSet(ICollection<Vertex> vertices);
void RenderThing(Thing t, PixelColor c, float alpha);
void RenderThingSet(ICollection<Thing> things, float alpha);
void RenderNiGHTSPath();
void RenderSRB2Extras();
void RenderRectangle(RectangleF rect, float bordersize, PixelColor c, bool transformrect);
void RenderRectangleFilled(RectangleF rect, PixelColor c, bool transformrect);
void RenderRectangleFilled(RectangleF rect, PixelColor c, bool transformrect, ImageData texture);

View file

@ -28,6 +28,8 @@ using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.GZBuilder.Data; //mxd
using CodeImp.DoomBuilder.GZBuilder.Geometry; //mxd
using CodeImp.DoomBuilder.Config; //mxd
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
#endregion
@ -114,6 +116,17 @@ namespace CodeImp.DoomBuilder.Rendering
// Presentation
private Presentation present;
// SRB2 stuff
private List<Thing> axes;
private List<Thing> axistransferlines;
private List<Thing> waypoints;
private List<Thing> polyanchors;
private List<Thing> polyspawns;
private List<Linedef> firstlines;
private TextLabel spawnlabel;
private TextLabel anchorlabel;
#endregion
#region ================== Properties
@ -141,6 +154,26 @@ namespace CodeImp.DoomBuilder.Rendering
// Create rendertargets
CreateRendertargets();
anchorlabel = new TextLabel() // create sequence ID label
{
Text = "0",
AlignX = TextAlignmentX.Center,
AlignY = TextAlignmentY.Middle,
Color = General.Colors.GetNiGHTSColor(8),
BackColor = General.Colors.Background,
TransformCoords = true
};
spawnlabel = new TextLabel() // create sequence ID label
{
Text = "0",
AlignX = TextAlignmentX.Center,
AlignY = TextAlignmentY.Middle,
Color = General.Colors.GetNiGHTSColor(7),
BackColor = General.Colors.Background,
TransformCoords = true
};
// We have no destructor
GC.SuppressFinalize(this);
}
@ -1495,27 +1528,59 @@ namespace CodeImp.DoomBuilder.Rendering
}
public void RenderNiGHTSPath()
public void RenderSRB2Extras()
{
if (!General.Settings.RenderNiGHTSPath) return;
if (!(General.Settings.RenderNiGHTSPath || General.Settings.RenderZoomtubes || General.Settings.RenderPolyPreview)) return;
ICollection<Thing> things = General.Map.Map.Things;
List<Thing> axes = new List<Thing>();
List<Thing> axistransferlines = new List<Thing>();
List<Thing> waypoints = new List<Thing>();
axes = new List<Thing>();
axistransferlines = new List<Thing>();
waypoints = new List<Thing>();
polyanchors = new List<Thing>();
polyspawns = new List<Thing>();
firstlines = new List<Linedef>();
// Collect relevant things
foreach (Thing t in things)
{
int type = t.Type;
if (type == General.Map.FormatInterface.AxisType) axes.Add(t);
if (type == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t);
if (type == General.Map.FormatInterface.WaypointType) waypoints.Add(t);
if (General.Settings.RenderNiGHTSPath && type == General.Map.FormatInterface.AxisType)
axes.Add(t);
if (General.Settings.RenderNiGHTSPath && type == General.Map.FormatInterface.AxisTransferLineType)
axistransferlines.Add(t);
if (General.Settings.RenderZoomtubes && type == General.Map.FormatInterface.WaypointType)
waypoints.Add(t);
if (General.Settings.RenderPolyPreview && type == 760)
polyanchors.Add(t);
if (General.Settings.RenderPolyPreview && (type == 761 || type == 762))
polyspawns.Add(t);
}
//Sort waypoints by angle
waypoints.Sort((x,y) => (x.AngleDoom.CompareTo(y.AngleDoom)));
waypoints.Sort((x, y) => (x.AngleDoom.CompareTo(y.AngleDoom)));
// Sort polyobject stuff by "angle"/tag
polyanchors.Sort((x, y) => (x.AngleDoom.CompareTo(y.AngleDoom)));
polyspawns.Sort((x, y) => (x.AngleDoom.CompareTo(y.AngleDoom)));
//Sort by axis number and mare number.
axistransferlines.Sort((x, y) => (x.GetFlagsValue() | (x.Parameter)<<16).CompareTo((y.GetFlagsValue() | (y.Parameter) << 16)));
axistransferlines.Sort((x, y) => (x.GetFlagsValue() | (x.Parameter) << 16).CompareTo((y.GetFlagsValue() | (y.Parameter) << 16)));
// Collect relevant lines
if (General.Settings.RenderPolyPreview)
{
foreach (Linedef l in General.Map.Map.Linedefs)
{
if (l.Action == 20) firstlines.Add(l);
}
//Sort polyobject first lines by tag
firstlines.Sort((x, y) => (x.Tag.CompareTo(y.Tag)));
}
//Render (zoom tube) waypoint sequences.
if (General.Settings.RenderZoomtubes)
{
int i = 0;
int size = waypoints.Count;
int seqStart = 0;
@ -1562,10 +1627,13 @@ namespace CodeImp.DoomBuilder.Rendering
for (i = 0; i < 256; i++)
if (sequencelabels[i] != null) RenderText(sequencelabels[i]);
}
//Render axis transfer lines.
i = 0;
size = axistransferlines.Count;
if (General.Settings.RenderNiGHTSPath)
{
int i = 0;
int size = axistransferlines.Count;
while (i < size - 1)
{
int iNext = i;
@ -1591,6 +1659,68 @@ namespace CodeImp.DoomBuilder.Rendering
RenderCircle(axis.Position, (float)(axis.AngleDoom & 0x3FFF), 1f, General.Colors.GetNiGHTSColor(mare), true);
}
}
if (General.Settings.RenderPolyPreview)
{
int i = 0, j = 0, k = 0;
Sector s = null;
while (i < polyanchors.Count && j < polyspawns.Count && k < firstlines.Count)
{
while (j + 1 < polyspawns.Count && polyanchors[i].AngleDoom > polyspawns[j].AngleDoom) j++;
while (k + 1 < firstlines.Count && polyanchors[i].AngleDoom > firstlines[k].Tag) k++;
if (polyanchors[i].AngleDoom == firstlines[k].Tag)
s = firstlines[k].Back.Sector;
else
s = null;
if (polyanchors[i].AngleDoom == polyspawns[j].AngleDoom && s != null)
{
while (j + 1 < polyspawns.Count && polyspawns[j].AngleDoom == polyspawns[j + 1].AngleDoom)
{
// Mark redundant spawnpoints
spawnlabel.Text = polyspawns[j].AngleDoom.ToString();
spawnlabel.Location = polyspawns[j].Position;
spawnlabel.Color = PixelColor.FromColor(Color.Red);
RenderText(spawnlabel);
j++;
}
float xdiff = polyanchors[i].Position.x - polyspawns[j].Position.x;
float ydiff = polyanchors[i].Position.y - polyspawns[j].Position.y;
foreach (Sidedef side in s.Sidedefs)
{
Vector2D start = side.Line.Start.Position;
Vector2D end = side.Line.End.Position;
start.x -= xdiff;
start.y -= ydiff;
end.x -= xdiff;
end.y -= ydiff;
RenderLine(start, end, 1.0f, General.Colors.GetNiGHTSColor(7), true);
}
anchorlabel.Color = General.Colors.GetNiGHTSColor(8);
spawnlabel.Color = General.Colors.GetNiGHTSColor(7);
spawnlabel.Text = polyspawns[j].AngleDoom.ToString();
spawnlabel.Location = polyspawns[j].Position;
RenderText(spawnlabel);
}
else
{
// Mark unused polyobject anchors
anchorlabel.Color = PixelColor.FromColor(Color.Red);
}
anchorlabel.Text = polyanchors[i].AngleDoom.ToString();
anchorlabel.Location = polyanchors[i].Position;
RenderText(anchorlabel);
i++;
}
}
}
#endregion
#region ================== Surface

View file

@ -405,12 +405,31 @@ togglegrid
default = 262215; //Alt-G
}
//mxd
togglenightspath
{
title = "Toggle Waypoint and NiGHTS Paths";
title = "Toggle NiGHTS Paths";
category = "classic";
description = "Toggles (zoom tube) waypoint and NiGHTS path rendering in classic modes.";
description = "Toggles NiGHTS path rendering in classic modes.";
allowkeys = true;
allowmouse = false;
allowscroll = false;
}
togglezoomtubes
{
title = "Toggle Zoom Tube Waypoint Paths";
category = "classic";
description = "Toggles zoom tube waypoint path rendering in classic modes.";
allowkeys = true;
allowmouse = false;
allowscroll = false;
}
togglepolypreview
{
title = "Toggle Polyobject Preview";
category = "classic";
description = "Toggles polyobject previews in classic modes.";
allowkeys = true;
allowmouse = false;
allowscroll = false;

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

View file

@ -211,6 +211,8 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsplitjoinedsectors = new System.Windows.Forms.ToolStripButton();
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton();
this.buttontogglezoomtubes = new System.Windows.Forms.ToolStripButton();
this.buttontogglepolypreview = new System.Windows.Forms.ToolStripButton();
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton();
this.sightsdontshow = new System.Windows.Forms.ToolStripMenuItem();
@ -284,6 +286,8 @@ namespace CodeImp.DoomBuilder.Windows
this.itemtogglefixedthingsscale = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynamicgridsize = new System.Windows.Forms.ToolStripMenuItem();
this.itemrendernightspath = new System.Windows.Forms.ToolStripMenuItem();
this.itemrenderzoomtubes = new System.Windows.Forms.ToolStripMenuItem();
this.itemrenderpolypreview = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
@ -803,6 +807,8 @@ namespace CodeImp.DoomBuilder.Windows
this.itemfullbrightness,
this.itemtogglegrid,
this.itemrendernightspath,
this.itemrenderzoomtubes,
this.itemrenderpolypreview,
this.itemtogglecomments,
this.itemtogglefixedthingsscale,
this.separatorrendering,
@ -1366,6 +1372,8 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsplitjoinedsectors,
this.buttonautoclearsidetextures,
this.buttontogglenightspath,
this.buttontogglezoomtubes,
this.buttontogglepolypreview,
this.seperatorgeometry,
this.dynamiclightmode,
this.modelrendermode,
@ -1831,8 +1839,36 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglenightspath.Name = "buttontogglenightspath";
this.buttontogglenightspath.Size = new System.Drawing.Size(23, 22);
this.buttontogglenightspath.Tag = "builder_togglenightspath";
this.buttontogglenightspath.Text = "Show Waypoint and NiGHTS Paths";
this.buttontogglenightspath.Text = "Show NiGHTS Paths";
this.buttontogglenightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglezoomtubes
//
this.buttontogglezoomtubes.Checked = true;
this.buttontogglezoomtubes.CheckOnClick = true;
this.buttontogglezoomtubes.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglezoomtubes.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglezoomtubes.Image = global::CodeImp.DoomBuilder.Properties.Resources.zoomtube;
this.buttontogglezoomtubes.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglezoomtubes.Name = "buttontogglezoomtubes";
this.buttontogglezoomtubes.Size = new System.Drawing.Size(23, 22);
this.buttontogglezoomtubes.Tag = "builder_togglezoomtubes";
this.buttontogglezoomtubes.Text = "Show Zoom Tube Waypoint Paths";
this.buttontogglezoomtubes.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglepolypreview
//
this.buttontogglepolypreview.Checked = true;
this.buttontogglepolypreview.CheckOnClick = true;
this.buttontogglepolypreview.CheckState = System.Windows.Forms.CheckState.Checked;
this.buttontogglepolypreview.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglepolypreview.Image = global::CodeImp.DoomBuilder.Properties.Resources.polycenter;
this.buttontogglepolypreview.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglepolypreview.Name = "buttontogglepolypreview";
this.buttontogglepolypreview.Size = new System.Drawing.Size(23, 22);
this.buttontogglepolypreview.Tag = "builder_togglepolypreview";
this.buttontogglepolypreview.Text = "Show Polyobject Previews";
this.buttontogglepolypreview.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorfullbrightness
//
@ -2785,8 +2821,32 @@ namespace CodeImp.DoomBuilder.Windows
this.itemrendernightspath.Name = "itemrendernightspath";
this.itemrendernightspath.Size = new System.Drawing.Size(215, 22);
this.itemrendernightspath.Tag = "builder_togglenightspath";
this.itemrendernightspath.Text = "Show Waypoint and NiGHTS Paths";
this.itemrendernightspath.Text = "Show NiGHTS Paths";
this.itemrendernightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemrenderzoomtubes
//
this.itemrenderzoomtubes.Checked = true;
this.itemrenderzoomtubes.CheckOnClick = true;
this.itemrenderzoomtubes.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemrenderzoomtubes.Image = global::CodeImp.DoomBuilder.Properties.Resources.zoomtube;
this.itemrenderzoomtubes.Name = "itemrenderzoomtubes";
this.itemrenderzoomtubes.Size = new System.Drawing.Size(215, 22);
this.itemrenderzoomtubes.Tag = "builder_togglezoomtubes";
this.itemrenderzoomtubes.Text = "Show Zoom Tube Waypoint Paths";
this.itemrenderzoomtubes.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemrenderpolypreview
//
this.itemrenderpolypreview.Checked = true;
this.itemrenderpolypreview.CheckOnClick = true;
this.itemrenderpolypreview.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemrenderpolypreview.Image = global::CodeImp.DoomBuilder.Properties.Resources.polycenter;
this.itemrenderpolypreview.Name = "itemrenderpolypreview";
this.itemrenderpolypreview.Size = new System.Drawing.Size(215, 22);
this.itemrenderpolypreview.Tag = "builder_togglepolypreview";
this.itemrenderpolypreview.Text = "Show Polyobject Previews";
this.itemrenderpolypreview.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MainForm
//
@ -3071,8 +3131,12 @@ namespace CodeImp.DoomBuilder.Windows
private ToolStripButton buttontogglegrid;
private ToolStripButton buttontoggledynamicgrid;
private ToolStripButton buttontogglenightspath;
private ToolStripButton buttontogglezoomtubes;
private ToolStripButton buttontogglepolypreview;
private ToolStripMenuItem itemdynamicgridsize;
private ToolStripMenuItem itemrendernightspath;
private ToolStripMenuItem itemrenderzoomtubes;
private ToolStripMenuItem itemrenderpolypreview;
private ToolStripMenuItem itemtogglecomments;
private ToolStripMenuItem itemtogglefixedthingsscale;
private ToolStripMenuItem itemdosnapto1mp;

View file

@ -2034,6 +2034,10 @@ namespace CodeImp.DoomBuilder.Windows
buttontogglegrid.Checked = General.Settings.RenderGrid; //mxd
itemrendernightspath.Visible = maploaded && General.Map.SRB2;
itemrendernightspath.Checked = General.Settings.RenderNiGHTSPath;
itemrenderzoomtubes.Visible = maploaded && General.Map.SRB2;
itemrenderzoomtubes.Checked = General.Settings.RenderZoomtubes;
itemrenderpolypreview.Visible = maploaded && General.Map.SRB2;
itemrenderpolypreview.Checked = General.Settings.RenderPolyPreview;
buttontogglecomments.Visible = General.Settings.ToolbarViewModes && maploaded && General.Map.UDMF; //mxd
buttontogglecomments.Checked = General.Settings.RenderComments; //mxd
buttontogglefixedthingsscale.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
@ -2052,6 +2056,10 @@ namespace CodeImp.DoomBuilder.Windows
buttontoggledynamicgrid.Checked = General.Settings.DynamicGridSize; //mxd
buttontogglenightspath.Visible = maploaded && General.Map.SRB2;
buttontogglenightspath.Checked = General.Settings.RenderNiGHTSPath;
buttontogglezoomtubes.Visible = maploaded && General.Map.SRB2;
buttontogglezoomtubes.Checked = General.Settings.RenderZoomtubes;
buttontogglepolypreview.Visible = maploaded && General.Map.SRB2;
buttontogglepolypreview.Checked = General.Settings.RenderPolyPreview;
buttonautomerge.Visible = General.Settings.ToolbarGeometry && maploaded;
buttonsplitjoinedsectors.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd
buttonsplitjoinedsectors.Checked = General.Settings.SplitJoinedSectors; //mxd
@ -2889,6 +2897,30 @@ namespace CodeImp.DoomBuilder.Windows
General.Interface.RedrawDisplay();
}
[BeginAction("togglezoomtubes")]
protected void ToggleZoomtubes()
{
General.Settings.RenderZoomtubes = !General.Settings.RenderZoomtubes;
itemrenderzoomtubes.Checked = General.Settings.RenderZoomtubes;
buttontogglezoomtubes.Checked = General.Settings.RenderZoomtubes;
General.Interface.DisplayStatus(StatusType.Action, "Zoom tube waypoint path rendering is " + (General.Settings.RenderZoomtubes ? "ENABLED" : "DISABLED"));
// Redraw display to show changes
General.Interface.RedrawDisplay();
}
[BeginAction("togglepolypreview")]
protected void TogglePolyPreview()
{
General.Settings.RenderPolyPreview = !General.Settings.RenderPolyPreview;
itemrenderpolypreview.Checked = General.Settings.RenderPolyPreview;
buttontogglepolypreview.Checked = General.Settings.RenderPolyPreview;
General.Interface.DisplayStatus(StatusType.Action, "Polyobject previews are " + (General.Settings.RenderPolyPreview ? "ENABLED" : "DISABLED"));
// Redraw display to show changes
General.Interface.RedrawDisplay();
}
//mxd
[BeginAction("toggledynamicgrid")]
protected void ToggleDynamicGrid()

View file

@ -373,7 +373,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -340,7 +340,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -129,7 +129,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}
}
@ -163,7 +163,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -148,7 +148,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}
}
@ -183,7 +183,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -316,7 +316,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
// Draw the dragged item highlighted
// This is important to know, because this item is used

View file

@ -118,7 +118,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}
}
@ -152,7 +152,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -876,7 +876,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -1796,7 +1796,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
if(highlighted is Thing) renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -137,7 +137,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
//foreach(ErrorResult result in selection) result.RenderThingsSelection(renderer); //mxd
renderer.Finish();
}

View file

@ -142,7 +142,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
if (BuilderPlug.Me.FindReplaceForm.Finder != null)
BuilderPlug.Me.FindReplaceForm.Finder.RenderThingsSelection(renderer, selection);
renderer.Finish();

View file

@ -877,7 +877,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -228,7 +228,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -677,7 +677,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -344,7 +344,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -386,7 +386,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -358,7 +358,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -417,7 +417,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -931,7 +931,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -249,7 +249,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
float alpha = (General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); //mxd
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, alpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
if((highlighted != null) && !highlighted.IsDisposed)
{

View file

@ -460,7 +460,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -875,7 +875,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
renderer.Finish();
}

View file

@ -308,7 +308,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.InactiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
lock (BuilderPlug.Me.SoundEnvironments)
{

View file

@ -278,7 +278,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.InactiveThingsAlpha);
renderer.RenderNiGHTSPath();
renderer.RenderSRB2Extras();
foreach (Thing thing in huntingThings)
{
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);