Added Rendering toolbar items to the View menu.

Merged "Toggle models, dynamic lights and fog rendering" and "Toggle Geometry Effects" actions into "Toggle Enhanced Rendering Effects" action.
Removed "Dynamic light size" and "Dynamic light intensity" settings.
Updated documentation ("Rendering toolbar" page).
This commit is contained in:
MaxED 2016-09-07 15:15:07 +00:00
parent 8333cab783
commit c9f125aade
19 changed files with 357 additions and 293 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -19,16 +19,16 @@
<div id="contents">
<img src="menu_renderingtoolbar.jpg" />
<p>The Rendering toolbar allows you to toggle several GZDoom Builder's features:</p>
<p>The <strong>Rendering toolbar</strong> allows you to toggle several enhanced rendering features:</p>
<ol>
<li>Toggles models, dynamic lights and fog rendering in Visual mode.</li>
<li>Toggles between available dynamic lights rendering modes in Visual mode.</li>
<li>Toggles between available model rendering modes.</li>
<li>Toggles fog rendering in Visual mode.</li>
<li>Allows to select dynamic lights rendering mode used in <a href="../../../e_visual.html">Visual mode</a>.</li>
<li>Allows to select model rendering mode.</li>
<li>Toggles fog rendering in <a href="../../../e_visual.html">Visual mode</a>.</li>
<li>Toggles sky rendering in <a href="../../../e_visual.html">Visual mode</a>.</li>
<li>Toggles <a href="../all_modes/event_lines.html">Event lines</a>.</li>
<li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in Visual mode (UDMF only).</li>
<li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in <a href="../../../e_visual.html">Visual mode</a> (UDMF only).</li>
</ol>
<p>Most of these settings can also be toggled using actions from &quot;<strong>Rendering</strong>&quot; category.<br />
You can toggle currently enabled rendering effects using &quot;<strong>Toggle GZDoom effects</strong>&quot; action.</p>
<p>Most of these settings can also be toggled using actions found in &quot;<strong>Rendering</strong>&quot; category or appropriate <strong>View menu</strong> items.<br />
You can toggle rendering effects using &quot;<strong>Toggle Enhanced Effects</strong>&quot; action.</p>
</div>
</body>

View file

@ -1145,7 +1145,6 @@
<Content Include="Resources\DB2.ico" />
<None Include="Resources\GZDB2.ico" />
<None Include="Resources\fog.png" />
<None Include="Resources\fx.png" />
<None Include="Resources\GZDB_Logo_small.png" />
<None Include="Resources\InfoLine.png" />
<None Include="Resources\Keyboard.png" />

View file

@ -124,8 +124,6 @@ namespace CodeImp.DoomBuilder.Config
private bool gzShowEventLines;
private bool gzOldHighlightMode;
private int gzMaxDynamicLights;
private float gzDynamicLightRadius;
private float gzDynamicLightIntensity;
private bool gzStretchView;
private float gzVertexScale2D;
private bool gzShowVisualVertices;
@ -133,7 +131,7 @@ namespace CodeImp.DoomBuilder.Config
private string lastUsedConfigName;
private string lastUsedMapFolder;
private bool gzMarkExtraFloors;
private bool gzdoomrenderingeffects = true; //mxd
private bool enhancedrenderingeffects = true; //mxd
private int maxRecentFiles;
private bool autoClearSideTextures;
private bool storeSelectedEditTab;
@ -250,8 +248,6 @@ namespace CodeImp.DoomBuilder.Config
public bool GZShowEventLines { get { return gzShowEventLines; } internal set { gzShowEventLines = value; } }
public bool GZOldHighlightMode { get { return gzOldHighlightMode; } internal set { gzOldHighlightMode = value; } }
public int GZMaxDynamicLights { get { return gzMaxDynamicLights; } internal set { gzMaxDynamicLights = value; } }
public float GZDynamicLightRadius { get { return gzDynamicLightRadius; } internal set { gzDynamicLightRadius = value; } }
public float GZDynamicLightIntensity { get { return gzDynamicLightIntensity; } internal set { gzDynamicLightIntensity = value; } }
public bool GZStretchView { get { return gzStretchView; } internal set { gzStretchView = value; } }
public float GZVertexScale2D { get { return gzVertexScale2D; } internal set { gzVertexScale2D = value; } }
public bool GZShowVisualVertices { get { return gzShowVisualVertices; } internal set { gzShowVisualVertices = value; } }
@ -259,7 +255,7 @@ namespace CodeImp.DoomBuilder.Config
public string LastUsedConfigName { get { return lastUsedConfigName; } internal set { lastUsedConfigName = value; } }
public string LastUsedMapFolder { get { return lastUsedMapFolder; } internal set { lastUsedMapFolder = value; } }
public bool GZMarkExtraFloors { get { return gzMarkExtraFloors; } internal set { gzMarkExtraFloors = value; } }
public bool GZDoomRenderingEffects { get { return gzdoomrenderingeffects; } set { gzdoomrenderingeffects = value; } } //mxd
public bool EnhancedRenderingEffects { get { return enhancedrenderingeffects; } set { enhancedrenderingeffects = value; } } //mxd
public int MaxRecentFiles { get { return maxRecentFiles; } internal set { maxRecentFiles = General.Clamp(value, 8, 25); } }
public bool AutoClearSidedefTextures { get { return autoClearSideTextures; } internal set { autoClearSideTextures = value; } }
public bool StoreSelectedEditTab { get { return storeSelectedEditTab; } internal set { storeSelectedEditTab = value; } }
@ -387,8 +383,6 @@ namespace CodeImp.DoomBuilder.Config
gzShowEventLines = cfg.ReadSetting("gzshoweventlines", true);
gzOldHighlightMode = cfg.ReadSetting("gzoldhighlightmode", false);
gzMaxDynamicLights = cfg.ReadSetting("gzmaxdynamiclights", 16);
gzDynamicLightRadius = cfg.ReadSetting("gzdynamiclightradius", 1.0f);
gzDynamicLightIntensity = cfg.ReadSetting("gzdynamiclightintensity", 1.0f);
gzStretchView = cfg.ReadSetting("gzstretchview", true);
gzVertexScale2D = cfg.ReadSetting("gzvertexscale2d", 1.0f);
gzShowVisualVertices = cfg.ReadSetting("gzshowvisualvertices", true);
@ -505,8 +499,6 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("gzoldhighlightmode", gzOldHighlightMode);
cfg.WriteSetting("gztoolbargzdoom", gzToolbarGZDoom);
cfg.WriteSetting("gzmaxdynamiclights", gzMaxDynamicLights);
cfg.WriteSetting("gzdynamiclightradius", gzDynamicLightRadius);
cfg.WriteSetting("gzdynamiclightintensity", gzDynamicLightIntensity);
cfg.WriteSetting("gzstretchview", gzStretchView);
cfg.WriteSetting("gzvertexscale2d", gzVertexScale2D);
cfg.WriteSetting("gzshowvisualvertices", gzShowVisualVertices);

View file

@ -1827,63 +1827,6 @@ namespace CodeImp.DoomBuilder
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglefog")]
internal void ToggleFog()
{
General.Settings.GZDrawFog = !General.Settings.GZDrawFog;
General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglesky")]
internal void ToggleSky()
{
General.Settings.GZDrawSky = !General.Settings.GZDrawSky;
General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglefx")]
internal void ToggleFx()
{
int on = 0;
on += General.Settings.GZDrawFog ? 1 : -1;
on += General.Settings.GZDrawSky ? 1 : -1;
on += General.Settings.GZDrawLightsMode != LightRenderMode.NONE ? 1 : -1;
on += General.Settings.GZDrawModelsMode != ModelRenderMode.NONE ? 1 : -1;
bool enable = (on < 0);
General.Settings.GZDrawFog = enable;
General.Settings.GZDrawSky = enable;
General.Settings.GZDrawLightsMode = (enable ? LightRenderMode.ALL : LightRenderMode.NONE);
General.Settings.GZDrawModelsMode = (enable ? ModelRenderMode.ALL : ModelRenderMode.NONE);
General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztoggleeventlines")]
internal void ToggleEventLines()
{
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglevisualvertices")]
internal void ToggleVisualVertices()
{
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gzreloadmodeldef")]
internal void ReloadModeldef()
{

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5485
// Runtime Version:2.0.50727.5466
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -347,13 +347,6 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap fx {
get {
object obj = ResourceManager.GetObject("fx", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Grid2 {
get {
object obj = ResourceManager.GetObject("Grid2", resourceCulture);

View file

@ -271,9 +271,6 @@
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fx" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fx.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mergegeometry2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View file

@ -1247,17 +1247,6 @@ gztogglesky
allowscroll = false;
}
gztogglefx
{
title = "Toggle models, dynamic lights and fog rendering";
category = "gzdoombuilder";
description = "This is a combo action, which toggles models, dynamic lights and fog rendering.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 20; // CapsLock
}
gztoggleeventlines
{
title = "Toggle Event lines";
@ -1280,6 +1269,17 @@ gztogglevisualvertices
default = 262230;
}
gztoggleenhancedrendering
{
title = "Toggle Enhanced Rendering Effects";
category = "visual";
description = "Toggles enhanced rendering effects (slopes, 3D-floors, dynamic lights, fog, sky etc.) in Visual mode.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 9; //Tab
}
//////////////////////////////
//GZDOOMBUILDER MENU ACTIONS//
//////////////////////////////

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

View file

@ -37,6 +37,8 @@ namespace CodeImp.DoomBuilder.VisualModes
#region ================== Constants
protected const int FIXED_RADIUS = 8; //mxd. Used to render things with zero width and radius
private const float DYNLIGHT_INTENSITY_SCALER = 255.0f;
private const float SUBLIGHT_INTENSITY_SCALER = 255.0f * 1.5f; // Scaler for subtractive dynamic lights
#endregion
@ -652,8 +654,6 @@ namespace CodeImp.DoomBuilder.VisualModes
//mxd. Update light info
private void UpdateLight(int lightId)
{
float scaled_intensity = 255.0f / General.Settings.GZDynamicLightIntensity;
if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[2]) //if it's gzdoom light
{
int n;
@ -662,19 +662,28 @@ namespace CodeImp.DoomBuilder.VisualModes
n = 0;
lightRenderStyle = DynamicLightRenderStyle.NORMAL;
//lightColor.Alpha used in shader to perform some calculations based on light type
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2);
lightColor = new Color4((float)lightRenderStyle / 100.0f,
thing.Args[0] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[1] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[2] / DYNLIGHT_INTENSITY_SCALER);
}
else if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1])
{
n = 10;
lightRenderStyle = DynamicLightRenderStyle.ADDITIVE;
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2);
lightColor = new Color4((float)lightRenderStyle / 100.0f,
thing.Args[0] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[1] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[2] / DYNLIGHT_INTENSITY_SCALER);
}
else
{
n = 20;
lightRenderStyle = DynamicLightRenderStyle.NEGATIVE;
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 3, thing.Args[1] / scaled_intensity / 3, thing.Args[2] / scaled_intensity / 3);
lightColor = new Color4((float)lightRenderStyle / 100.0f,
thing.Args[0] / SUBLIGHT_INTENSITY_SCALER,
thing.Args[1] / SUBLIGHT_INTENSITY_SCALER,
thing.Args[2] / SUBLIGHT_INTENSITY_SCALER);
}
lightType = (DynamicLightType)(thing.Type - 9800 - n);
@ -682,12 +691,12 @@ namespace CodeImp.DoomBuilder.VisualModes
{
int scaler = 1;
if(thing.Sector != null) scaler = thing.Sector.Brightness / 4;
lightPrimaryRadius = (thing.Args[3] * scaler) * General.Settings.GZDynamicLightRadius;
lightPrimaryRadius = (thing.Args[3] * scaler);
}
else
{
lightPrimaryRadius = (thing.Args[3] * 2) * General.Settings.GZDynamicLightRadius; //works... that.. way in GZDoom
if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2) * General.Settings.GZDynamicLightRadius;
lightPrimaryRadius = (thing.Args[3] * 2); //works... that.. way in GZDoom
if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2);
}
}
else //it's one of vavoom lights
@ -695,10 +704,18 @@ namespace CodeImp.DoomBuilder.VisualModes
lightRenderStyle = DynamicLightRenderStyle.VAVOOM;
lightType = (DynamicLightType)thing.Type;
if(lightType == DynamicLightType.VAVOOM_COLORED)
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2, thing.Args[3] / scaled_intensity / 2);
{
lightColor = new Color4((float)lightRenderStyle / 100.0f,
thing.Args[1] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[2] / DYNLIGHT_INTENSITY_SCALER,
thing.Args[3] / DYNLIGHT_INTENSITY_SCALER);
}
else
lightColor = new Color4((float)lightRenderStyle / 100.0f, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2);
lightPrimaryRadius = (thing.Args[0] * 8) * General.Settings.GZDynamicLightRadius;
{
lightColor = new Color4((float)lightRenderStyle / 100.0f, 0.5f, 0.5f, 0.5f);
}
lightPrimaryRadius = (thing.Args[0] * 8);
}
UpdateLightRadius();
@ -708,12 +725,10 @@ namespace CodeImp.DoomBuilder.VisualModes
private void UpdateGldefsLight()
{
DynamicLightData light = General.Map.Data.GldefsEntries[thing.Type];
float intensity_mod = General.Settings.GZDynamicLightIntensity;
float scale_mod = General.Settings.GZDynamicLightRadius;
//apply settings
lightRenderStyle = light.Subtractive ? DynamicLightRenderStyle.NEGATIVE : DynamicLightRenderStyle.NORMAL;
lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red * intensity_mod, light.Color.Green * intensity_mod, light.Color.Blue * intensity_mod);
lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red, light.Color.Green, light.Color.Blue);
Vector2D o = new Vector2D(light.Offset.X, light.Offset.Y).GetRotated(thing.Angle - Angle2D.PIHALF);
lightOffset = new Vector3(o.x, o.y, light.Offset.Z);
lightType = light.Type;
@ -724,8 +739,8 @@ namespace CodeImp.DoomBuilder.VisualModes
}
else
{
lightPrimaryRadius = light.PrimaryRadius * scale_mod;
lightSecondaryRadius = light.SecondaryRadius * scale_mod;
lightPrimaryRadius = light.PrimaryRadius;
lightSecondaryRadius = light.SecondaryRadius;
}
lightInterval = light.Interval;

View file

@ -177,6 +177,20 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonlinededfcolors = new System.Windows.Forms.ToolStripButton();
this.linedefcolorpresets = new System.Windows.Forms.ToolStripDropDownButton();
this.separatorfilters = new System.Windows.Forms.ToolStripSeparator();
this.separatorrendering = new System.Windows.Forms.ToolStripSeparator();
this.itemdynlightmodes = new System.Windows.Forms.ToolStripMenuItem();
this.itemnodynlights = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynlights = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynlightsanim = new System.Windows.Forms.ToolStripMenuItem();
this.itemmodelmodes = new System.Windows.Forms.ToolStripMenuItem();
this.itemnomdl = new System.Windows.Forms.ToolStripMenuItem();
this.itemselmdl = new System.Windows.Forms.ToolStripMenuItem();
this.itemfiltermdl = new System.Windows.Forms.ToolStripMenuItem();
this.itemallmdl = new System.Windows.Forms.ToolStripMenuItem();
this.itemtogglefog = new System.Windows.Forms.ToolStripMenuItem();
this.itemtogglesky = new System.Windows.Forms.ToolStripMenuItem();
this.itemtoggleeventlines = new System.Windows.Forms.ToolStripMenuItem();
this.itemtogglevisualverts = new System.Windows.Forms.ToolStripMenuItem();
this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton();
this.buttontogglegrid = new System.Windows.Forms.ToolStripButton();
this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton();
@ -197,7 +211,6 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsplitjoinedsectors = new System.Windows.Forms.ToolStripButton();
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton();
this.sightsdontshow = new System.Windows.Forms.ToolStripMenuItem();
this.lightsshow = new System.Windows.Forms.ToolStripMenuItem();
@ -769,6 +782,13 @@ namespace CodeImp.DoomBuilder.Windows
this.itemtogglegrid,
this.itemtogglecomments,
this.itemtogglefixedthingsscale,
this.separatorrendering,
this.itemdynlightmodes,
this.itemmodelmodes,
this.itemtogglefog,
this.itemtogglesky,
this.itemtoggleeventlines,
this.itemtogglevisualverts,
this.toolStripSeparator4,
this.menuzoom,
this.itemgotocoords,
@ -1323,7 +1343,6 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsplitjoinedsectors,
this.buttonautoclearsidetextures,
this.seperatorgeometry,
this.buttontogglefx,
this.dynamiclightmode,
this.modelrendermode,
this.buttontogglefog,
@ -1612,6 +1631,144 @@ namespace CodeImp.DoomBuilder.Windows
this.separatorfilters.Name = "separatorfilters";
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
//
// separatorrendering
//
this.separatorrendering.Name = "separatorrendering";
this.separatorrendering.Size = new System.Drawing.Size(270, 6);
//
// itemdynlightmodes
//
this.itemdynlightmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.itemnodynlights,
this.itemdynlights,
this.itemdynlightsanim});
this.itemdynlightmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
this.itemdynlightmodes.Name = "itemdynlightmodes";
this.itemdynlightmodes.Size = new System.Drawing.Size(273, 22);
this.itemdynlightmodes.Text = "Dynamic light rendering mode";
//
// itemnodynlights
//
this.itemnodynlights.CheckOnClick = true;
this.itemnodynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.LightDisabled;
this.itemnodynlights.Name = "itemnodynlights";
this.itemnodynlights.Size = new System.Drawing.Size(237, 22);
this.itemnodynlights.Tag = 0;
this.itemnodynlights.Text = "Don\'t show dynamic lights";
this.itemnodynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode);
//
// itemdynlights
//
this.itemdynlights.CheckOnClick = true;
this.itemdynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
this.itemdynlights.Name = "itemdynlights";
this.itemdynlights.Size = new System.Drawing.Size(237, 22);
this.itemdynlights.Tag = 1;
this.itemdynlights.Text = "Show dynamic lights";
this.itemdynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode);
//
// itemdynlightsanim
//
this.itemdynlightsanim.CheckOnClick = true;
this.itemdynlightsanim.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate;
this.itemdynlightsanim.Name = "itemdynlightsanim";
this.itemdynlightsanim.Size = new System.Drawing.Size(237, 22);
this.itemdynlightsanim.Tag = 2;
this.itemdynlightsanim.Text = "Show animated dynamic lights";
this.itemdynlightsanim.Click += new System.EventHandler(this.ChangeLightRenderingMode);
//
// itemmodelmodes
//
this.itemmodelmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.itemnomdl,
this.itemselmdl,
this.itemfiltermdl,
this.itemallmdl});
this.itemmodelmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
this.itemmodelmodes.Name = "itemmodelmodes";
this.itemmodelmodes.Size = new System.Drawing.Size(273, 22);
this.itemmodelmodes.Text = "Model rendering mode";
//
// itemnomdl
//
this.itemnomdl.CheckOnClick = true;
this.itemnomdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelDisabled;
this.itemnomdl.Name = "itemnomdl";
this.itemnomdl.Size = new System.Drawing.Size(298, 22);
this.itemnomdl.Tag = 0;
this.itemnomdl.Text = "Don\'t show models";
this.itemnomdl.Click += new System.EventHandler(this.ChangeModelRenderingMode);
//
// itemselmdl
//
this.itemselmdl.CheckOnClick = true;
this.itemselmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model_selected;
this.itemselmdl.Name = "itemselmdl";
this.itemselmdl.Size = new System.Drawing.Size(298, 22);
this.itemselmdl.Tag = 1;
this.itemselmdl.Text = "Show models for selected Things only";
this.itemselmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode);
//
// itemfiltermdl
//
this.itemfiltermdl.CheckOnClick = true;
this.itemfiltermdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelFiltered;
this.itemfiltermdl.Name = "itemfiltermdl";
this.itemfiltermdl.Size = new System.Drawing.Size(298, 22);
this.itemfiltermdl.Tag = 2;
this.itemfiltermdl.Text = "Show models for current Things Filter only";
this.itemfiltermdl.Click += new System.EventHandler(this.ChangeModelRenderingMode);
//
// itemallmdl
//
this.itemallmdl.CheckOnClick = true;
this.itemallmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
this.itemallmdl.Name = "itemallmdl";
this.itemallmdl.Size = new System.Drawing.Size(298, 22);
this.itemallmdl.Tag = 3;
this.itemallmdl.Text = "Always show models";
this.itemallmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode);
//
// itemfog
//
this.itemtogglefog.CheckOnClick = true;
this.itemtogglefog.Image = global::CodeImp.DoomBuilder.Properties.Resources.fog;
this.itemtogglefog.Name = "itemtogglefog";
this.itemtogglefog.Size = new System.Drawing.Size(273, 22);
this.itemtogglefog.Tag = "builder_gztogglefog";
this.itemtogglefog.Text = "Render fog (Visual mode)";
this.itemtogglefog.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemsky
//
this.itemtogglesky.CheckOnClick = true;
this.itemtogglesky.Image = global::CodeImp.DoomBuilder.Properties.Resources.Sky;
this.itemtogglesky.Name = "itemtogglesky";
this.itemtogglesky.Size = new System.Drawing.Size(273, 22);
this.itemtogglesky.Tag = "builder_gztogglesky";
this.itemtogglesky.Text = "Render sky (Visual mode)";
this.itemtogglesky.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemeventlines
//
this.itemtoggleeventlines.CheckOnClick = true;
this.itemtoggleeventlines.Image = global::CodeImp.DoomBuilder.Properties.Resources.InfoLine;
this.itemtoggleeventlines.Name = "itemtoggleeventlines";
this.itemtoggleeventlines.Size = new System.Drawing.Size(273, 22);
this.itemtoggleeventlines.Tag = "builder_gztoggleeventlines";
this.itemtoggleeventlines.Text = "Show Event Lines";
this.itemtoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemvisualverts
//
this.itemtogglevisualverts.CheckOnClick = true;
this.itemtogglevisualverts.Image = global::CodeImp.DoomBuilder.Properties.Resources.VisualVertices;
this.itemtogglevisualverts.Name = "itemtogglevisualverts";
this.itemtogglevisualverts.Size = new System.Drawing.Size(273, 22);
this.itemtogglevisualverts.Tag = "builder_gztogglevisualvertices";
this.itemtogglevisualverts.Text = "Show Editable Vertices (Visual mode)";
this.itemtogglevisualverts.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonfullbrightness
//
this.buttonfullbrightness.Checked = true;
@ -1840,17 +1997,6 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorgeometry.Name = "seperatorgeometry";
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
//
// buttontogglefx
//
this.buttontogglefx.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttontogglefx.Image = global::CodeImp.DoomBuilder.Properties.Resources.fx;
this.buttontogglefx.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttontogglefx.Name = "buttontogglefx";
this.buttontogglefx.Size = new System.Drawing.Size(23, 22);
this.buttontogglefx.Tag = "builder_gztogglefx";
this.buttontogglefx.Text = "Toggle GZDoom Effects";
this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// dynamiclightmode
//
this.dynamiclightmode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -1961,7 +2107,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglefog.Name = "buttontogglefog";
this.buttontogglefog.Size = new System.Drawing.Size(23, 20);
this.buttontogglefog.Tag = "builder_gztogglefog";
this.buttontogglefog.Text = "Toggle Fog Rendering";
this.buttontogglefog.Text = "Render Fog (Visual mode)";
this.buttontogglefog.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglesky
@ -1973,7 +2119,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglesky.Name = "buttontogglesky";
this.buttontogglesky.Size = new System.Drawing.Size(23, 20);
this.buttontogglesky.Tag = "builder_gztogglesky";
this.buttontogglesky.Text = "Toggle Sky Rendering";
this.buttontogglesky.Text = "Render Sky (Visual mode)";
this.buttontogglesky.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontoggleeventlines
@ -1984,7 +2130,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontoggleeventlines.Name = "buttontoggleeventlines";
this.buttontoggleeventlines.Size = new System.Drawing.Size(23, 20);
this.buttontoggleeventlines.Tag = "builder_gztoggleeventlines";
this.buttontoggleeventlines.Text = "Toggle Event Lines";
this.buttontoggleeventlines.Text = "Show Event Lines";
this.buttontoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttontogglevisualvertices
@ -1995,7 +2141,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttontogglevisualvertices.Name = "buttontogglevisualvertices";
this.buttontogglevisualvertices.Size = new System.Drawing.Size(23, 20);
this.buttontogglevisualvertices.Tag = "builder_gztogglevisualvertices";
this.buttontogglevisualvertices.Text = "Show Editable Vertices in Visual Mode";
this.buttontogglevisualvertices.Text = "Show Editable Vertices (Visual mode)";
this.buttontogglevisualvertices.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorgzmodes
@ -2793,7 +2939,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripSeparator seperatoreditgrid;
private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste;
private System.Windows.Forms.ToolStripSeparator seperatorgeometry;
private System.Windows.Forms.ToolStripButton buttontogglefx;
private System.Windows.Forms.ToolStripButton buttontogglefog;
private System.Windows.Forms.ToolStripButton buttontogglesky;
private System.Windows.Forms.ToolStripStatusLabel warnsLabel;
@ -2840,6 +2985,20 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripButton buttonfullbrightness;
private System.Windows.Forms.ToolStripSeparator separatorfullbrightness;
private System.Windows.Forms.ToolStripSeparator separatorfilters;
private System.Windows.Forms.ToolStripSeparator separatorrendering;
private System.Windows.Forms.ToolStripMenuItem itemdynlightmodes;
private System.Windows.Forms.ToolStripMenuItem itemnodynlights;
private System.Windows.Forms.ToolStripMenuItem itemdynlights;
private System.Windows.Forms.ToolStripMenuItem itemdynlightsanim;
private System.Windows.Forms.ToolStripMenuItem itemmodelmodes;
private System.Windows.Forms.ToolStripMenuItem itemnomdl;
private System.Windows.Forms.ToolStripMenuItem itemselmdl;
private System.Windows.Forms.ToolStripMenuItem itemfiltermdl;
private System.Windows.Forms.ToolStripMenuItem itemallmdl;
private System.Windows.Forms.ToolStripMenuItem itemtogglefog;
private System.Windows.Forms.ToolStripMenuItem itemtogglesky;
private System.Windows.Forms.ToolStripMenuItem itemtoggleeventlines;
private System.Windows.Forms.ToolStripMenuItem itemtogglevisualverts;
private ToolStripMenuItem itemimport;
private ToolStripMenuItem itemexport;
private ToolStripSeparator separatorio;

View file

@ -2133,7 +2133,6 @@ namespace CodeImp.DoomBuilder.Windows
//mxd
modelrendermode.Visible = General.Settings.GZToolbarGZDoom && maploaded;
dynamiclightmode.Visible = General.Settings.GZToolbarGZDoom && maploaded;
buttontogglefx.Visible = General.Settings.GZToolbarGZDoom && maploaded;
buttontogglefog.Visible = General.Settings.GZToolbarGZDoom && maploaded;
buttontogglesky.Visible = General.Settings.GZToolbarGZDoom && maploaded;
buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom && maploaded;
@ -3019,7 +3018,7 @@ namespace CodeImp.DoomBuilder.Windows
#region ================== View Menu
// This sets up the modes menu
// This sets up the View menu
private void UpdateViewMenu()
{
menuview.Visible = (General.Map != null); //mxd
@ -3032,6 +3031,25 @@ namespace CodeImp.DoomBuilder.Windows
itemtogglecomments.Checked = General.Settings.RenderComments; //mxd
itemtogglefixedthingsscale.Visible = (General.Map != null); //mxd
itemtogglefixedthingsscale.Checked = General.Settings.FixedThingsScale; //mxd
itemtogglefog.Checked = General.Settings.GZDrawFog;
itemtogglesky.Checked = General.Settings.GZDrawSky;
itemtoggleeventlines.Checked = General.Settings.GZShowEventLines;
itemtogglevisualverts.Visible = (General.Map != null && General.Map.UDMF);
itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices;
// Update Model Rendering Mode items...
foreach(ToolStripMenuItem item in itemmodelmodes.DropDownItems)
{
item.Checked = ((ModelRenderMode)item.Tag == General.Settings.GZDrawModelsMode);
if(item.Checked) itemmodelmodes.Image = item.Image;
}
// Update Dynamic Light Mode items...
foreach(ToolStripMenuItem item in itemdynlightmodes.DropDownItems)
{
item.Checked = ((LightRenderMode)item.Tag == General.Settings.GZDrawLightsMode);
if(item.Checked) itemdynlightmodes.Image = item.Image;
}
// View mode items
if(General.Map != null)
@ -3045,6 +3063,76 @@ namespace CodeImp.DoomBuilder.Windows
}
}
//mxd
[BeginAction("gztoggleenhancedrendering")]
public void ToggleEnhancedRendering()
{
General.Settings.EnhancedRenderingEffects = !General.Settings.EnhancedRenderingEffects;
General.Settings.GZDrawFog = General.Settings.EnhancedRenderingEffects;
General.Settings.GZDrawSky = General.Settings.EnhancedRenderingEffects;
General.Settings.GZDrawLightsMode = (General.Settings.EnhancedRenderingEffects ? LightRenderMode.ALL : LightRenderMode.NONE);
General.Settings.GZDrawModelsMode = (General.Settings.EnhancedRenderingEffects ? ModelRenderMode.ALL : ModelRenderMode.NONE);
UpdateGZDoomPanel();
UpdateViewMenu();
DisplayStatus(StatusType.Info, "Enhanced rendering effects are " + (General.Settings.EnhancedRenderingEffects ? "ENABLED" : "DISABLED"));
}
//mxd
[BeginAction("gztogglefog")]
internal void ToggleFog()
{
General.Settings.GZDrawFog = !General.Settings.GZDrawFog;
itemtogglefog.Checked = General.Settings.GZDrawFog;
buttontogglefog.Checked = General.Settings.GZDrawFog;
General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
//mxd
[BeginAction("gztogglesky")]
internal void ToggleSky()
{
General.Settings.GZDrawSky = !General.Settings.GZDrawSky;
itemtogglesky.Checked = General.Settings.GZDrawSky;
buttontogglesky.Checked = General.Settings.GZDrawSky;
General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztoggleeventlines")]
internal void ToggleEventLines()
{
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
itemtoggleeventlines.Checked = General.Settings.GZShowEventLines;
buttontoggleeventlines.Checked = General.Settings.GZShowEventLines;
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
[BeginAction("gztogglevisualvertices")]
internal void ToggleVisualVertices()
{
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices;
buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices;
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
General.MainWindow.RedrawDisplay();
General.MainWindow.UpdateGZDoomPanel();
}
#endregion
#region ================== Mode Menu
@ -3502,6 +3590,7 @@ namespace CodeImp.DoomBuilder.Windows
break;
}
UpdateViewMenu();
UpdateGZDoomPanel();
RedrawDisplay();
}
@ -3525,6 +3614,7 @@ namespace CodeImp.DoomBuilder.Windows
break;
}
UpdateViewMenu();
UpdateGZDoomPanel();
RedrawDisplay();
}

View file

@ -35,8 +35,6 @@ namespace CodeImp.DoomBuilder.Windows
System.Windows.Forms.GroupBox groupBox1;
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label18;
System.Windows.Forms.Label label20;
System.Windows.Forms.Label label21;
System.Windows.Forms.Label label27;
System.Windows.Forms.Label label29;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreferencesForm));
@ -160,10 +158,6 @@ namespace CodeImp.DoomBuilder.Windows
this.labelanisotropicfiltering = new System.Windows.Forms.Label();
this.anisotropicfiltering = new System.Windows.Forms.TrackBar();
this.cbOldHighlightMode = new System.Windows.Forms.CheckBox();
this.labelDynLightIntensity = new System.Windows.Forms.Label();
this.tbDynLightIntensity = new System.Windows.Forms.TrackBar();
this.labelDynLightSize = new System.Windows.Forms.Label();
this.tbDynLightSize = new System.Windows.Forms.TrackBar();
this.labelDynLightCount = new System.Windows.Forms.Label();
this.tbDynLightCount = new System.Windows.Forms.TrackBar();
this.imagebrightness = new System.Windows.Forms.TrackBar();
@ -224,8 +218,6 @@ namespace CodeImp.DoomBuilder.Windows
groupBox1 = new System.Windows.Forms.GroupBox();
label1 = new System.Windows.Forms.Label();
label18 = new System.Windows.Forms.Label();
label20 = new System.Windows.Forms.Label();
label21 = new System.Windows.Forms.Label();
label27 = new System.Windows.Forms.Label();
label29 = new System.Windows.Forms.Label();
groupBox1.SuspendLayout();
@ -255,8 +247,6 @@ namespace CodeImp.DoomBuilder.Windows
((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.antialiasing)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).BeginInit();
@ -602,7 +592,7 @@ namespace CodeImp.DoomBuilder.Windows
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(43, 171);
label1.Location = new System.Drawing.Point(44, 203);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(145, 13);
label1.TabIndex = 20;
@ -612,7 +602,7 @@ namespace CodeImp.DoomBuilder.Windows
// label18
//
label18.AutoSize = true;
label18.Location = new System.Drawing.Point(80, 208);
label18.Location = new System.Drawing.Point(80, 248);
label18.Name = "label18";
label18.Size = new System.Drawing.Size(108, 13);
label18.TabIndex = 25;
@ -621,30 +611,10 @@ namespace CodeImp.DoomBuilder.Windows
this.toolTip1.SetToolTip(label18, "Controls how many dynamic lights could be \r\nrendered simultaneously in Visual mod" +
"e ");
//
// label20
//
label20.AutoSize = true;
label20.Location = new System.Drawing.Point(94, 245);
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;
//
// label21
//
label21.AutoSize = true;
label21.Location = new System.Drawing.Point(74, 282);
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;
//
// label27
//
label27.AutoSize = true;
label27.Location = new System.Drawing.Point(90, 319);
label27.Location = new System.Drawing.Point(90, 293);
label27.Name = "label27";
label27.Size = new System.Drawing.Size(98, 13);
label27.TabIndex = 35;
@ -654,7 +624,7 @@ namespace CodeImp.DoomBuilder.Windows
// label29
//
label29.AutoSize = true;
label29.Location = new System.Drawing.Point(96, 356);
label29.Location = new System.Drawing.Point(95, 338);
label29.Name = "label29";
label29.Size = new System.Drawing.Size(93, 13);
label29.TabIndex = 38;
@ -1620,16 +1590,10 @@ namespace CodeImp.DoomBuilder.Windows
this.appearancegroup1.Controls.Add(this.labelanisotropicfiltering);
this.appearancegroup1.Controls.Add(this.anisotropicfiltering);
this.appearancegroup1.Controls.Add(this.cbOldHighlightMode);
this.appearancegroup1.Controls.Add(label21);
this.appearancegroup1.Controls.Add(this.labelDynLightIntensity);
this.appearancegroup1.Controls.Add(this.cbStretchView);
this.appearancegroup1.Controls.Add(this.tbDynLightIntensity);
this.appearancegroup1.Controls.Add(label20);
this.appearancegroup1.Controls.Add(this.doublesidedalphalabel);
this.appearancegroup1.Controls.Add(this.qualitydisplay);
this.appearancegroup1.Controls.Add(this.labelDynLightSize);
this.appearancegroup1.Controls.Add(this.label2);
this.appearancegroup1.Controls.Add(this.tbDynLightSize);
this.appearancegroup1.Controls.Add(label18);
this.appearancegroup1.Controls.Add(this.labelDynLightCount);
this.appearancegroup1.Controls.Add(this.tbDynLightCount);
@ -1652,7 +1616,7 @@ namespace CodeImp.DoomBuilder.Windows
// activethingsalphalabel
//
this.activethingsalphalabel.AutoSize = true;
this.activethingsalphalabel.Location = new System.Drawing.Point(359, 60);
this.activethingsalphalabel.Location = new System.Drawing.Point(359, 68);
this.activethingsalphalabel.Name = "activethingsalphalabel";
this.activethingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.activethingsalphalabel.TabIndex = 48;
@ -1661,7 +1625,7 @@ namespace CodeImp.DoomBuilder.Windows
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(12, 60);
this.label31.Location = new System.Drawing.Point(12, 68);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(176, 13);
this.label31.TabIndex = 47;
@ -1685,7 +1649,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.activethingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.activethingsalpha.LargeChange = 3;
this.activethingsalpha.Location = new System.Drawing.Point(199, 49);
this.activethingsalpha.Location = new System.Drawing.Point(199, 57);
this.activethingsalpha.Name = "activethingsalpha";
this.activethingsalpha.Size = new System.Drawing.Size(154, 45);
this.activethingsalpha.TabIndex = 1;
@ -1695,7 +1659,7 @@ namespace CodeImp.DoomBuilder.Windows
// hiddenthingsalphalabel
//
this.hiddenthingsalphalabel.AutoSize = true;
this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 134);
this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 158);
this.hiddenthingsalphalabel.Name = "hiddenthingsalphalabel";
this.hiddenthingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.hiddenthingsalphalabel.TabIndex = 45;
@ -1704,7 +1668,7 @@ namespace CodeImp.DoomBuilder.Windows
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(49, 134);
this.label32.Location = new System.Drawing.Point(49, 158);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(139, 13);
this.label32.TabIndex = 44;
@ -1715,7 +1679,7 @@ namespace CodeImp.DoomBuilder.Windows
// inactivethingsalphalabel
//
this.inactivethingsalphalabel.AutoSize = true;
this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 97);
this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 113);
this.inactivethingsalphalabel.Name = "inactivethingsalphalabel";
this.inactivethingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.inactivethingsalphalabel.TabIndex = 42;
@ -1724,7 +1688,7 @@ namespace CodeImp.DoomBuilder.Windows
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(15, 97);
this.label30.Location = new System.Drawing.Point(15, 113);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(173, 13);
this.label30.TabIndex = 41;
@ -1735,7 +1699,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelantialiasing
//
this.labelantialiasing.AutoSize = true;
this.labelantialiasing.Location = new System.Drawing.Point(359, 356);
this.labelantialiasing.Location = new System.Drawing.Point(359, 338);
this.labelantialiasing.Name = "labelantialiasing";
this.labelantialiasing.Size = new System.Drawing.Size(54, 13);
this.labelantialiasing.TabIndex = 39;
@ -1745,7 +1709,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.antialiasing.BackColor = System.Drawing.SystemColors.Window;
this.antialiasing.LargeChange = 1;
this.antialiasing.Location = new System.Drawing.Point(199, 345);
this.antialiasing.Location = new System.Drawing.Point(199, 327);
this.antialiasing.Maximum = 3;
this.antialiasing.Name = "antialiasing";
this.antialiasing.Size = new System.Drawing.Size(154, 45);
@ -1757,7 +1721,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelanisotropicfiltering
//
this.labelanisotropicfiltering.AutoSize = true;
this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 319);
this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 293);
this.labelanisotropicfiltering.Name = "labelanisotropicfiltering";
this.labelanisotropicfiltering.Size = new System.Drawing.Size(24, 13);
this.labelanisotropicfiltering.TabIndex = 36;
@ -1767,7 +1731,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.anisotropicfiltering.BackColor = System.Drawing.SystemColors.Window;
this.anisotropicfiltering.LargeChange = 1;
this.anisotropicfiltering.Location = new System.Drawing.Point(199, 308);
this.anisotropicfiltering.Location = new System.Drawing.Point(199, 282);
this.anisotropicfiltering.Maximum = 4;
this.anisotropicfiltering.Name = "anisotropicfiltering";
this.anisotropicfiltering.Size = new System.Drawing.Size(154, 45);
@ -1788,55 +1752,10 @@ namespace CodeImp.DoomBuilder.Windows
"ighlight\" mode is disabled \r\n(Doom Builder 2 behaviour).");
this.cbOldHighlightMode.UseVisualStyleBackColor = true;
//
// labelDynLightIntensity
//
this.labelDynLightIntensity.AutoSize = true;
this.labelDynLightIntensity.Location = new System.Drawing.Point(359, 282);
this.labelDynLightIntensity.Name = "labelDynLightIntensity";
this.labelDynLightIntensity.Size = new System.Drawing.Size(22, 13);
this.labelDynLightIntensity.TabIndex = 32;
this.labelDynLightIntensity.Text = "1.0";
//
// tbDynLightIntensity
//
this.tbDynLightIntensity.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightIntensity.LargeChange = 1;
this.tbDynLightIntensity.Location = new System.Drawing.Point(199, 271);
this.tbDynLightIntensity.Minimum = 1;
this.tbDynLightIntensity.Name = "tbDynLightIntensity";
this.tbDynLightIntensity.Size = new System.Drawing.Size(154, 45);
this.tbDynLightIntensity.TabIndex = 7;
this.tbDynLightIntensity.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.tbDynLightIntensity.Value = 10;
this.tbDynLightIntensity.ValueChanged += new System.EventHandler(this.tbDynLightIntensity_ValueChanged);
//
// labelDynLightSize
//
this.labelDynLightSize.AutoSize = true;
this.labelDynLightSize.Location = new System.Drawing.Point(359, 245);
this.labelDynLightSize.Name = "labelDynLightSize";
this.labelDynLightSize.Size = new System.Drawing.Size(22, 13);
this.labelDynLightSize.TabIndex = 29;
this.labelDynLightSize.Text = "1.0";
//
// tbDynLightSize
//
this.tbDynLightSize.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightSize.LargeChange = 1;
this.tbDynLightSize.Location = new System.Drawing.Point(199, 234);
this.tbDynLightSize.Maximum = 20;
this.tbDynLightSize.Minimum = 1;
this.tbDynLightSize.Name = "tbDynLightSize";
this.tbDynLightSize.Size = new System.Drawing.Size(154, 45);
this.tbDynLightSize.TabIndex = 6;
this.tbDynLightSize.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.tbDynLightSize.Value = 10;
this.tbDynLightSize.ValueChanged += new System.EventHandler(this.tbDynLightSize_ValueChanged);
//
// labelDynLightCount
//
this.labelDynLightCount.AutoSize = true;
this.labelDynLightCount.Location = new System.Drawing.Point(359, 208);
this.labelDynLightCount.Location = new System.Drawing.Point(359, 248);
this.labelDynLightCount.Name = "labelDynLightCount";
this.labelDynLightCount.Size = new System.Drawing.Size(19, 13);
this.labelDynLightCount.TabIndex = 26;
@ -1846,7 +1765,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightCount.LargeChange = 1;
this.tbDynLightCount.Location = new System.Drawing.Point(199, 197);
this.tbDynLightCount.Location = new System.Drawing.Point(199, 237);
this.tbDynLightCount.Maximum = 8;
this.tbDynLightCount.Minimum = 1;
this.tbDynLightCount.Name = "tbDynLightCount";
@ -1860,7 +1779,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.imagebrightness.BackColor = System.Drawing.SystemColors.Window;
this.imagebrightness.LargeChange = 3;
this.imagebrightness.Location = new System.Drawing.Point(199, 160);
this.imagebrightness.Location = new System.Drawing.Point(199, 192);
this.imagebrightness.Name = "imagebrightness";
this.imagebrightness.Size = new System.Drawing.Size(154, 45);
this.imagebrightness.TabIndex = 4;
@ -1881,7 +1800,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.hiddenthingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.hiddenthingsalpha.LargeChange = 3;
this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 123);
this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 147);
this.hiddenthingsalpha.Name = "hiddenthingsalpha";
this.hiddenthingsalpha.Size = new System.Drawing.Size(154, 45);
this.hiddenthingsalpha.TabIndex = 3;
@ -1892,7 +1811,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.inactivethingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.inactivethingsalpha.LargeChange = 3;
this.inactivethingsalpha.Location = new System.Drawing.Point(199, 86);
this.inactivethingsalpha.Location = new System.Drawing.Point(199, 102);
this.inactivethingsalpha.Name = "inactivethingsalpha";
this.inactivethingsalpha.Size = new System.Drawing.Size(154, 45);
this.inactivethingsalpha.TabIndex = 2;
@ -1922,7 +1841,7 @@ namespace CodeImp.DoomBuilder.Windows
// imagebrightnesslabel
//
this.imagebrightnesslabel.AutoSize = true;
this.imagebrightnesslabel.Location = new System.Drawing.Point(360, 171);
this.imagebrightnesslabel.Location = new System.Drawing.Point(360, 203);
this.imagebrightnesslabel.Name = "imagebrightnesslabel";
this.imagebrightnesslabel.Size = new System.Drawing.Size(30, 13);
this.imagebrightnesslabel.TabIndex = 22;
@ -2541,8 +2460,6 @@ namespace CodeImp.DoomBuilder.Windows
((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.antialiasing)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).EndInit();
@ -2648,10 +2565,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.CheckBox toolbar_gzdoom;
private System.Windows.Forms.Label labelDynLightCount;
private System.Windows.Forms.TrackBar tbDynLightCount;
private System.Windows.Forms.Label labelDynLightSize;
private System.Windows.Forms.TrackBar tbDynLightSize;
private System.Windows.Forms.Label labelDynLightIntensity;
private System.Windows.Forms.TrackBar tbDynLightIntensity;
private System.Windows.Forms.CheckBox cbSynchCameras;
private System.Windows.Forms.CheckBox cbStretchView;
private System.Windows.Forms.ToolTip toolTip1;

View file

@ -99,10 +99,6 @@ namespace CodeImp.DoomBuilder.Windows
cbSynchCameras.Checked = General.Settings.GZSynchCameras;
tbDynLightCount.Value = General.Clamp(General.Settings.GZMaxDynamicLights / 8, tbDynLightCount.Minimum, tbDynLightCount.Maximum);
labelDynLightCount.Text = General.Settings.GZMaxDynamicLights.ToString();
tbDynLightSize.Value = General.Clamp((int)(General.Settings.GZDynamicLightRadius * 10), tbDynLightSize.Minimum, tbDynLightSize.Maximum);
labelDynLightSize.Text = General.Settings.GZDynamicLightRadius.ToString();
tbDynLightIntensity.Value = General.Clamp((int)(General.Settings.GZDynamicLightIntensity * 10), tbDynLightIntensity.Minimum, tbDynLightIntensity.Maximum);
labelDynLightIntensity.Text = General.Settings.GZDynamicLightIntensity.ToString();
cbStretchView.Checked = General.Settings.GZStretchView;
cbOldHighlightMode.Checked = General.Settings.GZOldHighlightMode;
vertexScale.Value = General.Clamp((int)(General.Settings.GZVertexScale2D), vertexScale.Minimum, vertexScale.Maximum);
@ -410,8 +406,6 @@ namespace CodeImp.DoomBuilder.Windows
//mxd
General.Settings.GZSynchCameras = cbSynchCameras.Checked;
General.Settings.GZMaxDynamicLights = tbDynLightCount.Value * 8;
General.Settings.GZDynamicLightRadius = (tbDynLightSize.Value / 10.0f);
General.Settings.GZDynamicLightIntensity = (tbDynLightIntensity.Value / 10.0f);
General.Settings.FilterAnisotropy = D3DDevice.AF_STEPS[anisotropicfiltering.Value];
General.Settings.AntiAliasingSamples = D3DDevice.AA_STEPS[antialiasing.Value];
General.Settings.GZStretchView = cbStretchView.Checked;
@ -1009,18 +1003,6 @@ namespace CodeImp.DoomBuilder.Windows
labelDynLightCount.Text = (tbDynLightCount.Value * 8).ToString();
}
//mxd
private void tbDynLightSize_ValueChanged(object sender, EventArgs e)
{
labelDynLightSize.Text = ((float)tbDynLightSize.Value / 10).ToString();
}
//mxd
private void tbDynLightIntensity_ValueChanged(object sender, EventArgs e)
{
labelDynLightIntensity.Text = ((float)tbDynLightIntensity.Value / 10).ToString();
}
//mxd
private void anisotropicfiltering_ValueChanged(object sender, EventArgs e)
{

View file

@ -135,12 +135,6 @@
<metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</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="label27.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>

View file

@ -1072,18 +1072,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(t.Sector == null) t.DetermineSector();
int scaler = (t.Sector != null ? t.Sector.Brightness / 4 : 2);
primaryradius = (int)Math.Round((t.Args[3] * scaler) * General.Settings.GZDynamicLightRadius);
primaryradius = t.Args[3] * scaler;
}
else
{
primaryradius = (int)Math.Round((t.Args[3] * 2) * General.Settings.GZDynamicLightRadius); //works... that.. way in GZDoom
if(lightType > 0)
secondaryradius = (int)Math.Round((t.Args[4] * 2) * General.Settings.GZDynamicLightRadius);
primaryradius = t.Args[3] * 2; //works... that.. way in GZDoom
if(lightType > 0) secondaryradius = t.Args[4] * 2;
}
}
else //it's one of vavoom lights
{
primaryradius = (int)Math.Round((t.Args[0] * 8) * General.Settings.GZDynamicLightRadius);
primaryradius = t.Args[0] * 8;
}
// Check radii...

View file

@ -197,10 +197,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
BaseVisualMode mode = new BaseVisualMode();
bool renderingEffectsDisabled = false;
if(!General.Settings.GZDoomRenderingEffects)
if(!General.Settings.EnhancedRenderingEffects)
{
renderingEffectsDisabled = true;
mode.ToggleGZDoomRenderingEffects();
mode.ToggleEnhancedRendering();
}
mode.RebuildElementData();
@ -224,7 +224,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
List<Dictionary<string, List<WorldVertex[]>>> geometryByTexture = SortGeometry(visualSectors);
//restore vm settings
if(renderingEffectsDisabled) mode.ToggleGZDoomRenderingEffects();
if(renderingEffectsDisabled) mode.ToggleEnhancedRendering();
mode.Dispose();
//create obj

View file

@ -1357,14 +1357,3 @@ ceilingalignmode
allowmouse = true;
allowscroll = true;
}
togglegzdoomgeometryeffects
{
title = "Toggle Geometry Effects";
category = "visual";
description = "Toggles rendering of (G)ZDoom's geometry effects (slopes, 3D-floors etc.) in Visual mode.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 9; //Tab
}

View file

@ -747,7 +747,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
HashSet<Sector> effectsectors = null; //mxd
if(!General.Settings.GZDoomRenderingEffects) //mxd
if(!General.Settings.EnhancedRenderingEffects) //mxd
{
// Store all sectors with effects
if(sectordata != null && sectordata.Count > 0)
@ -786,7 +786,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
vertices.Clear();
}
if(!General.Settings.GZDoomRenderingEffects) return; //mxd
if(!General.Settings.EnhancedRenderingEffects) return; //mxd
// Find all sector who's tag is not 0 and hash them so that we can find them quickly
foreach(Sector s in General.Map.Map.Sectors)
@ -3296,13 +3296,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
//mxd
[BeginAction("togglegzdoomgeometryeffects")]
public void ToggleGZDoomRenderingEffects()
[BeginAction("gztoggleenhancedrendering", BaseAction = true)]
public void ToggleEnhancedRendering()
{
General.Settings.GZDoomRenderingEffects = !General.Settings.GZDoomRenderingEffects;
// Actual toggling is done in MainForm.ToggleEnhancedRendering(), so we only need to update the view here
RebuildElementData();
UpdateChangedObjects();
General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom geometry effects are " + (General.Settings.GZDoomRenderingEffects ? "ENABLED" : "DISABLED"));
}
//mxd