Merge remote-tracking branch 'origin/master' into 1.7
This commit is contained in:
@@ -292,7 +292,6 @@ void FoliageTools::Paint(Foliage* foliage, Span<int32> foliageTypesIndices, cons
|
||||
{
|
||||
PROFILE_CPU_NAMED("Place Instances");
|
||||
|
||||
Matrix matrix;
|
||||
FoliageInstance instance;
|
||||
Quaternion tmp;
|
||||
Matrix world;
|
||||
|
||||
@@ -80,6 +80,7 @@ namespace FlaxEditor.Windows
|
||||
public LogGroup Group;
|
||||
public LogEntryDescription Desc;
|
||||
public SpriteHandle Icon;
|
||||
public int LogCount = 1;
|
||||
|
||||
public LogEntry(DebugLogWindow window, ref LogEntryDescription desc)
|
||||
: base(0, 0, 120, DefaultHeight)
|
||||
@@ -137,7 +138,14 @@ namespace FlaxEditor.Windows
|
||||
// Title
|
||||
var textRect = new Rectangle(38, 2, clientRect.Width - 40, clientRect.Height - 10);
|
||||
Render2D.PushClip(ref clientRect);
|
||||
Render2D.DrawText(style.FontMedium, Desc.Title, textRect, style.Foreground);
|
||||
if (LogCount == 1)
|
||||
{
|
||||
Render2D.DrawText(style.FontMedium, Desc.Title, textRect, style.Foreground);
|
||||
}
|
||||
else if (LogCount > 1)
|
||||
{
|
||||
Render2D.DrawText(style.FontMedium, $"{Desc.Title} ({LogCount})", textRect, style.Foreground);
|
||||
}
|
||||
Render2D.PopClip();
|
||||
}
|
||||
|
||||
@@ -289,6 +297,7 @@ namespace FlaxEditor.Windows
|
||||
private readonly List<LogEntry> _pendingEntries = new List<LogEntry>(32);
|
||||
|
||||
private readonly ToolStripButton _clearOnPlayButton;
|
||||
private readonly ToolStripButton _collapseLogsButton;
|
||||
private readonly ToolStripButton _pauseOnErrorButton;
|
||||
private readonly ToolStripButton[] _groupButtons = new ToolStripButton[3];
|
||||
|
||||
@@ -316,6 +325,7 @@ namespace FlaxEditor.Windows
|
||||
};
|
||||
toolstrip.AddButton("Clear", Clear).LinkTooltip("Clears all log entries");
|
||||
_clearOnPlayButton = (ToolStripButton)toolstrip.AddButton("Clear on Play").SetAutoCheck(true).SetChecked(true).LinkTooltip("Clears all log entries on enter playmode");
|
||||
_collapseLogsButton = (ToolStripButton)toolstrip.AddButton("Collapse").SetAutoCheck(true).SetChecked(true).LinkTooltip("Collapses similar logs.");
|
||||
_pauseOnErrorButton = (ToolStripButton)toolstrip.AddButton("Pause on Error").SetAutoCheck(true).LinkTooltip("Performs auto pause on error");
|
||||
toolstrip.AddSeparator();
|
||||
_groupButtons[0] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Error32, () => UpdateLogTypeVisibility(LogGroup.Error, _groupButtons[0].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides error messages");
|
||||
@@ -612,6 +622,30 @@ namespace FlaxEditor.Windows
|
||||
var top = _entriesPanel.Children.Count != 0 ? _entriesPanel.Children[_entriesPanel.Children.Count - 1].Bottom + spacing : margin.Top;
|
||||
for (int i = 0; i < _pendingEntries.Count; i++)
|
||||
{
|
||||
if (_collapseLogsButton.Checked)
|
||||
{
|
||||
bool logExists = false;
|
||||
foreach (var child in _entriesPanel.Children)
|
||||
{
|
||||
if (child is LogEntry entry)
|
||||
{
|
||||
var pendingEntry = _pendingEntries[i];
|
||||
if (string.Equals(entry.Desc.Title, pendingEntry.Desc.Title, StringComparison.Ordinal) &&
|
||||
string.Equals(entry.Desc.LocationFile, pendingEntry.Desc.LocationFile, StringComparison.Ordinal) &&
|
||||
entry.Desc.Level == pendingEntry.Desc.Level &&
|
||||
string.Equals(entry.Desc.Description, pendingEntry.Desc.Description, StringComparison.Ordinal) &&
|
||||
entry.Desc.LocationLine == pendingEntry.Desc.LocationLine)
|
||||
{
|
||||
entry.LogCount += 1;
|
||||
newEntry = entry;
|
||||
logExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (logExists)
|
||||
continue;
|
||||
}
|
||||
newEntry = _pendingEntries[i];
|
||||
newEntry.Visible = _groupButtons[(int)newEntry.Group].Checked;
|
||||
anyVisible |= newEntry.Visible;
|
||||
|
||||
@@ -38,9 +38,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
BoundingBox()
|
||||
{
|
||||
}
|
||||
BoundingBox() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BoundingBox"/> struct.
|
||||
|
||||
@@ -34,9 +34,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
BoundingFrustum()
|
||||
{
|
||||
}
|
||||
BoundingFrustum() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BoundingFrustum"/> struct.
|
||||
|
||||
@@ -34,9 +34,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
BoundingSphere()
|
||||
{
|
||||
}
|
||||
BoundingSphere() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BoundingSphere"/> struct.
|
||||
|
||||
@@ -50,9 +50,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Color()
|
||||
{
|
||||
}
|
||||
Color() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Color"/> struct.
|
||||
|
||||
@@ -53,9 +53,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Color32()
|
||||
{
|
||||
}
|
||||
Color32() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Color32 with given r, g, b, a components.
|
||||
|
||||
@@ -121,9 +121,7 @@ public:
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
Half2()
|
||||
{
|
||||
}
|
||||
Half2() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
@@ -185,9 +183,7 @@ public:
|
||||
Half Z;
|
||||
|
||||
public:
|
||||
Half3()
|
||||
{
|
||||
}
|
||||
Half3() = default;
|
||||
|
||||
Half3(Half x, Half y, Half z)
|
||||
: X(x)
|
||||
@@ -242,9 +238,7 @@ public:
|
||||
Half W;
|
||||
|
||||
public:
|
||||
Half4()
|
||||
{
|
||||
}
|
||||
Half4() = default;
|
||||
|
||||
Half4(Half x, Half y, Half z, Half w)
|
||||
: X(x)
|
||||
|
||||
@@ -83,9 +83,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Matrix()
|
||||
{
|
||||
}
|
||||
Matrix() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Matrix"/> struct.
|
||||
|
||||
@@ -63,9 +63,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Matrix3x3()
|
||||
{
|
||||
}
|
||||
Matrix3x3() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Matrix3x3"/> struct.
|
||||
|
||||
@@ -30,9 +30,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Plane()
|
||||
{
|
||||
}
|
||||
Plane() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
|
||||
@@ -67,9 +67,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Quaternion()
|
||||
{
|
||||
}
|
||||
Quaternion() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Init
|
||||
|
||||
@@ -35,9 +35,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Ray()
|
||||
{
|
||||
}
|
||||
Ray() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Ray"/> struct.
|
||||
|
||||
@@ -31,9 +31,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Rectangle()
|
||||
{
|
||||
}
|
||||
Rectangle() = default;
|
||||
|
||||
// Init
|
||||
// @param x Rectangle location X coordinate
|
||||
|
||||
@@ -40,9 +40,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Transform()
|
||||
{
|
||||
}
|
||||
Transform() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Transform"/> struct.
|
||||
|
||||
@@ -30,9 +30,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Triangle()
|
||||
{
|
||||
}
|
||||
Triangle() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Triangle"/> struct.
|
||||
|
||||
@@ -60,9 +60,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Vector2Base()
|
||||
{
|
||||
}
|
||||
Vector2Base() = default;
|
||||
|
||||
FORCE_INLINE Vector2Base(T xy)
|
||||
: X(xy)
|
||||
|
||||
@@ -89,9 +89,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Vector3Base()
|
||||
{
|
||||
}
|
||||
Vector3Base() = default;
|
||||
|
||||
FORCE_INLINE Vector3Base(T xyz)
|
||||
: X(xyz)
|
||||
|
||||
@@ -76,9 +76,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Vector4Base()
|
||||
{
|
||||
}
|
||||
Vector4Base() = default;
|
||||
|
||||
FORCE_INLINE Vector4Base(T xyzw)
|
||||
: X(xyzw)
|
||||
|
||||
@@ -52,9 +52,7 @@ public:
|
||||
/// <summary>
|
||||
/// Empty constructor.
|
||||
/// </summary>
|
||||
Viewport()
|
||||
{
|
||||
}
|
||||
Viewport() = default;
|
||||
|
||||
// Init
|
||||
// @param x The x coordinate of the upper-left corner of the viewport in pixels
|
||||
|
||||
@@ -189,7 +189,7 @@ void ParticleEmitterGraphCPUExecutor::ProcessGroupTools(Box* box, Node* node, Va
|
||||
const Matrix viewProjection = context.ViewTask ? context.ViewTask->View.PrevViewProjection : Matrix::Identity;
|
||||
const Float3 position = (Float3)TryGetValue(node->GetBox(0), Value::Zero);
|
||||
Float4 projPos;
|
||||
Float3::Transform(position, viewProjection);
|
||||
Float3::Transform(position, viewProjection, projPos);
|
||||
projPos /= projPos.W;
|
||||
value = Float2(projPos.X * 0.5f + 0.5f, projPos.Y * 0.5f + 0.5f);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user