diff --git a/src/jngl/font.cpp b/src/jngl/font.cpp index d727c2b9..d829798b 100644 --- a/src/jngl/font.cpp +++ b/src/jngl/font.cpp @@ -13,6 +13,10 @@ namespace jngl { Rgba gFontColor{ 0, 0, 0, 1 }; +void setFontColor(const Rgba color) { + gFontColor = color; +} + void setFontColor(const Rgb color, float alpha) { gFontColor = Rgba(color, Alpha(alpha)); } diff --git a/src/jngl/font.hpp b/src/jngl/font.hpp index 3fdb3ff7..0b3285b0 100644 --- a/src/jngl/font.hpp +++ b/src/jngl/font.hpp @@ -5,6 +5,7 @@ #pragma once #include "Rgb.hpp" +#include "Rgba.hpp" #include "Vec2.hpp" #include @@ -87,6 +88,9 @@ void setFont(const std::string& filename); /// platforms. void setFontByName(const std::string& name); +/// Sets the color and alpha value of the currently active font +void setFontColor(Rgba); + /// Sets the color of the currently active font and the alpha value /// /// \a alpha goes from 0.0f to 1.0f (opaque). It's automatically clamped to these values.