Core: Extend Color API

* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
This commit is contained in:
wmayer
2024-08-21 22:26:46 +02:00
committed by Chris Hennes
parent 224c25b770
commit ffa3fa5b5a
12 changed files with 494 additions and 50 deletions

View File

@@ -540,8 +540,9 @@ inline Color ColorGradient::getColor (float fVal) const
{
Color color = _getColor(fVal);
if (isOutsideInvisible()) {
if (isOutOfRange(fVal))
color.a = 0.8f;
if (isOutOfRange(fVal)) {
color.a = 0.2F;
}
}
return color;