mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
feat: add internal support for underlined text (closes #29)
This commit is contained in:
+4
-1
@@ -50,7 +50,7 @@ void Font::initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
shadow_color.initDependencies(ctx, dep);
|
||||
}
|
||||
|
||||
FontP Font::make(int add_flags, String const* other_family, Color const* other_color, double const* other_size) const {
|
||||
FontP Font::make(int add_flags, bool add_underline, String const* other_family, Color const* other_color, double const* other_size) const {
|
||||
FontP f(new Font(*this));
|
||||
f->flags |= add_flags;
|
||||
if (add_flags & FONT_CODE_STRING) {
|
||||
@@ -66,6 +66,9 @@ FontP Font::make(int add_flags, String const* other_family, Color const* other_c
|
||||
if (add_flags & FONT_SOFT) {
|
||||
f->color = f->separator_color;
|
||||
f->shadow_displacement = RealSize(0,0); // no shadow
|
||||
}
|
||||
if (add_underline) {
|
||||
f->underline = true;
|
||||
}
|
||||
if (other_color) {
|
||||
f->color = *other_color;
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
|
||||
/// Add style to a font, and optionally change the font family, color and size
|
||||
FontP make(int add_flags, String const* other_family, Color const* other_color, double const* other_size) const;
|
||||
FontP make(int add_flags, bool add_underline, String const* other_family, Color const* other_color, double const* other_size) const;
|
||||
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
Reference in New Issue
Block a user