General interface: dynamic lights rendering mode and model rendering mode are now selected via drop-downs.
Renamed "Toggle dynamic lights rendering" action to "Show dynamic lights". Changed: "Show dynamic lights" action now toggles between available dynamic light rendering modes. Renamed "Toggle models rendering" action to "Show models". Changed: "Show models" action now toggles between available model rendering modes. Removed "Toggle dynamic lights animation" and "Render selected/all models" actions. Fixed, Randomize Sectors form: selection highlight was not updated after applying the changes when the form was shown in Sectors mode. Consistency: selection is now cleared after applying changes done in Randomize Things and Randomize Vertices forms. Fixed, Classic modes: sprites of things with attached models were not rendered when model rendering was disabled. Updated documentation.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -22,10 +22,8 @@
|
|||
<p>The Rendering toolbar allows you to toggle several GZDoom Builder's features:</p>
|
||||
<ol>
|
||||
<li>Toggles models, dynamic lights and fog rendering in Visual mode.</li>
|
||||
<li>Toggles dynamic lights rendering in Visual mode.</li>
|
||||
<li>Toggles dynamic lights animation in Visual mode.</li>
|
||||
<li>Toggles models rendering.</li>
|
||||
<li>Render all models / render only models for selected things.</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>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>
|
||||
|
|
|
@ -679,6 +679,7 @@
|
|||
<Compile Include="Actions\HintsManager.cs" />
|
||||
<Compile Include="Config\AllTexturesSet.cs" />
|
||||
<Compile Include="Config\FlagTranslation.cs" />
|
||||
<Compile Include="Config\ModelAndLightRenderModes.cs" />
|
||||
<Compile Include="Config\PasteOptions.cs" />
|
||||
<Compile Include="Config\ThingsFlagsCompare.cs" />
|
||||
<Compile Include="Controls\ButtonsNumericTextboxDesigner.cs" />
|
||||
|
@ -1006,6 +1007,7 @@
|
|||
<None Include="Resources\FolderExplore.png" />
|
||||
<Content Include="Resources\Light.png" />
|
||||
<None Include="Resources\Lightbulb.png" />
|
||||
<None Include="Resources\LightDisabled.png" />
|
||||
<Content Include="Resources\Light_animate.png" />
|
||||
<None Include="Resources\MLogo.png" />
|
||||
<None Include="Resources\Marine.png" />
|
||||
|
@ -1013,6 +1015,7 @@
|
|||
<EmbeddedResource Include="Resources\MissingThing.png" />
|
||||
<None Include="Resources\MCrash.png" />
|
||||
<Content Include="Resources\Model.png" />
|
||||
<None Include="Resources\ModelDisabled.png" />
|
||||
<Content Include="Resources\Model_selected.png" />
|
||||
<None Include="Resources\PuzzlePiece.png" />
|
||||
<None Include="Resources\Search.png" />
|
||||
|
|
16
Source/Core/Config/ModelAndLightRenderModes.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public enum ModelRenderMode
|
||||
{
|
||||
NONE,
|
||||
SELECTION,
|
||||
ALL,
|
||||
}
|
||||
|
||||
public enum LightRenderMode
|
||||
{
|
||||
NONE,
|
||||
ALL,
|
||||
ALL_ANIMATED,
|
||||
}
|
||||
}
|
|
@ -94,10 +94,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private SplitLineBehavior splitlinebehavior; //mxd
|
||||
|
||||
//mxd
|
||||
private bool gzDrawModels;
|
||||
private bool gzDrawSelectedModelsOnly;
|
||||
private bool gzDrawLights;
|
||||
private bool gzAnimateLights;
|
||||
private ModelRenderMode gzDrawModelsMode;
|
||||
private LightRenderMode gzDrawLightsMode;
|
||||
private bool gzDrawFog;
|
||||
private bool gzToolbarGZDoom;
|
||||
private bool gzSynchCameras;
|
||||
|
@ -180,10 +178,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
||||
|
||||
//mxd
|
||||
public bool GZDrawModels { get { return gzDrawModels; } internal set { gzDrawModels = value; } }
|
||||
public bool GZDrawSelectedModelsOnly { get { return gzDrawSelectedModelsOnly; } internal set { gzDrawSelectedModelsOnly = value; } }
|
||||
public bool GZDrawLights { get { return gzDrawLights; } internal set { gzDrawLights = value; } }
|
||||
public bool GZAnimateLights { get { return gzAnimateLights; } internal set { gzAnimateLights = value; } }
|
||||
public ModelRenderMode GZDrawModelsMode { get { return gzDrawModelsMode; } internal set { gzDrawModelsMode = value; } }
|
||||
public LightRenderMode GZDrawLightsMode { get { return gzDrawLightsMode; } internal set { gzDrawLightsMode = value; } }
|
||||
public bool GZDrawFog { get { return gzDrawFog; } internal set { gzDrawFog = value; } }
|
||||
public bool GZToolbarGZDoom { get { return gzToolbarGZDoom; } internal set { gzToolbarGZDoom = value; } }
|
||||
public bool GZSynchCameras { get { return gzSynchCameras; } internal set { gzSynchCameras = value; } }
|
||||
|
@ -289,10 +285,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd
|
||||
|
||||
//mxd
|
||||
gzDrawModels = cfg.ReadSetting("gzdrawmodels", true);
|
||||
gzDrawSelectedModelsOnly = cfg.ReadSetting("gzdrawselectedmodelsonly", false);
|
||||
gzDrawLights = cfg.ReadSetting("gzdrawlights", true);
|
||||
gzAnimateLights = cfg.ReadSetting("gzanimatelights", false);
|
||||
gzDrawModelsMode = (ModelRenderMode)cfg.ReadSetting("gzdrawmodels", (int)ModelRenderMode.ALL);
|
||||
gzDrawLightsMode = (LightRenderMode)cfg.ReadSetting("gzdrawlights", (int)LightRenderMode.ALL);
|
||||
gzDrawFog = cfg.ReadSetting("gzdrawfog", false);
|
||||
gzToolbarGZDoom = cfg.ReadSetting("gztoolbargzdoom", true);
|
||||
gzSynchCameras = cfg.ReadSetting("gzsynchcameras", true);
|
||||
|
@ -380,10 +374,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
||||
|
||||
//mxd
|
||||
cfg.WriteSetting("gzdrawmodels", gzDrawModels);
|
||||
cfg.WriteSetting("gzdrawselectedmodelsonly", gzDrawSelectedModelsOnly);
|
||||
cfg.WriteSetting("gzdrawlights", gzDrawLights);
|
||||
cfg.WriteSetting("gzanimatelights", gzAnimateLights);
|
||||
cfg.WriteSetting("gzdrawmodels", (int)gzDrawModelsMode);
|
||||
cfg.WriteSetting("gzdrawlights", (int)gzDrawLightsMode);
|
||||
cfg.WriteSetting("gzdrawfog", gzDrawFog);
|
||||
cfg.WriteSetting("gzsynchcameras", gzSynchCameras);
|
||||
cfg.WriteSetting("gzshoweventlines", gzShowEventLines);
|
||||
|
|
|
@ -1,83 +1,118 @@
|
|||
using CodeImp.DoomBuilder.Actions;
|
||||
#region ================== Namespaces
|
||||
|
||||
using CodeImp.DoomBuilder.Actions;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Data;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.GZBuilder
|
||||
{
|
||||
//mxd. should get rid of this class one day...
|
||||
public static class GZGeneral
|
||||
{
|
||||
#region ================== Properties
|
||||
|
||||
//gzdoom light types
|
||||
private static int[] gzLights = { /* normal lights */ 9800, 9801, 9802, 9803, 9804, /* additive lights */ 9810, 9811, 9812, 9813, 9814, /* negative lights */ 9820, 9821, 9822, 9823, 9824, /* vavoom lights */ 1502, 1503};
|
||||
private static readonly int[] gzLights = { /* normal lights */ 9800, 9801, 9802, 9803, 9804, /* additive lights */ 9810, 9811, 9812, 9813, 9814, /* negative lights */ 9820, 9821, 9822, 9823, 9824, /* vavoom lights */ 1502, 1503};
|
||||
public static int[] GZ_LIGHTS { get { return gzLights; } }
|
||||
private static int[] gzLightTypes = { 5, 10, 15 }; //these are actually offsets in gz_lights
|
||||
private static readonly int[] gzLightTypes = { 5, 10, 15 }; //these are actually offsets in gz_lights
|
||||
public static int[] GZ_LIGHT_TYPES { get { return gzLightTypes; } }
|
||||
private static DynamicLightType[] gzAnimatedLightTypes = { DynamicLightType.FLICKER, DynamicLightType.RANDOM, DynamicLightType.PULSE };
|
||||
private static readonly DynamicLightType[] gzAnimatedLightTypes = { DynamicLightType.FLICKER, DynamicLightType.RANDOM, DynamicLightType.PULSE };
|
||||
public static DynamicLightType[] GZ_ANIMATED_LIGHT_TYPES { get { return gzAnimatedLightTypes; } }
|
||||
|
||||
//asc script action specials
|
||||
private static int[] acsSpecials = { 80, 81, 82, 83, 84, 85, 226 };
|
||||
private static readonly int[] acsSpecials = { 80, 81, 82, 83, 84, 85, 226 };
|
||||
public static int[] ACS_SPECIALS { get { return acsSpecials; } }
|
||||
|
||||
public static void Init() {
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
//bind actions
|
||||
General.Actions.BindMethods(typeof(GZGeneral));
|
||||
General.MainWindow.UpdateGZDoomPanel();
|
||||
}
|
||||
|
||||
//actions
|
||||
#endregion
|
||||
|
||||
#region ================== Actions
|
||||
|
||||
[BeginAction("gztogglemodels")]
|
||||
private static void toggleModels() {
|
||||
General.Settings.GZDrawModels = !General.Settings.GZDrawModels;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering is " + (General.Settings.GZDrawModels ? "ENABLED" : "DISABLED"));
|
||||
private static void ToggleModelsRenderingMode()
|
||||
{
|
||||
switch(General.Settings.GZDrawModelsMode)
|
||||
{
|
||||
case ModelRenderMode.NONE:
|
||||
General.Settings.GZDrawModelsMode = ModelRenderMode.SELECTION;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: SELECTION ONLY");
|
||||
break;
|
||||
|
||||
case ModelRenderMode.SELECTION:
|
||||
General.Settings.GZDrawModelsMode = ModelRenderMode.ALL;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||
break;
|
||||
|
||||
case ModelRenderMode.ALL:
|
||||
General.Settings.GZDrawModelsMode = ModelRenderMode.NONE;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||
break;
|
||||
}
|
||||
|
||||
General.MainWindow.RedrawDisplay();
|
||||
General.MainWindow.UpdateGZDoomPanel();
|
||||
}
|
||||
|
||||
[BeginAction("gztogglelights")]
|
||||
private static void toggleLights() {
|
||||
General.Settings.GZDrawLights = !General.Settings.GZDrawLights;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering is " + (General.Settings.GZDrawLights ? "ENABLED" : "DISABLED"));
|
||||
General.MainWindow.RedrawDisplay();
|
||||
General.MainWindow.UpdateGZDoomPanel();
|
||||
}
|
||||
private static void ToggleLightsRenderingMode()
|
||||
{
|
||||
switch(General.Settings.GZDrawLightsMode)
|
||||
{
|
||||
case LightRenderMode.NONE:
|
||||
General.Settings.GZDrawLightsMode = LightRenderMode.ALL;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering mode: ALL");
|
||||
break;
|
||||
|
||||
case LightRenderMode.ALL:
|
||||
General.Settings.GZDrawLightsMode = LightRenderMode.ALL_ANIMATED;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED");
|
||||
break;
|
||||
|
||||
case LightRenderMode.ALL_ANIMATED:
|
||||
General.Settings.GZDrawLightsMode = LightRenderMode.NONE;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||
break;
|
||||
}
|
||||
|
||||
[BeginAction("gztogglelightsanimation")]
|
||||
private static void toggleLightsAnimation() {
|
||||
General.Settings.GZAnimateLights = !General.Settings.GZAnimateLights;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights animation is " + (General.Settings.GZAnimateLights ? "ENABLED" : "DISABLED"));
|
||||
General.MainWindow.RedrawDisplay();
|
||||
General.MainWindow.UpdateGZDoomPanel();
|
||||
}
|
||||
|
||||
[BeginAction("gztogglefog")]
|
||||
private static void toggleFog() {
|
||||
private static 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("gzdrawselectedmodelsonly")]
|
||||
private static void toggleDrawSelectedModelsOnly() {
|
||||
General.Settings.GZDrawSelectedModelsOnly = !General.Settings.GZDrawSelectedModelsOnly;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Rendering " + (General.Settings.GZDrawSelectedModelsOnly ? "only selected" : "all") + " models.");
|
||||
General.MainWindow.RedrawDisplay();
|
||||
General.MainWindow.UpdateGZDoomPanel();
|
||||
}
|
||||
|
||||
[BeginAction("gztogglefx")]
|
||||
private static void toggleFx() {
|
||||
private static void ToggleFx()
|
||||
{
|
||||
int on = 0;
|
||||
on += General.Settings.GZDrawFog ? 1 : -1;
|
||||
on += General.Settings.GZDrawLights ? 1 : -1;
|
||||
on += General.Settings.GZDrawModels ? 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.GZDrawLights = enable;
|
||||
General.Settings.GZDrawModels = 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();
|
||||
|
@ -85,7 +120,8 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
}
|
||||
|
||||
[BeginAction("gztoggleeventlines")]
|
||||
private static void toggleEventLines() {
|
||||
private static void ToggleEventLines()
|
||||
{
|
||||
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
|
||||
General.MainWindow.RedrawDisplay();
|
||||
|
@ -93,7 +129,8 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
}
|
||||
|
||||
[BeginAction("gztogglevisualvertices")]
|
||||
private static void toggleVisualVertices() {
|
||||
private static void ToggleVisualVertices()
|
||||
{
|
||||
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
|
||||
General.MainWindow.RedrawDisplay();
|
||||
|
@ -102,18 +139,23 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
|
||||
//main menu actions
|
||||
[BeginAction("gzreloadmodeldef")]
|
||||
private static void reloadModeldef() {
|
||||
private static void ReloadModeldef()
|
||||
{
|
||||
if(General.Map != null) General.Map.Data.ReloadModeldef();
|
||||
}
|
||||
|
||||
[BeginAction("gzreloadgldefs")]
|
||||
private static void reloadGldefs() {
|
||||
private static void ReloadGldefs()
|
||||
{
|
||||
if (General.Map != null) General.Map.Data.ReloadGldefs();
|
||||
}
|
||||
|
||||
[BeginAction("gzreloadmapinfo")]
|
||||
private static void reloadMapInfo() {
|
||||
private static void ReloadMapInfo()
|
||||
{
|
||||
if (General.Map != null) General.Map.Data.ReloadMapInfo();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
14
Source/Core/Properties/Resources.Designer.cs
generated
|
@ -305,6 +305,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap LightDisabled {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("LightDisabled", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Link {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Link", resourceCulture);
|
||||
|
@ -389,6 +396,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ModelDisabled {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ModelDisabled", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Monster2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Monster2", resourceCulture);
|
||||
|
|
|
@ -118,6 +118,9 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -184,6 +187,9 @@
|
|||
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -223,9 +229,15 @@
|
|||
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="LightDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\LightDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ScriptConstant" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ScriptConstant.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="FolderExplore" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FolderExplore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
|
@ -295,17 +307,14 @@
|
|||
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ScriptCompile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ScriptCompile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Model_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Model_selected.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -331,9 +340,6 @@
|
|||
<data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Prefab" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -352,8 +358,8 @@
|
|||
<data name="Status12" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -430,7 +436,7 @@
|
|||
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="FolderExplore" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FolderExplore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="ModelDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ModelDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1207,7 +1207,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
foreach(Thing t in group.Value) {
|
||||
if(t.IsModel) continue;
|
||||
if(t.IsModel && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || (General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && t.Selected))) continue;
|
||||
CreateThingSpriteVerts(thingsByPosition[t], spriteWidth, spriteHeight, ref verts, buffercount * 6, t.Selected ? selectionColor : 0xFFFFFF);
|
||||
buffercount++;
|
||||
totalcount++;
|
||||
|
@ -1295,7 +1295,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
graphics.Shaders.Things2D.EndPass();
|
||||
|
||||
//mxd. Render models
|
||||
if (General.Settings.GZDrawModels) {
|
||||
if (General.Settings.GZDrawModelsMode != ModelRenderMode.NONE)
|
||||
{
|
||||
// Set renderstates for rendering
|
||||
graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, false);
|
||||
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
|
||||
|
@ -1308,14 +1309,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
Matrix viewscale = Matrix.Scaling(scale, -scale, 0.0f);
|
||||
ModelData mde;
|
||||
|
||||
foreach(KeyValuePair<int, List<Thing>> group in modelsByType) {
|
||||
foreach(KeyValuePair<int, List<Thing>> group in modelsByType)
|
||||
{
|
||||
mde = General.Map.Data.ModeldefEntries[group.Key];
|
||||
float maxX = Math.Max(Math.Abs(mde.Model.BoundingBox[4].X), Math.Abs(mde.Model.BoundingBox[1].X));
|
||||
float maxY = Math.Max(Math.Abs(mde.Model.BoundingBox[4].Y), Math.Abs(mde.Model.BoundingBox[1].Y));
|
||||
float maxSize = Math.Max(maxX, maxY);
|
||||
|
||||
foreach(Thing t in group.Value) {
|
||||
if(General.Settings.GZDrawSelectedModelsOnly && !t.Selected) continue;
|
||||
foreach(Thing t in group.Value)
|
||||
{
|
||||
if(General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && !t.Selected) continue;
|
||||
Vector2D screenpos = ((Vector2D)t.Position).GetTransformed(translatex, translatey, scale, -scale);
|
||||
float modelScale = scale * t.ActorScale.Width * t.ScaleX;
|
||||
|
||||
|
@ -1326,7 +1329,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
|
||||
graphics.Shaders.Things2D.FillColor = t.Selected ? cHighlight : cWire;
|
||||
|
||||
for(int i = 0; i < mde.Model.Meshes.Count; i++) {
|
||||
for(int i = 0; i < mde.Model.Meshes.Count; i++)
|
||||
{
|
||||
float sx = t.ScaleX * t.ActorScale.Width;
|
||||
float sy = t.ScaleY * t.ActorScale.Height;
|
||||
Matrix modelcale = Matrix.Scaling(sx, sx, sy);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using SlimDX;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using SlimDX.Direct3D9;
|
||||
|
@ -413,7 +414,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
//mxd
|
||||
if (General.Settings.GZDrawLights) {
|
||||
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE)
|
||||
{
|
||||
thingsWithLight = new List<VisualThing>();
|
||||
}
|
||||
}
|
||||
|
@ -422,7 +424,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
public void FinishGeometry()
|
||||
{
|
||||
//mxd. sort lights
|
||||
if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0)
|
||||
if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||
updateLights();
|
||||
|
||||
// Initial renderstates
|
||||
|
@ -495,7 +497,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
RenderSinglePass((int)RenderPass.Additive);
|
||||
|
||||
//mxd. LIGHT PASS
|
||||
if( !(!General.Settings.GZDrawLights || fullbrightness || thingsWithLight.Count == 0 || litGeometry.Count == 0) ) {
|
||||
if( !(General.Settings.GZDrawLightsMode == LightRenderMode.NONE || fullbrightness || thingsWithLight.Count == 0 || litGeometry.Count == 0) )
|
||||
{
|
||||
RenderLights(litGeometry, thingsWithLight);
|
||||
}
|
||||
|
||||
|
@ -777,7 +780,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
wantedshaderpass += 8;
|
||||
|
||||
//mxd. Seems that lines rendered with RenderPass.Alpha or RenderPass.Additive aren't affected by dynamic lights in GZDoom
|
||||
if ( !(g.RenderPass == RenderPass.Alpha || g.RenderPass == RenderPass.Additive || !General.Settings.GZDrawLights || fullbrightness || thingsWithLight.Count == 0) ) {
|
||||
if ( !(g.RenderPass == RenderPass.Alpha || g.RenderPass == RenderPass.Additive || General.Settings.GZDrawLightsMode == LightRenderMode.NONE || fullbrightness || thingsWithLight.Count == 0) ) {
|
||||
if (curtexture.Texture != null) {
|
||||
if (!litGeometry.ContainsKey(curtexture.Texture))
|
||||
litGeometry[curtexture.Texture] = new List<VisualGeometry>();
|
||||
|
@ -853,14 +856,15 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
foreach(VisualThing t in group.Value)
|
||||
{
|
||||
//mxd
|
||||
if (t.Thing.IsModel && General.Settings.GZDrawModels && (!General.Settings.GZDrawSelectedModelsOnly || t.Selected))
|
||||
if(t.Thing.IsModel && General.Settings.GZDrawModelsMode != ModelRenderMode.NONE && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || t.Selected))
|
||||
continue;
|
||||
|
||||
// Update buffer if needed
|
||||
t.Update();
|
||||
|
||||
// Only do this sector when a vertexbuffer is created
|
||||
if (t.GeometryBuffer != null) {
|
||||
if (t.GeometryBuffer != null)
|
||||
{
|
||||
// Determine the shader pass we want to use for this object
|
||||
int wantedshaderpass = (((t == highlighted) && showhighlight) || (t.Selected && showselection)) ? highshaderpass : shaderpass;
|
||||
|
||||
|
@ -869,30 +873,38 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
wantedshaderpass += 8;
|
||||
|
||||
//mxd. if current thing is light - set it's color to light color
|
||||
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness) {
|
||||
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
|
||||
{
|
||||
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
||||
graphics.Shaders.World3D.VertexColor = t.LightColor;
|
||||
//mxd. check if Thing is affected by dynamic lights and set color accordingly
|
||||
} else if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) {
|
||||
}
|
||||
else if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||
{
|
||||
Color4 litColor = getLitColorForThing(t);
|
||||
if (litColor.ToArgb() != 0) {
|
||||
if (litColor.ToArgb() != 0)
|
||||
{
|
||||
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
||||
graphics.Shaders.World3D.VertexColor = new Color4(t.VertexColor) + litColor;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch shader pass?
|
||||
if (currentshaderpass != wantedshaderpass) {
|
||||
if (currentshaderpass != wantedshaderpass)
|
||||
{
|
||||
graphics.Shaders.World3D.EndPass();
|
||||
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
||||
currentshaderpass = wantedshaderpass;
|
||||
}
|
||||
|
||||
// Set the colors to use
|
||||
if (!graphics.Shaders.Enabled) {
|
||||
if (!graphics.Shaders.Enabled)
|
||||
{
|
||||
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
||||
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
||||
}
|
||||
|
||||
|
@ -904,7 +916,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
ApplyMatrices3D();
|
||||
|
||||
//mxd. set variables for fog rendering
|
||||
if (wantedshaderpass > 7) {
|
||||
if (wantedshaderpass > 7)
|
||||
{
|
||||
graphics.Shaders.World3D.World = world;
|
||||
|
||||
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
||||
|
@ -1010,7 +1023,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
//mxd. render models
|
||||
private void RenderModels() {
|
||||
private void RenderModels()
|
||||
{
|
||||
int shaderpass = fullbrightness ? 1 : 4;
|
||||
int currentshaderpass = shaderpass;
|
||||
int highshaderpass = shaderpass + 2;
|
||||
|
@ -1018,17 +1032,23 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
// Begin rendering with this shader
|
||||
graphics.Shaders.World3D.BeginPass(currentshaderpass);
|
||||
|
||||
foreach (KeyValuePair<ModelData, List<VisualThing>> group in thingsWithModel) {
|
||||
foreach (VisualThing t in group.Value) {
|
||||
foreach (KeyValuePair<ModelData, List<VisualThing>> group in thingsWithModel)
|
||||
{
|
||||
foreach (VisualThing t in group.Value)
|
||||
{
|
||||
t.Update();
|
||||
|
||||
Color4 vertexColor = new Color4(t.VertexColor);
|
||||
vertexColor.Alpha = 1.0f;
|
||||
|
||||
//check if model is affected by dynamic lights and set color accordingly
|
||||
if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) {
|
||||
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||
{
|
||||
Color4 litColor = getLitColorForThing(t);
|
||||
graphics.Shaders.World3D.VertexColor = vertexColor + litColor;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.Shaders.World3D.VertexColor = vertexColor;
|
||||
}
|
||||
|
||||
|
@ -1040,17 +1060,21 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
wantedshaderpass += 8;
|
||||
|
||||
// Switch shader pass?
|
||||
if (currentshaderpass != wantedshaderpass) {
|
||||
if (currentshaderpass != wantedshaderpass)
|
||||
{
|
||||
graphics.Shaders.World3D.EndPass();
|
||||
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
||||
currentshaderpass = wantedshaderpass;
|
||||
}
|
||||
|
||||
// Set the colors to use
|
||||
if (!graphics.Shaders.Enabled) {
|
||||
if (!graphics.Shaders.Enabled)
|
||||
{
|
||||
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
||||
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
||||
}
|
||||
|
||||
|
@ -1065,14 +1089,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
ApplyMatrices3D();
|
||||
|
||||
//mxd. set variables for fog rendering
|
||||
if (wantedshaderpass > 7) {
|
||||
if (wantedshaderpass > 7)
|
||||
{
|
||||
graphics.Shaders.World3D.World = world;
|
||||
|
||||
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
||||
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, getFogEnd(t.Thing.Sector));
|
||||
}
|
||||
|
||||
for(int i = 0; i < group.Key.Model.Meshes.Count; i++) {
|
||||
for(int i = 0; i < group.Key.Model.Meshes.Count; i++)
|
||||
{
|
||||
if (!graphics.Shaders.Enabled) graphics.Device.SetTexture(0, group.Key.Model.Textures[i]);
|
||||
graphics.Shaders.World3D.Texture1 = group.Key.Model.Textures[i];
|
||||
graphics.Shaders.World3D.ApplySettings();
|
||||
|
@ -1180,13 +1206,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
public void AddThingGeometry(VisualThing t)
|
||||
{
|
||||
//mxd. gater lights
|
||||
if (General.Settings.GZDrawLights && !fullbrightness && t.LightType != DynamicLightType.NONE) {
|
||||
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && t.LightType != DynamicLightType.NONE)
|
||||
{
|
||||
t.UpdateLightRadius();
|
||||
|
||||
if (t.LightRadius > 0) {
|
||||
if (t.LightRadius > 0)
|
||||
{
|
||||
t.CalculateCameraDistance3D(D3DDevice.V3(cameraposition));
|
||||
//t.CameraDistance3D is actually squared distance, hence (t.LightRadius * t.LightRadius)
|
||||
if (t.CameraDistance3D < (t.LightRadius * t.LightRadius) || isThingOnScreen(t.BoundingBox)) { //always render light if camera is within it's radius
|
||||
if(t.CameraDistance3D < (t.LightRadius * t.LightRadius) || isThingOnScreen(t.BoundingBox)) //always render light if camera is within it's radius
|
||||
{
|
||||
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, t.LightType) != -1)
|
||||
t.UpdateBoundingBox();
|
||||
thingsWithLight.Add(t);
|
||||
|
@ -1197,7 +1226,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
if (!isThingOnScreen(t.BoundingBox)) return;
|
||||
|
||||
//mxd. gather models
|
||||
if(t.Thing.IsModel && General.Settings.GZDrawModels && (!General.Settings.GZDrawSelectedModelsOnly || t.Selected)) {
|
||||
if(t.Thing.IsModel && General.Settings.GZDrawModelsMode != ModelRenderMode.NONE && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || t.Selected))
|
||||
{
|
||||
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.Type];
|
||||
if (!thingsWithModel.ContainsKey(mde))
|
||||
thingsWithModel.Add(mde, new List<VisualThing>() { t });
|
||||
|
@ -1225,12 +1255,14 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
//mxd
|
||||
public void AddVisualVertices(VisualVertex[] verts) {
|
||||
public void AddVisualVertices(VisualVertex[] verts)
|
||||
{
|
||||
visualvertices = verts;
|
||||
}
|
||||
|
||||
//mxd
|
||||
private bool isThingOnScreen(Vector3[] bbox) {
|
||||
private bool isThingOnScreen(Vector3[] bbox)
|
||||
{
|
||||
Vector3D camNormal = Vector3D.FromAngleXYZ(General.Map.VisualCamera.AngleXY, General.Map.VisualCamera.AngleZ);
|
||||
Vector3D thingNormal = D3DDevice.V3D(bbox[0]) - cameraposition; //bbox[0] is always thing center
|
||||
|
||||
|
@ -1244,7 +1276,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
int topCount = 0;
|
||||
int bottomCount = 0;
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
//check visibility
|
||||
screenPos = Vector3.Project(bbox[i], 0, 0, 1, 1, PROJ_NEAR_PLANE, General.Settings.ViewDistance, worldviewproj);
|
||||
|
||||
|
@ -1269,7 +1302,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
//mxd
|
||||
private static bool checkBBoxIntersection(Vector3[] bbox1, Vector3[] bbox2) {
|
||||
private static bool checkBBoxIntersection(Vector3[] bbox1, Vector3[] bbox2)
|
||||
{
|
||||
Vector3 dist = bbox1[0] - bbox2[0];
|
||||
|
||||
Vector3 halfSize1 = bbox1[0] - bbox1[1];
|
||||
|
|
|
@ -1082,9 +1082,9 @@ showerrors
|
|||
/////////////////////////
|
||||
gztogglemodels
|
||||
{
|
||||
title = "Toggle models rendering";
|
||||
title = "Show models";
|
||||
category = "gzdoombuilder";
|
||||
description = "Toggles models rendering.";
|
||||
description = "Cycles through available model rendering modes.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = false;
|
||||
|
@ -1092,19 +1092,9 @@ gztogglemodels
|
|||
|
||||
gztogglelights
|
||||
{
|
||||
title = "Toggle dynamic lights rendering";
|
||||
title = "Show dynamic lights";
|
||||
category = "gzdoombuilder";
|
||||
description = "Toggles dynamic lights rendering.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
||||
gztogglelightsanimation
|
||||
{
|
||||
title = "Toggle dynamic lights animation";
|
||||
category = "gzdoombuilder";
|
||||
description = "Toggles dynamic lights animation.";
|
||||
description = "Cycles through available dynamic light rendering modes in Visual Mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = false;
|
||||
|
@ -1112,7 +1102,7 @@ gztogglelightsanimation
|
|||
|
||||
gztogglefog
|
||||
{
|
||||
title = "Toggle fog rendering";
|
||||
title = "Toggle fog rendering";
|
||||
category = "gzdoombuilder";
|
||||
description = "Toggles fog rendering.";
|
||||
allowkeys = true;
|
||||
|
@ -1120,21 +1110,11 @@ gztogglefog
|
|||
allowscroll = false;
|
||||
}
|
||||
|
||||
gzdrawselectedmodelsonly
|
||||
{
|
||||
title = "Render selected/all models";
|
||||
category = "gzdoombuilder";
|
||||
description = "Render all models / render only models for selected things.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
||||
gztogglefx
|
||||
{
|
||||
title = "Toggle GZDoom effects";
|
||||
title = "Toggle models, dynamic lights and fog";
|
||||
category = "gzdoombuilder";
|
||||
description = "Toggles models, dynamic lights and fog rendering.";
|
||||
description = "This is a combo action, which toggles models, dynamic lights and fog rendering.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = false;
|
||||
|
@ -1142,24 +1122,24 @@ gztogglefx
|
|||
|
||||
gztoggleeventlines
|
||||
{
|
||||
title = "Toggle Event lines";
|
||||
title = "Toggle Event lines";
|
||||
category = "view";
|
||||
description = "When enabled, shows order, in which patrol points and interpolation points are connected. Also shows action target for currently highlighted item in 2D modes.";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
default = 73;
|
||||
default = 73;
|
||||
}
|
||||
|
||||
gztogglevisualvertices
|
||||
{
|
||||
title = "Toggle Visual Vertices";
|
||||
title = "Toggle Visual Vertices";
|
||||
category = "visual";
|
||||
description = "When enabled, shows vertices, which heights can be changed, in Visual mode (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
default = 262230;
|
||||
default = 262230;
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
|
|
BIN
Source/Core/Resources/LightDisabled.png
Normal file
After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 765 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 305 B |
BIN
Source/Core/Resources/ModelDisabled.png
Normal file
After Width: | Height: | Size: 610 B |
|
@ -18,6 +18,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using SlimDX.Direct3D9;
|
||||
using SlimDX;
|
||||
|
@ -417,7 +418,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
return;
|
||||
}
|
||||
|
||||
if (!General.Settings.GZAnimateLights || Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, lightType) == -1) {
|
||||
if (General.Settings.GZDrawLightsMode == LightRenderMode.ALL || Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, lightType) == -1) {
|
||||
lightRadius = lightPrimaryRadius;
|
||||
return;
|
||||
}
|
||||
|
|
163
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -175,10 +175,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
|
||||
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontoggledynlight = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontoggleanimatedlight = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontogglemodels = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonselectedmodelsonly = 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();
|
||||
this.lightsshowanimated = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.modelrendermode = new System.Windows.Forms.ToolStripSplitButton();
|
||||
this.modelsdontshow = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.modelsshowselection = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.modelsshowall = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.buttontogglefog = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontogglevisualvertices = new System.Windows.Forms.ToolStripButton();
|
||||
|
@ -359,7 +363,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.menuhelp});
|
||||
this.menumain.Location = new System.Drawing.Point(0, 0);
|
||||
this.menumain.Name = "menumain";
|
||||
this.menumain.Size = new System.Drawing.Size(420, 24);
|
||||
this.menumain.Size = new System.Drawing.Size(328, 24);
|
||||
this.menumain.TabIndex = 0;
|
||||
//
|
||||
// menufile
|
||||
|
@ -1156,10 +1160,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttonautoclearsidetextures,
|
||||
this.seperatorgeometry,
|
||||
this.buttontogglefx,
|
||||
this.buttontoggledynlight,
|
||||
this.buttontoggleanimatedlight,
|
||||
this.buttontogglemodels,
|
||||
this.buttonselectedmodelsonly,
|
||||
this.dynamiclightmode,
|
||||
this.modelrendermode,
|
||||
this.buttontogglefog,
|
||||
this.buttontoggleeventlines,
|
||||
this.buttontogglevisualvertices,
|
||||
|
@ -1412,6 +1414,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// separatorfilters
|
||||
//
|
||||
this.separatorfilters.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.separatorfilters.Name = "separatorfilters";
|
||||
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
|
@ -1429,6 +1432,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// separatorfullbrightness
|
||||
//
|
||||
this.separatorfullbrightness.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.separatorfullbrightness.Name = "separatorfullbrightness";
|
||||
this.separatorfullbrightness.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
|
@ -1527,6 +1531,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//
|
||||
// seperatorgeometry
|
||||
//
|
||||
this.seperatorgeometry.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.seperatorgeometry.Name = "seperatorgeometry";
|
||||
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
|
@ -1542,57 +1547,97 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttontogglefx.Text = "Toggle GZDoom Effects";
|
||||
this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// buttontoggledynlight
|
||||
// dynamiclightmode
|
||||
//
|
||||
this.buttontoggledynlight.CheckOnClick = true;
|
||||
this.buttontoggledynlight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttontoggledynlight.Enabled = false;
|
||||
this.buttontoggledynlight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
||||
this.buttontoggledynlight.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttontoggledynlight.Name = "buttontoggledynlight";
|
||||
this.buttontoggledynlight.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttontoggledynlight.Tag = "builder_gztogglelights";
|
||||
this.buttontoggledynlight.Text = "Toggle Dynamic Lights";
|
||||
this.buttontoggledynlight.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
this.dynamiclightmode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.dynamiclightmode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.sightsdontshow,
|
||||
this.lightsshow,
|
||||
this.lightsshowanimated});
|
||||
this.dynamiclightmode.Enabled = false;
|
||||
this.dynamiclightmode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
||||
this.dynamiclightmode.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.dynamiclightmode.Name = "dynamiclightmode";
|
||||
this.dynamiclightmode.Size = new System.Drawing.Size(32, 22);
|
||||
this.dynamiclightmode.Tag = "builder_gztogglelights";
|
||||
this.dynamiclightmode.Text = "Dynamic light mode";
|
||||
this.dynamiclightmode.ButtonClick += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// buttontoggleanimatedlight
|
||||
// sightsdontshow
|
||||
//
|
||||
this.buttontoggleanimatedlight.CheckOnClick = true;
|
||||
this.buttontoggleanimatedlight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttontoggleanimatedlight.Enabled = false;
|
||||
this.buttontoggleanimatedlight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate;
|
||||
this.buttontoggleanimatedlight.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttontoggleanimatedlight.Name = "buttontoggleanimatedlight";
|
||||
this.buttontoggleanimatedlight.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttontoggleanimatedlight.Tag = "builder_gztogglelightsanimation";
|
||||
this.buttontoggleanimatedlight.Text = "Toggle Dynamic Light Animation";
|
||||
this.buttontoggleanimatedlight.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
this.sightsdontshow.CheckOnClick = true;
|
||||
this.sightsdontshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.LightDisabled;
|
||||
this.sightsdontshow.Name = "sightsdontshow";
|
||||
this.sightsdontshow.Size = new System.Drawing.Size(237, 22);
|
||||
this.sightsdontshow.Tag = 0;
|
||||
this.sightsdontshow.Text = "No dynamic lights";
|
||||
this.sightsdontshow.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||
//
|
||||
// buttontogglemodels
|
||||
// lightsshow
|
||||
//
|
||||
this.buttontogglemodels.CheckOnClick = true;
|
||||
this.buttontogglemodels.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttontogglemodels.Enabled = false;
|
||||
this.buttontogglemodels.Image = ((System.Drawing.Image)(resources.GetObject("buttontogglemodels.Image")));
|
||||
this.buttontogglemodels.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttontogglemodels.Name = "buttontogglemodels";
|
||||
this.buttontogglemodels.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttontogglemodels.Tag = "builder_gztogglemodels";
|
||||
this.buttontogglemodels.Text = "Toggle Models Rendering";
|
||||
this.buttontogglemodels.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
this.lightsshow.CheckOnClick = true;
|
||||
this.lightsshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
||||
this.lightsshow.Name = "lightsshow";
|
||||
this.lightsshow.Size = new System.Drawing.Size(237, 22);
|
||||
this.lightsshow.Tag = 1;
|
||||
this.lightsshow.Text = "Show dynamic lights";
|
||||
this.lightsshow.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||
//
|
||||
// buttonselectedmodelsonly
|
||||
// lightsshowanimated
|
||||
//
|
||||
this.buttonselectedmodelsonly.CheckOnClick = true;
|
||||
this.buttonselectedmodelsonly.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttonselectedmodelsonly.Enabled = false;
|
||||
this.buttonselectedmodelsonly.Image = ((System.Drawing.Image)(resources.GetObject("buttonselectedmodelsonly.Image")));
|
||||
this.buttonselectedmodelsonly.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttonselectedmodelsonly.Name = "buttonselectedmodelsonly";
|
||||
this.buttonselectedmodelsonly.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttonselectedmodelsonly.Tag = "builder_gzdrawselectedmodelsonly";
|
||||
this.buttonselectedmodelsonly.Text = "Render models for selected things only";
|
||||
this.buttonselectedmodelsonly.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
this.lightsshowanimated.CheckOnClick = true;
|
||||
this.lightsshowanimated.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate;
|
||||
this.lightsshowanimated.Name = "lightsshowanimated";
|
||||
this.lightsshowanimated.Size = new System.Drawing.Size(237, 22);
|
||||
this.lightsshowanimated.Tag = 2;
|
||||
this.lightsshowanimated.Text = "Show animated dynamic lights";
|
||||
this.lightsshowanimated.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||
//
|
||||
// modelmode
|
||||
//
|
||||
this.modelrendermode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.modelrendermode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.modelsdontshow,
|
||||
this.modelsshowselection,
|
||||
this.modelsshowall});
|
||||
this.modelrendermode.Enabled = false;
|
||||
this.modelrendermode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
|
||||
this.modelrendermode.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.modelrendermode.Name = "modelmode";
|
||||
this.modelrendermode.Size = new System.Drawing.Size(32, 22);
|
||||
this.modelrendermode.Tag = "builder_gztogglemodels";
|
||||
this.modelrendermode.Text = "Model rendering mode";
|
||||
this.modelrendermode.ButtonClick += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// modelsdontshow
|
||||
//
|
||||
this.modelsdontshow.CheckOnClick = true;
|
||||
this.modelsdontshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelDisabled;
|
||||
this.modelsdontshow.Name = "modelsdontshow";
|
||||
this.modelsdontshow.Size = new System.Drawing.Size(245, 22);
|
||||
this.modelsdontshow.Tag = 0;
|
||||
this.modelsdontshow.Text = "Don\'t show models";
|
||||
this.modelsdontshow.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||
//
|
||||
// modelsshowselection
|
||||
//
|
||||
this.modelsshowselection.CheckOnClick = true;
|
||||
this.modelsshowselection.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model_selected;
|
||||
this.modelsshowselection.Name = "modelsshowselection";
|
||||
this.modelsshowselection.Size = new System.Drawing.Size(245, 22);
|
||||
this.modelsshowselection.Tag = 1;
|
||||
this.modelsshowselection.Text = "Show models for selected things";
|
||||
this.modelsshowselection.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||
//
|
||||
// modelsshowall
|
||||
//
|
||||
this.modelsshowall.CheckOnClick = true;
|
||||
this.modelsshowall.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
|
||||
this.modelsshowall.Name = "modelsshowall";
|
||||
this.modelsshowall.Size = new System.Drawing.Size(245, 22);
|
||||
this.modelsshowall.Tag = 2;
|
||||
this.modelsshowall.Text = "Show all models";
|
||||
this.modelsshowall.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||
//
|
||||
// buttontogglefog
|
||||
//
|
||||
|
@ -2363,10 +2408,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 buttontoggledynlight;
|
||||
private System.Windows.Forms.ToolStripButton buttontogglemodels;
|
||||
private System.Windows.Forms.ToolStripButton buttonselectedmodelsonly;
|
||||
private System.Windows.Forms.ToolStripButton buttontoggleanimatedlight;
|
||||
private System.Windows.Forms.ToolStripButton buttontogglefx;
|
||||
private System.Windows.Forms.ToolStripButton buttontogglefog;
|
||||
private System.Windows.Forms.ToolStripStatusLabel warnsLabel;
|
||||
|
@ -2418,5 +2459,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private ToolStripSeparator separatorio;
|
||||
private ToolStripMenuItem itemviewthingtypes;
|
||||
private StatisticsControl statistics;
|
||||
private ToolStripSplitButton dynamiclightmode;
|
||||
private ToolStripMenuItem sightsdontshow;
|
||||
private ToolStripMenuItem lightsshow;
|
||||
private ToolStripMenuItem lightsshowanimated;
|
||||
private ToolStripSplitButton modelrendermode;
|
||||
private ToolStripMenuItem modelsdontshow;
|
||||
private ToolStripMenuItem modelsshowselection;
|
||||
private ToolStripMenuItem modelsshowall;
|
||||
}
|
||||
}
|
|
@ -1464,7 +1464,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
//mxd. Add engine selector
|
||||
ToolStripMenuItem menuitem = new ToolStripMenuItem("Engine:", Resources.Marine);
|
||||
for (int i = 0; i < General.Map.ConfigSettings.TestEngines.Count; i++) {
|
||||
for (int i = 0; i < General.Map.ConfigSettings.TestEngines.Count; i++)
|
||||
{
|
||||
ToolStripMenuItem engineItem = new ToolStripMenuItem(General.Map.ConfigSettings.TestEngines[i].TestProgramName);
|
||||
engineItem.Tag = i;
|
||||
engineItem.Checked = (i == General.Map.ConfigSettings.CurrentEngineIndex);
|
||||
|
@ -1807,27 +1808,27 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
buttontest.Visible = General.Settings.ToolbarTesting;
|
||||
|
||||
//mxd
|
||||
buttontogglemodels.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttonselectedmodelsonly.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontoggledynlight.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontoggleanimatedlight.Visible = General.Settings.GZToolbarGZDoom;
|
||||
modelrendermode.Visible = General.Settings.GZToolbarGZDoom;
|
||||
dynamiclightmode.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontogglefx.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontogglefog.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom;
|
||||
buttontogglevisualvertices.Visible = General.Settings.GZToolbarGZDoom;
|
||||
separatorgzmodes.Visible = General.Settings.GZToolbarGZDoom;
|
||||
|
||||
|
||||
// Enable/disable all edit mode items
|
||||
foreach(ToolStripItem i in editmodeitems) i.Enabled = (General.Map != null);
|
||||
|
||||
//mxd. Show/hide additional panels
|
||||
modestoolbar.Visible = (General.Map != null);
|
||||
modecontrolsloolbar.Visible = (General.Map != null && modecontrolsloolbar.Items.Count > 0);
|
||||
|
||||
//mxd. modestoolbar index in Controls gets messed up when it's invisible. This fixes it. TODO: find why this happens in the first place
|
||||
if(modestoolbar.Visible) {
|
||||
if(modestoolbar.Visible)
|
||||
{
|
||||
int toolbarpos = this.Controls.IndexOf(toolbar);
|
||||
if(this.Controls.IndexOf(modestoolbar) > toolbarpos) {
|
||||
if(this.Controls.IndexOf(modestoolbar) > toolbarpos)
|
||||
{
|
||||
this.Controls.SetChildIndex(modestoolbar, toolbarpos);
|
||||
}
|
||||
}
|
||||
|
@ -1948,31 +1949,39 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
|
||||
//mxd
|
||||
public void UpdateGZDoomPanel() {
|
||||
if (General.Map != null) {
|
||||
buttontogglemodels.Enabled = true;
|
||||
buttonselectedmodelsonly.Enabled = true;
|
||||
buttontoggledynlight.Enabled = true;
|
||||
buttontoggleanimatedlight.Enabled = true;
|
||||
public void UpdateGZDoomPanel()
|
||||
{
|
||||
if (General.Map != null)
|
||||
{
|
||||
modelrendermode.Enabled = true;
|
||||
dynamiclightmode.Enabled = true;
|
||||
buttontogglefog.Enabled = true;
|
||||
buttontogglefx.Enabled = true;
|
||||
buttontoggleeventlines.Enabled = true;
|
||||
buttontogglevisualvertices.Enabled = General.Map.UDMF;
|
||||
|
||||
if (General.Settings.GZToolbarGZDoom) {
|
||||
buttontogglemodels.Checked = General.Settings.GZDrawModels;
|
||||
buttonselectedmodelsonly.Checked = General.Settings.GZDrawSelectedModelsOnly;
|
||||
buttontoggledynlight.Checked = General.Settings.GZDrawLights;
|
||||
buttontoggleanimatedlight.Checked = General.Settings.GZAnimateLights;
|
||||
if (General.Settings.GZToolbarGZDoom)
|
||||
{
|
||||
foreach(ToolStripMenuItem item in modelrendermode.DropDownItems)
|
||||
{
|
||||
item.Checked = ((ModelRenderMode)item.Tag == General.Settings.GZDrawModelsMode);
|
||||
if (item.Checked) modelrendermode.Image = item.Image;
|
||||
}
|
||||
foreach(ToolStripMenuItem item in dynamiclightmode.DropDownItems)
|
||||
{
|
||||
item.Checked = ((LightRenderMode)item.Tag == General.Settings.GZDrawLightsMode);
|
||||
if(item.Checked) dynamiclightmode.Image = item.Image;
|
||||
}
|
||||
|
||||
buttontogglefog.Checked = General.Settings.GZDrawFog;
|
||||
buttontoggleeventlines.Checked = General.Settings.GZShowEventLines;
|
||||
buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices;
|
||||
}
|
||||
} else {
|
||||
buttontogglemodels.Enabled = false;
|
||||
buttonselectedmodelsonly.Enabled = false;
|
||||
buttontoggledynlight.Enabled = false;
|
||||
buttontoggleanimatedlight.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
modelrendermode.Enabled = false;
|
||||
dynamiclightmode.Enabled = false;
|
||||
buttontogglefog.Enabled = false;
|
||||
buttontogglefx.Enabled = false;
|
||||
buttontoggleeventlines.Enabled = false;
|
||||
|
@ -3004,6 +3013,57 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Models and Lights mode (mxd)
|
||||
|
||||
private void ChangeModelRenderingMode(object sender, EventArgs e)
|
||||
{
|
||||
General.Settings.GZDrawModelsMode = (ModelRenderMode)((ToolStripMenuItem)sender).Tag;
|
||||
|
||||
switch(General.Settings.GZDrawModelsMode)
|
||||
{
|
||||
case ModelRenderMode.NONE:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||
break;
|
||||
|
||||
case ModelRenderMode.SELECTION:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: SELECTION ONLY");
|
||||
break;
|
||||
|
||||
case ModelRenderMode.ALL:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateGZDoomPanel();
|
||||
RedrawDisplay();
|
||||
}
|
||||
|
||||
private void ChangeLightRenderingMode(object sender, EventArgs e)
|
||||
{
|
||||
General.Settings.GZDrawLightsMode = (LightRenderMode)((ToolStripMenuItem)sender).Tag;
|
||||
|
||||
switch(General.Settings.GZDrawLightsMode)
|
||||
{
|
||||
case LightRenderMode.NONE:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering mode: NONE");
|
||||
break;
|
||||
|
||||
case LightRenderMode.ALL:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||
break;
|
||||
|
||||
case LightRenderMode.ALL_ANIMATED:
|
||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED");
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateGZDoomPanel();
|
||||
RedrawDisplay();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Info Panels
|
||||
|
|
|
@ -144,24 +144,6 @@
|
|||
<metadata name="toolbarContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>159, 56</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="buttontogglemodels.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABaSURBVDhPYxgFQwm4Zy//j0yTDEAa8wvLm2A0VJh4QNAA
|
||||
kAQyhgqjiOM0AF0SmQbJY5MDa4QBbBrRFWMTgwNCGmEYJgfCYI3IAKYBnQYBEBuGkflgyQEGDAwA6QWH
|
||||
HxoHRHkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="buttonselectedmodelsonly.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACWSURBVDhPY6AqeN0ucZEUDNUGAVgFcQAMtTAOMQZgqH3X
|
||||
If2VFAzWBAQoBoAZQEDIBRQZMEdR8T9ILYgG8cky4Gm95C8QnV9Y3kR9A0ASyBgsCQTIYjgNgAlio0Fq
|
||||
YGyyDADRIHUgNl4Dltf4v8ClEYZhBoAwWDMIgAwAmQbTgE6DAIgNwiADYGrh8iADSMFgTdQDDAwACnwk
|
||||
E7rnlAUAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>332, 17</value>
|
||||
</metadata>
|
||||
|
@ -186,27 +168,6 @@
|
|||
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="heightpanel1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelcollapsedinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="modename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="buttontoggleinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="linedefinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="thinginfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>433, 17</value>
|
||||
</metadata>
|
||||
|
@ -243,6 +204,7 @@
|
|||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>116</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAQAEBAAAAEAGABoAwAARgAAACAgAAABABgAqAwAAK4DAAAwMAAAAQAYAKgcAABWEAAAQEAAAAEA
|
||||
|
|
|
@ -430,7 +430,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
|
||||
//EVENTS
|
||||
private void bApply_Click(object sender, EventArgs e) {
|
||||
//clean unused sidedef textures
|
||||
// Clean unused sidedef textures
|
||||
foreach(SidedefData sd in sidedefData) {
|
||||
sd.Side.RemoveUnneededTextures(false);
|
||||
|
||||
|
@ -438,14 +438,12 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
sd.Side.Other.RemoveUnneededTextures(false);
|
||||
}
|
||||
|
||||
General.Map.Map.ClearAllSelected();
|
||||
|
||||
// Update cached values
|
||||
General.Map.Map.Update();
|
||||
General.Map.IsChanged = true;
|
||||
|
||||
if(editingModeName != "BaseVisualMode")
|
||||
General.Interface.RedrawDisplay();
|
||||
// Clear selection
|
||||
General.Actions.InvokeAction("builder_clearselection");
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
|
|
|
@ -353,6 +353,10 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
|
||||
private void bApply_Click(object sender, EventArgs e) {
|
||||
foreach(Thing t in selection) t.DetermineSector();
|
||||
|
||||
// Clear selection
|
||||
General.Actions.InvokeAction("builder_clearselection");
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -194,8 +194,8 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
|||
General.Map.Map.Update();
|
||||
General.Map.IsChanged = true;
|
||||
|
||||
if(editingModeName != "BaseVisualMode")
|
||||
General.Interface.RedrawDisplay();
|
||||
// Clear selection
|
||||
General.Actions.InvokeAction("builder_clearselection");
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
|
|
|
@ -1225,7 +1225,7 @@ ceilingalignmode
|
|||
allowscroll = true;
|
||||
}
|
||||
|
||||
togglegzdoomrenderingeffects
|
||||
togglegzdoomgeometryeffects
|
||||
{
|
||||
title = "Toggle Geometry Effects";
|
||||
category = "visual";
|
||||
|
|
|
@ -2841,12 +2841,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("togglegzdoomrenderingeffects")]
|
||||
public void ToggleGZDoomRenderingEffects() {
|
||||
[BeginAction("togglegzdoomgeometryeffects")]
|
||||
public void ToggleGZDoomRenderingEffects()
|
||||
{
|
||||
gzdoomRenderingEffects = !gzdoomRenderingEffects;
|
||||
RebuildElementData();
|
||||
UpdateChangedObjects();
|
||||
General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom rendering effects are " + (gzdoomRenderingEffects ? "ENABLED" : "DISABLED"));
|
||||
General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom geometry effects are " + (gzdoomRenderingEffects ? "ENABLED" : "DISABLED"));
|
||||
}
|
||||
|
||||
//mxd
|
||||
|
|