mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Remove AColor class, because wxColour now supports alpha values.
This commit is contained in:
+3
-3
@@ -17,10 +17,10 @@ Font::Font()
|
||||
, underline(false)
|
||||
, scale_down_to(100000)
|
||||
, max_stretch(1.0)
|
||||
, color(AColor(0,0,0))
|
||||
, color(Color(0,0,0))
|
||||
, shadow_displacement(0,0)
|
||||
, shadow_blur(0)
|
||||
, separator_color(AColor(0,0,0,128))
|
||||
, separator_color(Color(0,0,0,128))
|
||||
, flags(FONT_NORMAL)
|
||||
{}
|
||||
|
||||
@@ -50,7 +50,7 @@ void Font::initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
shadow_color.initDependencies(ctx, dep);
|
||||
}
|
||||
|
||||
FontP Font::make(int add_flags, AColor* other_color, double* other_size) 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) {
|
||||
|
||||
+13
-13
@@ -34,19 +34,19 @@ enum FontFlags
|
||||
/** Contains additional information about scaling, color and shadow */
|
||||
class Font : public IntrusivePtrBase<Font> {
|
||||
public:
|
||||
Scriptable<String> name; ///< Name of the font
|
||||
Scriptable<String> italic_name; ///< Font name for italic text (optional)
|
||||
Scriptable<double> size; ///< Size of the font
|
||||
Scriptable<String> weight, style; ///< Weight and style of the font (bold/italic)
|
||||
Scriptable<bool> underline; ///< Underlined?
|
||||
double scale_down_to; ///< Smallest size to scale down to
|
||||
double max_stretch; ///< How much should the font be stretched before scaling down?
|
||||
Scriptable<AColor> color; ///< Color to use
|
||||
Scriptable<AColor> shadow_color; ///< Color for shadow
|
||||
Scriptable<String> name; ///< Name of the font
|
||||
Scriptable<String> italic_name; ///< Font name for italic text (optional)
|
||||
Scriptable<double> size; ///< Size of the font
|
||||
Scriptable<String> weight, style; ///< Weight and style of the font (bold/italic)
|
||||
Scriptable<bool> underline; ///< Underlined?
|
||||
double scale_down_to; ///< Smallest size to scale down to
|
||||
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
|
||||
AColor separator_color; ///< Color for <sep> text
|
||||
int flags; ///< FontFlags for this font
|
||||
double shadow_blur; ///< Blur radius of the shadow
|
||||
Color separator_color; ///< Color for <sep> text
|
||||
int flags; ///< FontFlags for this font
|
||||
|
||||
Font();
|
||||
|
||||
@@ -61,7 +61,7 @@ class Font : public IntrusivePtrBase<Font> {
|
||||
}
|
||||
|
||||
/// Add style to a font, and optionally change the color and size
|
||||
FontP make(int add_flags, AColor* other_color, double* other_size) const;
|
||||
FontP make(int add_flags, Color* other_color, double* other_size) const;
|
||||
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
@@ -736,7 +736,7 @@ KeywordParamValue::operator String() const {
|
||||
KeywordParamValue::operator int() const { return *to_script(value); } // a bit of a hack
|
||||
KeywordParamValue::operator double() const { return *to_script(value); }
|
||||
KeywordParamValue::operator bool() const { return *to_script(value); }
|
||||
KeywordParamValue::operator AColor() const { return *to_script(value); }
|
||||
KeywordParamValue::operator Color() const { return *to_script(value); }
|
||||
int KeywordParamValue::itemCount() const { return to_script(value)->itemCount(); }
|
||||
|
||||
ScriptValueP KeywordParamValue::getMember(const String& name) const {
|
||||
|
||||
@@ -197,7 +197,7 @@ class KeywordParamValue : public ScriptValue {
|
||||
virtual operator int() const;
|
||||
virtual operator bool() const;
|
||||
virtual operator double() const;
|
||||
virtual operator AColor() const;
|
||||
virtual operator Color() const;
|
||||
virtual int itemCount() const;
|
||||
virtual ScriptValueP getMember(const String& name) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user