Add missing attributes for AlphaPanel panel

#430
This commit is contained in:
Wojtek Figat
2021-05-17 10:10:42 +02:00
parent 7956ee1e2c
commit 224de66c49

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using FlaxEngine;
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEngine.GUI
{
@@ -10,12 +8,15 @@ namespace FlaxEngine.GUI
public class AlphaPanel : ContainerControl
{
/// <summary>
/// The target alpha value
/// The target alpha value.
/// </summary>
public float Alpha;
[EditorOrder(0), Limit(0, 1, 0.01f), Tooltip("The target alpha value.")]
public float Alpha = 1.0f;
/// <summary>
/// Whether or not we should ignore previous alphas
/// Whether or not we should ignore previous alphas.
/// </summary>
[EditorOrder(10), Tooltip("Whether or not we should ignore previous alphas.")]
public bool IgnoreStack;
/// <inheritdoc/>
@@ -32,8 +33,9 @@ namespace FlaxEngine.GUI
Color newColor = new Color(oldColor.R, oldColor.G, oldColor.B, oldColor.A * Alpha);
Render2D.PushTint(ref newColor, false);
}
base.Draw();
Render2D.PopTint();
}
}