Changed, Texture Browser window: "All" textures group is now saved/reselected like the rest of the texture groups when closing/opening the window.

Changed, Classic modes: bigger Thing arrows are now rendered when thing sprite rendering is skipped.
Changed, Classic modes: when "Fixed Things Scale" option is enabled, thing size stays at 2x scale instead of 1x when extra bounding box is rendered.
Added Preferences -> Appearance -> "Things transparency (Things mode)" slider.
Renamed Preferences -> Appearance -> "Things transparency" to "Things transparency (other modes)".
Externalized thing bounding box and arrow texture, used to render things in Classic modes (Textures/ThingTexture2D.png).
Updated ZDoom_DECORATE.cfg (A_SetUserVarFloat, A_SetUserArrayFloat).
This commit is contained in:
MaxED 2016-04-01 10:49:19 +00:00
parent f646dd7a57
commit a9c64fe521
39 changed files with 224 additions and 151 deletions

View file

@ -248,6 +248,7 @@ keywords
A_SetTics = "A_SetTics(int tics)";
A_SetTranslucent = "A_SetTranslucent(float alpha[, int mode = 0])";
A_SetUserVar = "A_SetUserVar(str name, int value)";
A_SetUserVarFloat = "A_SetUserVarFloat(str name, float value)";
A_TransferPointer = "A_TransferPointer(int source, int recipient, int sourcefield, int recipientfield[, int flags])\nflags: PTROP flags.";
A_UnHideThing = "A_UnHideThing";
A_UnsetFloat = "A_UnsetFloat";
@ -379,6 +380,7 @@ keywords
A_RocketInFlight = "A_RocketInFlight";
A_SetGravity = "A_SetGravity(float gravity)\nSets the amount of gravity for the calling actor.";
A_SetUserArray = "A_SetUserArray(str name, int index, int value)";
A_SetUserArrayFloat = "A_SetUserArrayFloat(str name, int index, float value)";
A_ShootGun = "A_ShootGun";
A_SPosAttackUseAtkSound = "A_SPosAttackUseAtkSound";
//Mathematical functions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -682,7 +682,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Resources\Actions.cfg" />
<EmbeddedResource Include="Resources\display2d.fx" />
<EmbeddedResource Include="Resources\Thing2D.png" />
<EmbeddedResource Include="Resources\ThingTexture2D.png" />
<EmbeddedResource Include="Resources\things2d.fx" />
<EmbeddedResource Include="Resources\world3d.fx" />
</ItemGroup>

View file

@ -50,6 +50,7 @@ namespace CodeImp.DoomBuilder.Config
private float visualmousesensy;
private int imagebrightness;
private float doublesidedalpha;
private float activethingsalpha; //mxd
private float inactivethingsalpha; //mxd
private float hiddenthingsalpha; //mxd
private byte doublesidedalphabyte;
@ -153,6 +154,7 @@ namespace CodeImp.DoomBuilder.Config
public int ImageBrightness { get { return imagebrightness; } internal set { imagebrightness = value; } }
public float DoubleSidedAlpha { get { return doublesidedalpha; } internal set { doublesidedalpha = value; doublesidedalphabyte = (byte)(doublesidedalpha * 255f); } }
public byte DoubleSidedAlphaByte { get { return doublesidedalphabyte; } }
public float ActiveThingsAlpha { get { return activethingsalpha; } internal set { activethingsalpha = value; } } //mxd
public float InactiveThingsAlpha { get { return inactivethingsalpha; } internal set { inactivethingsalpha = value; } } //mxd
public float HiddenThingsAlpha { get { return hiddenthingsalpha; } internal set { hiddenthingsalpha = value; } } //mxd
public float BackgroundAlpha { get { return backgroundalpha; } internal set { backgroundalpha = value; } }
@ -282,6 +284,7 @@ namespace CodeImp.DoomBuilder.Config
imagebrightness = cfg.ReadSetting("imagebrightness", 3);
doublesidedalpha = cfg.ReadSetting("doublesidedalpha", 0.4f);
doublesidedalphabyte = (byte)(doublesidedalpha * 255f);
activethingsalpha = cfg.ReadSetting("activethingsalpha", Presentation.THINGS_ALPHA); //mxd
inactivethingsalpha = cfg.ReadSetting("inactivethingsalpha", Presentation.THINGS_BACK_ALPHA); //mxd
hiddenthingsalpha = cfg.ReadSetting("hiddenthingsalpha", Presentation.THINGS_HIDDEN_ALPHA); //mxd
backgroundalpha = cfg.ReadSetting("backgroundalpha", 1.0f);
@ -392,6 +395,7 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("qualitydisplay", qualitydisplay);
cfg.WriteSetting("testmonsters", testmonsters);
cfg.WriteSetting("doublesidedalpha", doublesidedalpha);
cfg.WriteSetting("activethingsalpha", activethingsalpha); //mxd
cfg.WriteSetting("inactivethingsalpha", inactivethingsalpha); //mxd
cfg.WriteSetting("hiddenthingsalpha", hiddenthingsalpha); //mxd
cfg.WriteSetting("backgroundalpha", backgroundalpha);

View file

@ -124,6 +124,7 @@ namespace CodeImp.DoomBuilder.Data
private Dictionary<string, ImageData> internalsprites;
private ImageData whitetexture;
private ImageData blacktexture; //mxd
private ImageData thingtexture; //mxd
//mxd. Sky textures
private CubeTexture skybox; // GZDoom skybox
@ -180,6 +181,7 @@ namespace CodeImp.DoomBuilder.Data
public ImageData CrosshairBusy3D { get { return crosshairbusy; } }
public ImageData WhiteTexture { get { return whitetexture; } }
public ImageData BlackTexture { get { return blacktexture; } } //mxd
public ImageData ThingTexture { get { return thingtexture; } } //mxd
public ImageData[] CommentTextures { get { return commenttextures; } } //mxd
internal CubeTexture SkyBox { get { return skybox; } } //mxd
public List<ThingCategory> ThingCategories { get { return thingcategories; } }
@ -258,6 +260,8 @@ namespace CodeImp.DoomBuilder.Data
whitetexture = null;
blacktexture.Dispose(); //mxd
blacktexture = null; //mxd
thingtexture.Dispose(); //mxd
thingtexture = null; //mxd
unknownimage.Dispose(); //mxd
unknownimage = null; //mxd
for(int i = 0; i < commenttextures.Length; i++) //mxd
@ -1195,11 +1199,15 @@ namespace CodeImp.DoomBuilder.Data
//mxd
private void LoadInternalTextures()
{
missingtexture3d = LoadInternalTexture("MissingTexture3D.png"); //mxd
unknowntexture3d = LoadInternalTexture("UnknownTexture3D.png"); //mxd
hourglass3d = LoadInternalTexture("Hourglass3D.png"); //mxd
crosshair = LoadInternalTexture("Crosshair.png"); //mxd
crosshairbusy = LoadInternalTexture("CrosshairBusy.png"); //mxd
missingtexture3d = LoadInternalTexture("MissingTexture3D.png");
unknowntexture3d = LoadInternalTexture("UnknownTexture3D.png");
thingtexture = LoadInternalTexture("ThingTexture2D.png");
hourglass3d = LoadInternalTexture("Hourglass3D.png");
crosshair = LoadInternalTexture("Crosshair.png");
crosshairbusy = LoadInternalTexture("CrosshairBusy.png");
thingtexture.UseColorCorrection = false;
thingtexture.CreateTexture();
}
//mxd

View file

@ -51,11 +51,7 @@ namespace CodeImp.DoomBuilder.Rendering
private const float THING_SPRITE_SHRINK = 2f;
private const int THING_BUFFER_SIZE = 100;
private const float MINIMUM_THING_RADIUS = 1.5f; //mxd
private const float MINIMUM_SPRITE_RADIUS = 5.5f; //mxd
private const string FONT_NAME = "Verdana";
private const int FONT_WIDTH = 0;
private const int FONT_HEIGHT = 0;
private const float MINIMUM_SPRITE_RADIUS = 8.0f; //mxd
internal const int NUM_VIEW_MODES = 4;
@ -80,9 +76,6 @@ namespace CodeImp.DoomBuilder.Rendering
private Size thingssize;
private Size overlaysize;
private Size backsize;
// Font
private SlimDX.Direct3D9.Font font;
// Geometry plotter
private Plotter plotter;
@ -101,9 +94,6 @@ namespace CodeImp.DoomBuilder.Rendering
// Surfaces
private SurfaceManager surfaces;
// Images
private ResourceImage thingtexture;
// View settings (world coordinates)
private ViewMode viewmode;
private float scale;
@ -146,11 +136,6 @@ namespace CodeImp.DoomBuilder.Rendering
// Constructor
internal Renderer2D(D3DDevice graphics) : base(graphics)
{
//mxd. Load thing texture
thingtexture = new ResourceImage("CodeImp.DoomBuilder.Resources.Thing2D.png") { UseColorCorrection = false };
thingtexture.LoadImage();
thingtexture.CreateTexture();
// Create surface manager
surfaces = new SurfaceManager();
@ -169,7 +154,6 @@ namespace CodeImp.DoomBuilder.Rendering
{
// Destroy rendertargets
DestroyRendertargets();
thingtexture.Dispose(); //mxd
// Dispose surface manager
surfaces.Dispose();
@ -371,10 +355,6 @@ namespace CodeImp.DoomBuilder.Rendering
thingsvertices = null;
lastgridscale = -1f;
lastgridsize = 0;
// Trash font
if(font != null) font.Dispose();
font = null;
}
// Allocates new image memory to render on
@ -417,9 +397,6 @@ namespace CodeImp.DoomBuilder.Rendering
graphics.ClearRendertarget(General.Colors.Background.WithAlpha(0).ToColorValue(), thingstex.GetSurfaceLevel(0), null);
graphics.ClearRendertarget(General.Colors.Background.WithAlpha(0).ToColorValue(), overlaytex.GetSurfaceLevel(0), null);
// Create font
font = new SlimDX.Direct3D9.Font(graphics.Device, FONT_WIDTH, FONT_HEIGHT, FontWeight.Bold, 1, false, CharacterSet.Ansi, Precision.Default, FontQuality.Antialiased, PitchAndFamily.Default, FONT_NAME);
// Create vertex buffers
screenverts = new VertexBuffer(graphics.Device, 4 * sizeof(FlatVertex), Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default);
thingsvertices = new VertexBuffer(graphics.Device, THING_BUFFER_SIZE * 12 * sizeof(FlatVertex), Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default);
@ -957,14 +934,15 @@ namespace CodeImp.DoomBuilder.Rendering
// This makes vertices for a thing
// Returns false when not on the screen
private bool CreateThingBoxVerts(Thing t, ref FlatVertex[] verts, ref List<Line3D> bboxes, Dictionary<Thing, Vector2D> thingsByPosition, int offset, PixelColor c, byte bboxalpha)
private bool CreateThingBoxVerts(Thing t, ref FlatVertex[] verts, ref List<Line3D> bboxes, Dictionary<Thing, Vector3D> thingsByPosition, int offset, PixelColor c, byte bboxalpha)
{
if(t.Size * scale < MINIMUM_THING_RADIUS) return false; //mxd. Don't render tiny little things
// Determine sizes
float circlesize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size : t.Size * scale);
float bboxsize = ((!t.FixedSize && General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size * scale : -1); //mxd
float screensize = Math.Max(circlesize, bboxsize); //mxd
float fixedscaler = (t.FixedSize ? 1.0f : 2.0f); //mxd
float circlesize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > fixedscaler) ? t.Size * fixedscaler : t.Size * scale);
float bboxsize = ((!t.FixedSize && General.Settings.FixedThingsScale) && (scale > 2.0f) ? t.Size * scale : -1); //mxd
float screensize = (bboxsize > 0 ? bboxsize : circlesize); //mxd
// Transform to screen coordinates
Vector2D screenpos = ((Vector2D)t.Position).GetTransformed(translatex, translatey, scale, -scale);
@ -1030,32 +1008,50 @@ namespace CodeImp.DoomBuilder.Rendering
}
//mxd
private void CreateThingArrowVerts(Thing t, ref FlatVertex[] verts, Vector2D screenpos, int offset)
private void CreateThingArrowVerts(Thing t, ref FlatVertex[] verts, Vector3D screenpos, int offset)
{
// Determine size
float arrowsize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size : t.Size * scale) * THING_ARROW_SIZE; //mxd
float fixedscaler = (t.FixedSize ? 1.0f : 2.0f);
float arrowsize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > fixedscaler) ? t.Size * fixedscaler : t.Size * scale) * THING_ARROW_SIZE; //mxd
// Setup rotated rect for arrow
float sinarrowsize = (float)Math.Sin(t.Angle + Angle2D.PI * 0.25f) * arrowsize;
float cosarrowsize = (float)Math.Cos(t.Angle + Angle2D.PI * 0.25f) * arrowsize;
// Sprite is not rendered?
float ut, ub, ul, ur;
if(screenpos.z < 0)
{
ul = 0.625f;
ur = 0.874f;
ut = -0.039f;
ub = 0.46f;
}
else
{
ul = 0.501f;
ur = 0.999f;
ut = 0.001f;
ub = 0.999f;
}
verts[offset].x = screenpos.x + sinarrowsize;
verts[offset].y = screenpos.y + cosarrowsize;
verts[offset].c = -1;
verts[offset].u = 0.501f;
verts[offset].v = 0.001f;
verts[offset].u = ul;
verts[offset].v = ut;
offset++;
verts[offset].x = screenpos.x - cosarrowsize;
verts[offset].y = screenpos.y + sinarrowsize;
verts[offset].c = -1;
verts[offset].u = 0.999f;
verts[offset].v = 0.001f;
verts[offset].u = ur;
verts[offset].v = ut;
offset++;
verts[offset].x = screenpos.x + cosarrowsize;
verts[offset].y = screenpos.y - sinarrowsize;
verts[offset].c = -1;
verts[offset].u = 0.501f;
verts[offset].v = 0.999f;
verts[offset].u = ul;
verts[offset].v = ub;
offset++;
verts[offset] = verts[offset - 2];
offset++;
@ -1064,8 +1060,8 @@ namespace CodeImp.DoomBuilder.Rendering
verts[offset].x = screenpos.x - sinarrowsize;
verts[offset].y = screenpos.y - cosarrowsize;
verts[offset].c = -1;
verts[offset].u = 0.999f;
verts[offset].v = 0.999f;
verts[offset].u = ur;
verts[offset].v = ub;
}
//mxd
@ -1125,7 +1121,7 @@ namespace CodeImp.DoomBuilder.Rendering
graphics.Device.SetStreamSource(0, thingsvertices, 0, FlatVertex.Stride);
// Set things texture
graphics.Shaders.Things2D.Texture1 = thingtexture.Texture;
graphics.Shaders.Things2D.Texture1 = General.Map.Data.ThingTexture.Texture; //mxd
SetWorldTransformation(false);
graphics.Shaders.Things2D.SetSettings(alpha);
@ -1141,7 +1137,7 @@ namespace CodeImp.DoomBuilder.Rendering
//mxd
Dictionary<int, List<Thing>> thingsByType = new Dictionary<int, List<Thing>>();
Dictionary<int, List<Thing>> modelsByType = new Dictionary<int, List<Thing>>();
Dictionary<Thing, Vector2D> thingsByPosition = new Dictionary<Thing, Vector2D>();
Dictionary<Thing, Vector3D> thingsByPosition = new Dictionary<Thing, Vector3D>();
// Go for all things
int buffercount = 0;
@ -1236,7 +1232,8 @@ namespace CodeImp.DoomBuilder.Rendering
totalcount = 0;
float spriteWidth, spriteHeight;
float spriteScale = ((group.Value[0].FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f)) ? 1.0f : scale;
float fixedscaler = (group.Value[0].FixedSize ? 1.0f : 2.0f);
float spriteScale = ((group.Value[0].FixedSize || General.Settings.FixedThingsScale) && (scale > fixedscaler)) ? fixedscaler : scale;
if(sprite.Width > sprite.Height)
{
@ -1258,7 +1255,16 @@ namespace CodeImp.DoomBuilder.Rendering
{
if(t.IsModel && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || (General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && t.Selected) || (General.Settings.GZDrawModelsMode == ModelRenderMode.ACTIVE_THINGS_FILTER && alpha == 1.0f))) continue;
float scaler = t.Size / info.Radius;
if(Math.Max(spriteWidth, spriteHeight) * scaler < MINIMUM_SPRITE_RADIUS) continue; //don't render tiny little sprites
if(Math.Max(spriteWidth, spriteHeight) * scaler < MINIMUM_SPRITE_RADIUS)
{
// Hackish way to tell arrow rendering code to draw bigger arrow...
Vector3D v = thingsByPosition[t];
v.z = -1;
thingsByPosition[t] = v;
// Don't render tiny little sprites
continue;
}
CreateThingSpriteVerts(thingsByPosition[t], spriteWidth * scaler, spriteHeight * scaler, ref verts, buffercount * 6, t.Selected ? selectionColor : 0xFFFFFF);
buffercount++;
@ -1298,7 +1304,7 @@ namespace CodeImp.DoomBuilder.Rendering
graphics.Shaders.Things2D.EndPass();
//mxd. Render thing arrows
graphics.Shaders.Things2D.Texture1 = thingtexture.Texture;
graphics.Shaders.Things2D.Texture1 = General.Map.Data.ThingTexture.Texture;
graphics.Shaders.Things2D.BeginPass(0);
// Determine next lock size
@ -1309,7 +1315,7 @@ namespace CodeImp.DoomBuilder.Rendering
buffercount = 0;
totalcount = 0;
foreach(KeyValuePair<Thing, Vector2D> group in thingsByPosition)
foreach(KeyValuePair<Thing, Vector3D> group in thingsByPosition)
{
if(!group.Key.IsDirectional) continue;
@ -1368,7 +1374,7 @@ namespace CodeImp.DoomBuilder.Rendering
foreach(KeyValuePair<int, List<Thing>> group in modelsByType)
{
ModelData mde = General.Map.Data.ModeldefEntries[@group.Key];
ModelData mde = General.Map.Data.ModeldefEntries[group.Key];
foreach(Thing t in group.Value)
{
if((General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && !t.Selected) || (General.Settings.GZDrawModelsMode == ModelRenderMode.ACTIVE_THINGS_FILTER && alpha < 1.0f)) continue;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -144,6 +144,9 @@ namespace CodeImp.DoomBuilder.Windows
this.blackbrowsers = new System.Windows.Forms.CheckBox();
this.cbMarkExtraFloors = new System.Windows.Forms.CheckBox();
this.appearancegroup1 = new System.Windows.Forms.GroupBox();
this.activethingsalphalabel = new System.Windows.Forms.Label();
this.label31 = new System.Windows.Forms.Label();
this.activethingsalpha = new System.Windows.Forms.TrackBar();
this.hiddenthingsalphalabel = new System.Windows.Forms.Label();
this.label32 = new System.Windows.Forms.Label();
this.inactivethingsalphalabel = new System.Windows.Forms.Label();
@ -246,6 +249,7 @@ namespace CodeImp.DoomBuilder.Windows
this.tabcolors.SuspendLayout();
this.groupBox10.SuspendLayout();
this.appearancegroup1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.antialiasing)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).BeginInit();
@ -580,7 +584,7 @@ namespace CodeImp.DoomBuilder.Windows
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(45, 134);
label1.Location = new System.Drawing.Point(45, 171);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(143, 13);
label1.TabIndex = 20;
@ -590,7 +594,7 @@ namespace CodeImp.DoomBuilder.Windows
// label18
//
label18.AutoSize = true;
label18.Location = new System.Drawing.Point(41, 171);
label18.Location = new System.Drawing.Point(41, 208);
label18.Name = "label18";
label18.Size = new System.Drawing.Size(147, 13);
label18.TabIndex = 25;
@ -602,7 +606,7 @@ namespace CodeImp.DoomBuilder.Windows
// label20
//
label20.AutoSize = true;
label20.Location = new System.Drawing.Point(94, 208);
label20.Location = new System.Drawing.Point(94, 245);
label20.Name = "label20";
label20.Size = new System.Drawing.Size(94, 13);
label20.TabIndex = 28;
@ -612,7 +616,7 @@ namespace CodeImp.DoomBuilder.Windows
// label21
//
label21.AutoSize = true;
label21.Location = new System.Drawing.Point(74, 245);
label21.Location = new System.Drawing.Point(74, 282);
label21.Name = "label21";
label21.Size = new System.Drawing.Size(114, 13);
label21.TabIndex = 31;
@ -622,7 +626,7 @@ namespace CodeImp.DoomBuilder.Windows
// label27
//
label27.AutoSize = true;
label27.Location = new System.Drawing.Point(90, 282);
label27.Location = new System.Drawing.Point(90, 319);
label27.Name = "label27";
label27.Size = new System.Drawing.Size(98, 13);
label27.TabIndex = 35;
@ -632,7 +636,7 @@ namespace CodeImp.DoomBuilder.Windows
// label29
//
label29.AutoSize = true;
label29.Location = new System.Drawing.Point(97, 319);
label29.Location = new System.Drawing.Point(97, 356);
label29.Name = "label29";
label29.Size = new System.Drawing.Size(91, 13);
label29.TabIndex = 38;
@ -817,7 +821,7 @@ namespace CodeImp.DoomBuilder.Windows
// doublesidedalphalabel
//
this.doublesidedalphalabel.AutoSize = true;
this.doublesidedalphalabel.Location = new System.Drawing.Point(360, 23);
this.doublesidedalphalabel.Location = new System.Drawing.Point(359, 23);
this.doublesidedalphalabel.Name = "doublesidedalphalabel";
this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13);
this.doublesidedalphalabel.TabIndex = 16;
@ -826,10 +830,10 @@ namespace CodeImp.DoomBuilder.Windows
// cbStretchView
//
this.cbStretchView.AutoSize = true;
this.cbStretchView.Location = new System.Drawing.Point(229, 363);
this.cbStretchView.Location = new System.Drawing.Point(229, 413);
this.cbStretchView.Name = "cbStretchView";
this.cbStretchView.Size = new System.Drawing.Size(172, 17);
this.cbStretchView.TabIndex = 12;
this.cbStretchView.TabIndex = 13;
this.cbStretchView.Text = "Stretched view in visual modes";
this.toolTip1.SetToolTip(this.cbStretchView, "When enabled, visual mode will emulate \r\n(G)ZDoom\'s way of rendering by increasin" +
"g\r\nvertical scale of the world geometry and \r\nsprites by 15%.\r\n");
@ -838,10 +842,10 @@ namespace CodeImp.DoomBuilder.Windows
// qualitydisplay
//
this.qualitydisplay.AutoSize = true;
this.qualitydisplay.Location = new System.Drawing.Point(18, 363);
this.qualitydisplay.Location = new System.Drawing.Point(18, 413);
this.qualitydisplay.Name = "qualitydisplay";
this.qualitydisplay.Size = new System.Drawing.Size(128, 17);
this.qualitydisplay.TabIndex = 9;
this.qualitydisplay.TabIndex = 10;
this.qualitydisplay.Text = "High quality rendering";
this.qualitydisplay.UseVisualStyleBackColor = true;
//
@ -1551,6 +1555,9 @@ namespace CodeImp.DoomBuilder.Windows
this.appearancegroup1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.appearancegroup1.Controls.Add(this.activethingsalphalabel);
this.appearancegroup1.Controls.Add(this.label31);
this.appearancegroup1.Controls.Add(this.activethingsalpha);
this.appearancegroup1.Controls.Add(this.hiddenthingsalphalabel);
this.appearancegroup1.Controls.Add(this.label32);
this.appearancegroup1.Controls.Add(this.inactivethingsalphalabel);
@ -1591,10 +1598,41 @@ namespace CodeImp.DoomBuilder.Windows
this.appearancegroup1.TabStop = false;
this.appearancegroup1.Text = " Rendering ";
//
// activethingsalphalabel
//
this.activethingsalphalabel.AutoSize = true;
this.activethingsalphalabel.Location = new System.Drawing.Point(359, 60);
this.activethingsalphalabel.Name = "activethingsalphalabel";
this.activethingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.activethingsalphalabel.TabIndex = 48;
this.activethingsalphalabel.Text = "0%";
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(12, 60);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(176, 13);
this.label31.TabIndex = 47;
this.label31.Text = "Things transparency (Things mode):";
this.label31.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.toolTip1.SetToolTip(this.label31, "Sets Things transparency in all classic\r\nmodes except Things mode");
//
// activethingsalpha
//
this.activethingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.activethingsalpha.LargeChange = 3;
this.activethingsalpha.Location = new System.Drawing.Point(199, 49);
this.activethingsalpha.Name = "activethingsalpha";
this.activethingsalpha.Size = new System.Drawing.Size(154, 45);
this.activethingsalpha.TabIndex = 1;
this.activethingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.activethingsalpha.ValueChanged += new System.EventHandler(this.activethingsalpha_ValueChanged);
//
// hiddenthingsalphalabel
//
this.hiddenthingsalphalabel.AutoSize = true;
this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 97);
this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 134);
this.hiddenthingsalphalabel.Name = "hiddenthingsalphalabel";
this.hiddenthingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.hiddenthingsalphalabel.TabIndex = 45;
@ -1603,7 +1641,7 @@ namespace CodeImp.DoomBuilder.Windows
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(45, 97);
this.label32.Location = new System.Drawing.Point(45, 134);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(143, 13);
this.label32.TabIndex = 44;
@ -1614,7 +1652,7 @@ namespace CodeImp.DoomBuilder.Windows
// inactivethingsalphalabel
//
this.inactivethingsalphalabel.AutoSize = true;
this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 60);
this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 97);
this.inactivethingsalphalabel.Name = "inactivethingsalphalabel";
this.inactivethingsalphalabel.Size = new System.Drawing.Size(21, 13);
this.inactivethingsalphalabel.TabIndex = 42;
@ -1623,18 +1661,18 @@ namespace CodeImp.DoomBuilder.Windows
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(82, 60);
this.label30.Location = new System.Drawing.Point(16, 97);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(106, 13);
this.label30.Size = new System.Drawing.Size(173, 13);
this.label30.TabIndex = 41;
this.label30.Text = "Things transparency:";
this.label30.Text = "Things transparency (other modes):";
this.label30.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.toolTip1.SetToolTip(this.label30, "Sets Things transparency in all classic\r\nmodes except Things mode");
//
// labelantialiasing
//
this.labelantialiasing.AutoSize = true;
this.labelantialiasing.Location = new System.Drawing.Point(359, 319);
this.labelantialiasing.Location = new System.Drawing.Point(359, 356);
this.labelantialiasing.Name = "labelantialiasing";
this.labelantialiasing.Size = new System.Drawing.Size(54, 13);
this.labelantialiasing.TabIndex = 39;
@ -1644,11 +1682,11 @@ namespace CodeImp.DoomBuilder.Windows
//
this.antialiasing.BackColor = System.Drawing.SystemColors.Window;
this.antialiasing.LargeChange = 1;
this.antialiasing.Location = new System.Drawing.Point(199, 308);
this.antialiasing.Location = new System.Drawing.Point(199, 345);
this.antialiasing.Maximum = 3;
this.antialiasing.Name = "antialiasing";
this.antialiasing.Size = new System.Drawing.Size(154, 45);
this.antialiasing.TabIndex = 8;
this.antialiasing.TabIndex = 9;
this.antialiasing.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.antialiasing.Value = 3;
this.antialiasing.ValueChanged += new System.EventHandler(this.antialiasing_ValueChanged);
@ -1656,7 +1694,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelanisotropicfiltering
//
this.labelanisotropicfiltering.AutoSize = true;
this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 282);
this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 319);
this.labelanisotropicfiltering.Name = "labelanisotropicfiltering";
this.labelanisotropicfiltering.Size = new System.Drawing.Size(24, 13);
this.labelanisotropicfiltering.TabIndex = 36;
@ -1666,11 +1704,11 @@ namespace CodeImp.DoomBuilder.Windows
//
this.anisotropicfiltering.BackColor = System.Drawing.SystemColors.Window;
this.anisotropicfiltering.LargeChange = 1;
this.anisotropicfiltering.Location = new System.Drawing.Point(199, 271);
this.anisotropicfiltering.Location = new System.Drawing.Point(199, 308);
this.anisotropicfiltering.Maximum = 4;
this.anisotropicfiltering.Name = "anisotropicfiltering";
this.anisotropicfiltering.Size = new System.Drawing.Size(154, 45);
this.anisotropicfiltering.TabIndex = 7;
this.anisotropicfiltering.TabIndex = 8;
this.anisotropicfiltering.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.anisotropicfiltering.Value = 4;
this.anisotropicfiltering.ValueChanged += new System.EventHandler(this.anisotropicfiltering_ValueChanged);
@ -1678,10 +1716,10 @@ namespace CodeImp.DoomBuilder.Windows
// cbOldHighlightMode
//
this.cbOldHighlightMode.AutoSize = true;
this.cbOldHighlightMode.Location = new System.Drawing.Point(229, 409);
this.cbOldHighlightMode.Location = new System.Drawing.Point(229, 459);
this.cbOldHighlightMode.Name = "cbOldHighlightMode";
this.cbOldHighlightMode.Size = new System.Drawing.Size(207, 17);
this.cbOldHighlightMode.TabIndex = 14;
this.cbOldHighlightMode.TabIndex = 15;
this.cbOldHighlightMode.Text = "Always show selection in visual modes";
this.toolTip1.SetToolTip(this.cbOldHighlightMode, "If enabled, selected surfaces will be highlighted in Visual mode\r\neven if \"Show h" +
"ighlight\" mode is disabled \r\n(Doom Builder 2 behaviour).");
@ -1690,7 +1728,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelDynLightIntensity
//
this.labelDynLightIntensity.AutoSize = true;
this.labelDynLightIntensity.Location = new System.Drawing.Point(359, 245);
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;
@ -1700,11 +1738,11 @@ namespace CodeImp.DoomBuilder.Windows
//
this.tbDynLightIntensity.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightIntensity.LargeChange = 1;
this.tbDynLightIntensity.Location = new System.Drawing.Point(199, 234);
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 = 6;
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);
@ -1712,7 +1750,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelDynLightSize
//
this.labelDynLightSize.AutoSize = true;
this.labelDynLightSize.Location = new System.Drawing.Point(359, 208);
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;
@ -1722,12 +1760,12 @@ namespace CodeImp.DoomBuilder.Windows
//
this.tbDynLightSize.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightSize.LargeChange = 1;
this.tbDynLightSize.Location = new System.Drawing.Point(199, 197);
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 = 5;
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);
@ -1735,7 +1773,7 @@ namespace CodeImp.DoomBuilder.Windows
// labelDynLightCount
//
this.labelDynLightCount.AutoSize = true;
this.labelDynLightCount.Location = new System.Drawing.Point(359, 171);
this.labelDynLightCount.Location = new System.Drawing.Point(359, 208);
this.labelDynLightCount.Name = "labelDynLightCount";
this.labelDynLightCount.Size = new System.Drawing.Size(19, 13);
this.labelDynLightCount.TabIndex = 26;
@ -1745,12 +1783,12 @@ namespace CodeImp.DoomBuilder.Windows
//
this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window;
this.tbDynLightCount.LargeChange = 3;
this.tbDynLightCount.Location = new System.Drawing.Point(199, 160);
this.tbDynLightCount.Location = new System.Drawing.Point(199, 197);
this.tbDynLightCount.Maximum = 32;
this.tbDynLightCount.Minimum = 1;
this.tbDynLightCount.Name = "tbDynLightCount";
this.tbDynLightCount.Size = new System.Drawing.Size(154, 45);
this.tbDynLightCount.TabIndex = 4;
this.tbDynLightCount.TabIndex = 5;
this.tbDynLightCount.TickFrequency = 4;
this.tbDynLightCount.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.tbDynLightCount.Value = 1;
@ -1760,20 +1798,20 @@ namespace CodeImp.DoomBuilder.Windows
//
this.imagebrightness.BackColor = System.Drawing.SystemColors.Window;
this.imagebrightness.LargeChange = 3;
this.imagebrightness.Location = new System.Drawing.Point(199, 123);
this.imagebrightness.Location = new System.Drawing.Point(199, 160);
this.imagebrightness.Name = "imagebrightness";
this.imagebrightness.Size = new System.Drawing.Size(154, 45);
this.imagebrightness.TabIndex = 3;
this.imagebrightness.TabIndex = 4;
this.imagebrightness.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.imagebrightness.ValueChanged += new System.EventHandler(this.imagebrightness_ValueChanged);
//
// animatevisualselection
//
this.animatevisualselection.AutoSize = true;
this.animatevisualselection.Location = new System.Drawing.Point(229, 386);
this.animatevisualselection.Location = new System.Drawing.Point(229, 436);
this.animatevisualselection.Name = "animatevisualselection";
this.animatevisualselection.Size = new System.Drawing.Size(190, 17);
this.animatevisualselection.TabIndex = 13;
this.animatevisualselection.TabIndex = 14;
this.animatevisualselection.Text = "Animated selection in visual modes";
this.animatevisualselection.UseVisualStyleBackColor = true;
//
@ -1781,10 +1819,10 @@ namespace CodeImp.DoomBuilder.Windows
//
this.hiddenthingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.hiddenthingsalpha.LargeChange = 3;
this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 86);
this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 123);
this.hiddenthingsalpha.Name = "hiddenthingsalpha";
this.hiddenthingsalpha.Size = new System.Drawing.Size(154, 45);
this.hiddenthingsalpha.TabIndex = 2;
this.hiddenthingsalpha.TabIndex = 3;
this.hiddenthingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.hiddenthingsalpha.ValueChanged += new System.EventHandler(this.hiddenthingsalpha_ValueChanged);
//
@ -1792,37 +1830,37 @@ namespace CodeImp.DoomBuilder.Windows
//
this.inactivethingsalpha.BackColor = System.Drawing.SystemColors.Window;
this.inactivethingsalpha.LargeChange = 3;
this.inactivethingsalpha.Location = new System.Drawing.Point(199, 49);
this.inactivethingsalpha.Location = new System.Drawing.Point(199, 86);
this.inactivethingsalpha.Name = "inactivethingsalpha";
this.inactivethingsalpha.Size = new System.Drawing.Size(154, 45);
this.inactivethingsalpha.TabIndex = 1;
this.inactivethingsalpha.TabIndex = 2;
this.inactivethingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.inactivethingsalpha.ValueChanged += new System.EventHandler(this.inactivethingsalpha_ValueChanged);
//
// visualbilinear
//
this.visualbilinear.AutoSize = true;
this.visualbilinear.Location = new System.Drawing.Point(18, 409);
this.visualbilinear.Location = new System.Drawing.Point(18, 459);
this.visualbilinear.Name = "visualbilinear";
this.visualbilinear.Size = new System.Drawing.Size(171, 17);
this.visualbilinear.TabIndex = 11;
this.visualbilinear.TabIndex = 12;
this.visualbilinear.Text = "Bilinear filtering in visual modes";
this.visualbilinear.UseVisualStyleBackColor = true;
//
// classicbilinear
//
this.classicbilinear.AutoSize = true;
this.classicbilinear.Location = new System.Drawing.Point(18, 386);
this.classicbilinear.Location = new System.Drawing.Point(18, 436);
this.classicbilinear.Name = "classicbilinear";
this.classicbilinear.Size = new System.Drawing.Size(176, 17);
this.classicbilinear.TabIndex = 10;
this.classicbilinear.TabIndex = 11;
this.classicbilinear.Text = "Bilinear filtering in classic modes";
this.classicbilinear.UseVisualStyleBackColor = true;
//
// imagebrightnesslabel
//
this.imagebrightnesslabel.AutoSize = true;
this.imagebrightnesslabel.Location = new System.Drawing.Point(359, 134);
this.imagebrightnesslabel.Location = new System.Drawing.Point(360, 171);
this.imagebrightnesslabel.Name = "imagebrightnesslabel";
this.imagebrightnesslabel.Size = new System.Drawing.Size(30, 13);
this.imagebrightnesslabel.TabIndex = 22;
@ -2438,6 +2476,7 @@ namespace CodeImp.DoomBuilder.Windows
this.groupBox10.PerformLayout();
this.appearancegroup1.ResumeLayout(false);
this.appearancegroup1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.antialiasing)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).EndInit();
@ -2634,5 +2673,8 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Label hiddenthingsalphalabel;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.TrackBar hiddenthingsalpha;
private System.Windows.Forms.Label activethingsalphalabel;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.TrackBar activethingsalpha;
}
}

View file

@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.Windows
// Interface
imagebrightness.Value = General.Settings.ImageBrightness;
doublesidedalpha.Value = General.Clamp((int)((1.0f - General.Settings.DoubleSidedAlpha) * 10.0f), doublesidedalpha.Minimum, doublesidedalpha.Maximum);
activethingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.ActiveThingsAlpha) * 10.0f), activethingsalpha.Minimum, activethingsalpha.Maximum); //mxd
inactivethingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.InactiveThingsAlpha) * 10.0f), inactivethingsalpha.Minimum, inactivethingsalpha.Maximum); //mxd
hiddenthingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.HiddenThingsAlpha) * 10.0f), hiddenthingsalpha.Minimum, hiddenthingsalpha.Maximum); //mxd
defaultviewmode.SelectedIndex = General.Settings.DefaultViewMode;
@ -263,6 +264,7 @@ namespace CodeImp.DoomBuilder.Windows
// Apply interface
General.Settings.ImageBrightness = imagebrightness.Value;
General.Settings.DoubleSidedAlpha = 1.0f - (doublesidedalpha.Value * 0.1f);
General.Settings.ActiveThingsAlpha = 1.0f - (activethingsalpha.Value * 0.1f); //mxd
General.Settings.InactiveThingsAlpha = 1.0f - (inactivethingsalpha.Value * 0.1f); //mxd
General.Settings.HiddenThingsAlpha = 1.0f - (hiddenthingsalpha.Value * 0.1f); //mxd
General.Settings.DefaultViewMode = defaultviewmode.SelectedIndex;
@ -937,6 +939,13 @@ namespace CodeImp.DoomBuilder.Windows
doublesidedalphalabel.Text = percent + "%";
}
//mxd
private void activethingsalpha_ValueChanged(object sender, EventArgs e)
{
int percent = activethingsalpha.Value * 10;
activethingsalphalabel.Text = percent + "%";
}
//mxd
private void inactivethingsalpha_ValueChanged(object sender, EventArgs e)
{

View file

@ -129,17 +129,17 @@ namespace CodeImp.DoomBuilder.Windows
if(General.Settings.LocateTextureGroup)
{
//mxd. Get the previously selected texture set
string selectname = General.Settings.ReadSetting("browserwindow.textureset", "");
string prevtextureset = General.Settings.ReadSetting("browserwindow.textureset", "");
TreeNode match;
// When texture name is empty, select "All" texture set
if(string.IsNullOrEmpty(selectname) || selectname == "-")
// When texture set name is empty, select "All" texture set
if(string.IsNullOrEmpty(prevtextureset))
{
match = tvTextureSets.Nodes[tvTextureSets.Nodes.Count - 1];
}
else
{
match = FindNodeByName(tvTextureSets.Nodes, selectname);
match = FindNodeByName(tvTextureSets.Nodes, prevtextureset);
}
if(match != null)
@ -466,8 +466,8 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.WriteSetting("browserwindow.splittercollapsed", splitter.IsCollapsed); //mxd
General.Settings.WriteSetting("browserwindow.usedgroupcollapsed", browser.IsGroupCollapsed(usedgroup)); //mxd
//mxd. Save last selected texture set, if it's not "All" (it will be selected anyway if search for initial texture set fails)
if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNodes.Count > 0 && !(tvTextureSets.SelectedNodes[0].Tag is AllTextureSet))
//mxd. Save last selected texture set
if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNodes.Count > 0)
General.Settings.WriteSetting("browserwindow.textureset", tvTextureSets.SelectedNodes[0].Name);
//mxd. Save ImageBrowserControl settings

View file

@ -372,7 +372,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -244,7 +244,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -128,7 +128,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Start rendering things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}
}
@ -160,8 +160,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -147,7 +147,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}
}
@ -180,8 +180,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -314,13 +314,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
// Render things
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha);
renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha);
// Draw the dragged item highlighted
// This is important to know, because this item is used
// for snapping to the grid and snapping to nearest items
renderer.RenderThing(dragitem, General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.RenderThing(dragitem, General.Colors.Highlight, General.Settings.ActiveThingsAlpha);
// Done
renderer.Finish();

View file

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

View file

@ -718,7 +718,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -344,7 +344,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(renderer.StartThings(false))
{
renderer.RenderThing((Thing)highlighted, renderer.DetermineThingColor((Thing)highlighted), Presentation.THINGS_ALPHA);
renderer.RenderThing((Thing)highlighted, renderer.DetermineThingColor((Thing)highlighted), General.Settings.ActiveThingsAlpha);
renderer.Finish();
}
}
@ -368,7 +368,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(renderer.StartThings(false))
{
renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}
}
@ -1569,8 +1569,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
if(highlighted is Thing) renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
if(highlighted is Thing) renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

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

View file

@ -141,7 +141,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
if(BuilderPlug.Me.FindReplaceForm.Finder != null)
BuilderPlug.Me.FindReplaceForm.Finder.RenderThingsSelection(renderer, selection);
renderer.Finish();

View file

@ -876,7 +876,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -412,7 +412,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -345,7 +345,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -764,7 +764,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -188,13 +188,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Render things
if(renderer.StartThings(true))
{
float alpha = (General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); //mxd
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, alpha);
for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines);
if((highlighted != null) && !highlighted.IsDisposed)
{
renderer.RenderThing(highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.RenderThing(highlighted, General.Colors.Highlight, alpha);
BuilderPlug.RenderReverseAssociations(renderer, highlightasso, eventlines); //mxd
}
@ -302,7 +303,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(false))
{
// Redraw highlight to show selection
renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), Presentation.THINGS_ALPHA);
renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha);
renderer.Finish();
renderer.Present();
}
@ -327,7 +328,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(false))
{
// Render highlighted item
renderer.RenderThing(highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.RenderThing(highlighted, General.Colors.Highlight, General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha);
renderer.Finish();
renderer.Present();
}
@ -370,7 +371,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(false))
{
// Redraw highlight to show selection
renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), Presentation.THINGS_ALPHA);
renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha);
renderer.Finish();
renderer.Present();
}

View file

@ -156,7 +156,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void RenderOverlaySelection(IRenderer2D renderer)
{
foreach(Thing thing in things)
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
#endregion

View file

@ -60,7 +60,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// This removes the thing

View file

@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// mxd. More rencering

View file

@ -84,8 +84,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing1, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing2, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing1, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
renderer.RenderThing(thing2, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// This removes the first thing

View file

@ -73,7 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// This removes the thing

View file

@ -57,7 +57,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// This removes the thing

View file

@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Rendering
public override void RenderOverlaySelection(IRenderer2D renderer)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// This removes the thing

View file

@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void RenderThingsSelection(IRenderer2D renderer, FindReplaceObject[] selection)
{
foreach(FindReplaceObject o in selection)
renderer.RenderThing(o.Thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(o.Thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
// Edit objects

View file

@ -629,7 +629,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in General.Map.Map.Things)
{
if(!asso.Tags.Contains(t.Tag)) continue;
renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA);
renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha);
if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(asso.Center, t.Position)); //mxd
}
break;
@ -706,7 +706,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
((action.Args[3].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[3]))) ||
((action.Args[4].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[4]))))
{
renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA);
renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha);
if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(t.Position, asso.Center)); //mxd
}
}
@ -722,7 +722,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
((ti.Args[3].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[3]))) ||
((ti.Args[4].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[4]))))
{
renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA);
renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha);
if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(t.Position, asso.Center));
}
}

View file

@ -313,12 +313,13 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
{
foreach(SoundEnvironment se in BuilderPlug.Me.SoundEnvironments)
{
if(se.Things.Count > 0) renderer.RenderThingSet(se.Things, Presentation.THINGS_ALPHA);
if(se.Things.Count > 0) renderer.RenderThingSet(se.Things, General.Settings.ActiveThingsAlpha);
}
}
//mxd. Render highlighted thing
if(highlightedthing != null) renderer.RenderThing(highlightedthing, General.Colors.Selection, Presentation.THINGS_ALPHA);
if(highlightedthing != null)
renderer.RenderThing(highlightedthing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}

View file

@ -280,7 +280,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.InactiveThingsAlpha);
foreach(Thing thing in huntingThings)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha);
}
renderer.Finish();

View file

@ -1388,7 +1388,7 @@ namespace CodeImp.DoomBuilder.StairSectorBuilderMode
// Render things
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha);
renderer.Finish();
}