@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user