Merge remote-tracking branch 'origin/master' into 1.10

# Conflicts:
#	Source/Engine/Graphics/Materials/MaterialShader.h
This commit is contained in:
Wojtek Figat
2025-02-18 09:19:59 +01:00
133 changed files with 2253 additions and 654 deletions

View File

@@ -103,7 +103,19 @@ namespace FlaxEngine.GUI
var context = GPUDevice.Instance.MainContext;
_isDuringTextureDraw = true;
context.Clear(_texture.View(), Color.Transparent);
Render2D.CallDrawing(this, context, _texture);
Render2D.Begin(context, _texture);
try
{
var scale = _textureSize / Size;
Matrix3x3.Scaling(scale.X, scale.Y, 1.0f, out var scaleMatrix);
Render2D.PushTransform(ref scaleMatrix);
Draw();
Render2D.PopTransform();
}
finally
{
Render2D.End();
}
_isDuringTextureDraw = false;
Profiler.EndEventGPU();
}

View File

@@ -858,6 +858,14 @@ namespace FlaxEngine.GUI
}
}
/// <inheritdoc />
public override bool ContainsPoint(ref Float2 location, bool precise = false)
{
if (precise && this.GetType() == typeof(ContainerControl) && BackgroundColor.A <= 0.0f) // Go through transparency
return false;
return base.ContainsPoint(ref location, precise);
}
/// <inheritdoc />
public override void PerformLayout(bool force = false)
{

View File

@@ -50,7 +50,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Gets or sets the normalized position in the parent control that the upper left corner is anchored to (range 0-1).
/// </summary>
[Serialize, HideInEditor]
[Serialize, HideInEditor, Limit(0, 1, 0.01f)]
public Float2 AnchorMin
{
get => _anchorMin;
@@ -69,7 +69,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Gets or sets the normalized position in the parent control that the bottom right corner is anchored to (range 0-1).
/// </summary>
[Serialize, HideInEditor]
[Serialize, HideInEditor, Limit(0, 1, 0.01f)]
public Float2 AnchorMax
{
get => _anchorMax;