mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Fixed some problems where AColor was not used correctly; documentation of AColor.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@849 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ Font::Font()
|
||||
, color(AColor(0,0,0))
|
||||
, shadow_displacement(0,0)
|
||||
, shadow_blur(0)
|
||||
, separator_color(128,128,128)
|
||||
, separator_color(AColor(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, Color* other_color, double* other_size) const {
|
||||
FontP Font::make(int add_flags, AColor* other_color, double* other_size) const {
|
||||
FontP f(new Font(*this));
|
||||
f->flags |= add_flags;
|
||||
if (add_flags & FONT_CODE_STRING) {
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ class Font : public IntrusivePtrBase<Font> {
|
||||
Scriptable<AColor> shadow_color; ///< Color for shadow
|
||||
RealSize shadow_displacement; ///< Position of the shadow
|
||||
double shadow_blur; ///< Blur radius of the shadow
|
||||
Color separator_color; ///< Color for <sep> text
|
||||
AColor 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, Color* other_color, double* other_size) const;
|
||||
FontP make(int add_flags, AColor* other_color, double* other_size) const;
|
||||
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
@@ -60,13 +60,13 @@ double TextElements::scaleStep() const {
|
||||
}
|
||||
|
||||
// Colors for <atom-param> tags
|
||||
Color param_colors[] =
|
||||
{ Color(0,170,0)
|
||||
, Color(0,0,200)
|
||||
, Color(200,0,100)
|
||||
, Color(200,200,0)
|
||||
, Color(0,170,170)
|
||||
, Color(200,0,0)
|
||||
AColor param_colors[] =
|
||||
{ AColor(0,170,0)
|
||||
, AColor(0,0,200)
|
||||
, AColor(200,0,100)
|
||||
, AColor(200,200,0)
|
||||
, AColor(0,170,170)
|
||||
, AColor(200,0,0)
|
||||
};
|
||||
const size_t param_colors_count = sizeof(param_colors) / sizeof(param_colors[0]);
|
||||
|
||||
@@ -77,7 +77,7 @@ struct TextElementsFromString {
|
||||
int soft, kwpph, param, line, soft_line;
|
||||
int code, code_kw, code_string, param_ref, error;
|
||||
int param_id;
|
||||
vector<Color> colors;
|
||||
vector<AColor> colors;
|
||||
vector<double> sizes;
|
||||
/// put angle brackets around the text?
|
||||
bool bracket;
|
||||
@@ -127,7 +127,7 @@ struct TextElementsFromString {
|
||||
else if (is_substr(text, tag_start, _( "<color"))) {
|
||||
size_t colon = text.find_first_of(_(">:"), tag_start);
|
||||
if (colon < pos - 1 && text.GetChar(colon) == _(':')) {
|
||||
Color c = parse_color(text.substr(colon+1, pos-colon-2));
|
||||
AColor c = parse_acolor(text.substr(colon+1, pos-colon-2));
|
||||
if (!c.Ok()) c = style.font.color;
|
||||
colors.push_back(c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user