Fixed, Randomize Things window: "Same width and height" scale setting was not applied properly.

Fixed incorrect formatting of changelog messages displayed in the updater window.
Changed, Classic modes: models for things hidden by thing filter are now rendered with much lower alpha than the "regular" ones.
This commit is contained in:
MaxED 2015-07-02 10:07:43 +00:00
parent 12f532208f
commit 414a18ad90
3 changed files with 22 additions and 14 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel;
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text;
@ -121,7 +122,7 @@ namespace CodeImp.DoomBuilder
{
if(prop.Name == "msg")
{
sb.Append(prop.InnerText.Trim()).Append(@"\par\par ");
sb.Append(prop.InnerText.Trim().Replace(Environment.NewLine, @"\par ")).Append(@"\par\par ");
break;
}
}

View file

@ -1326,6 +1326,11 @@ namespace CodeImp.DoomBuilder.Rendering
Color4 cHighlight = General.Colors.Highlight.ToColorValue();
Color4 cWire = General.Colors.ModelWireframe.ToColorValue();
if(alpha < 1.0f)
{
cHighlight.Alpha = alpha * 0.25f;
cWire.Alpha = cHighlight.Alpha;
}
Matrix viewscale = Matrix.Scaling(scale, -scale, 0.0f);
ModelData mde;

View file

@ -264,14 +264,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
private void ApplyScale()
{
if(cbUniformScale.Checked)
{
ApplyScale((float)minScaleX.Value, (float)maxScaleX.Value, (float)minScaleX.Value, (float)maxScaleX.Value);
}
else
{
ApplyScale((float)minScaleX.Value, (float)maxScaleX.Value, (float)minScaleY.Value, (float)maxScaleY.Value);
}
ApplyScale((float)minScaleX.Value, (float)maxScaleX.Value, (float)minScaleY.Value, (float)maxScaleY.Value);
//update view
if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay();
@ -279,6 +272,12 @@ namespace CodeImp.DoomBuilder.BuilderEffects
private void ApplyScale(float minX, float maxX, float minY, float maxY)
{
if(cbUniformScale.Checked)
{
minY = minX;
maxY = maxX;
}
if(minX > maxX) General.Swap(ref minX, ref maxX);
if(minY > maxY) General.Swap(ref minY, ref maxY);
@ -288,15 +287,18 @@ namespace CodeImp.DoomBuilder.BuilderEffects
for(int i = 0; i < selection.Count; i++)
{
float jitterX = thingData[i].JitterScaleX;
float jitterY = (cbUniformScale.Checked ? jitterX : thingData[i].JitterScaleY);
if (cbRelativeScale.Checked)
{
sx = thingData[i].ScaleX + minX + diffX * thingData[i].JitterScaleX;
sy = thingData[i].ScaleY + minY + diffY * thingData[i].JitterScaleY;
sx = thingData[i].ScaleX + minX + diffX * jitterX;
sy = thingData[i].ScaleY + minY + diffY * jitterY;
}
else
{
sx = minX + diffX * thingData[i].JitterScaleX;
sy = minY + diffY * thingData[i].JitterScaleY;
sx = minX + diffX * jitterX;
sy = minY + diffY * jitterY;
}
selection[i].SetScale(sx, sy);