Merge remote-tracking branch 'origin/master' into 1.10
# Conflicts: # Source/Engine/Graphics/Materials/MaterialShader.h
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user