Make some values scriptable

color radius
color left width
color right width
color top width
color bottom width
font shadow displacement x
font shadow displacement y
font shadow blur
This commit is contained in:
GenevensiS
2025-07-14 00:23:45 +02:00
committed by GitHub
parent dafd1a4f19
commit 58ab8f3636
7 changed files with 51 additions and 24 deletions
+4 -3
View File
@@ -42,8 +42,9 @@ public:
double max_stretch; ///< How much should the font be stretched before scaling down?
Scriptable<Color> color; ///< Color to use
Scriptable<Color> shadow_color; ///< Color for shadow
RealSize shadow_displacement; ///< Position of the shadow
double shadow_blur; ///< Blur radius of the shadow
Scriptable<double> shadow_displacement_x;///< Position of the shadow
Scriptable<double> shadow_displacement_y;///< Position of the shadow
Scriptable<double> shadow_blur; ///< Blur radius of the shadow
Color separator_color; ///< Color for <sep> text
int flags; ///< FontFlags for this font
@@ -61,7 +62,7 @@ public:
/// Does this font have a shadow?
inline bool hasShadow() const {
return shadow_displacement.width != 0 || shadow_displacement.height != 0;
return shadow_displacement_x != 0.0 || shadow_displacement_y != 0.0;
}
/// Add style to a font, and optionally change the font family, color and size