Add inherit param.

This commit is contained in:
Jean-Baptiste Perrier
2021-02-28 00:37:30 +01:00
parent 0d82be3ac8
commit 16056a00e0
2 changed files with 3 additions and 3 deletions

View File

@@ -812,11 +812,11 @@ void Render2D::PopClip()
OnClipScissors();
}
void Render2D::PushTint(const Color& tint)
void Render2D::PushTint(const Color& tint, bool inherit)
{
RENDER2D_CHECK_RENDERING_STATE;
TintLayersStack.Push(tint * TintLayersStack.Peek());
TintLayersStack.Push(inherit ? tint * TintLayersStack.Peek() : tint);
}
void Render2D::PeekTint(Color& tint)

View File

@@ -157,7 +157,7 @@ public:
/// Pushes tint color.
/// </summary>
/// <param name="tint">The tint color.</param>
API_FUNCTION() static void PushTint(API_PARAM(Ref) const Color& tint);
API_FUNCTION() static void PushTint(API_PARAM(Ref) const Color& tint, bool inherit = true);
/// <summary>
/// Peeks the current tint color.