mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added <color:???> and <size:???> tags for changing text color/size
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@831 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+4
-1
@@ -48,7 +48,7 @@ void Font::initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
shadow_color.initDependencies(ctx, dep);
|
||||
}
|
||||
|
||||
FontP Font::make(int add_flags, Color* other_color) const {
|
||||
FontP Font::make(int add_flags, Color* other_color, double* other_size) const {
|
||||
FontP f(new Font(*this));
|
||||
f->flags |= add_flags;
|
||||
if (add_flags & FONT_CODE_STRING) {
|
||||
@@ -68,6 +68,9 @@ FontP Font::make(int add_flags, Color* other_color) const {
|
||||
if (other_color) {
|
||||
f->color = *other_color;
|
||||
}
|
||||
if (other_size) {
|
||||
f->size = *other_size;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -58,8 +58,8 @@ class Font : public IntrusivePtrBase<Font> {
|
||||
return shadow_displacement.width != 0 || shadow_displacement.height != 0;
|
||||
}
|
||||
|
||||
/// Add style to a font, and optionally change the color
|
||||
FontP make(int add_flags, Color* other_color) const;
|
||||
/// Add style to a font, and optionally change the color and size
|
||||
FontP make(int add_flags, Color* other_color, double* other_size) const;
|
||||
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
Reference in New Issue
Block a user