Basic text rendering working;

Added Font (done) and SymbolFont (skeleton);
Added styling to set;
Added CountourMap;
Some script fixes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@73 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-17 17:57:04 +00:00
parent ea5be88bdb
commit ce6a83e34b
45 changed files with 1595 additions and 84 deletions
+22 -2
View File
@@ -22,6 +22,12 @@ String TextField::typeName() const {
return _("text");
}
void TextField::initDependencies(Context& ctx, const Dependency& dep) const {
Field ::initDependencies(ctx, dep);
script .initDependencies(ctx, dep);
default_script.initDependencies(ctx, dep);
}
IMPLEMENT_REFLECTION(TextField) {
REFLECT_BASE(Field);
@@ -48,10 +54,19 @@ TextStyle::TextStyle(const TextFieldP& field)
, line_height_line(1.0)
{}
bool TextStyle::update(Context& ctx) {
return Style::update(ctx)
| font.update(ctx);
}
void TextStyle::initDependencies(Context& ctx, const Dependency& dep) const {
Style::initDependencies(ctx, dep);
font.initDependencies(ctx, dep);
}
IMPLEMENT_REFLECTION(TextStyle) {
REFLECT_BASE(Style);
// REFLECT(font);
// REFLECT(symbol_font);
REFLECT(font);
REFLECT(symbol_font);
REFLECT(always_symbol);
REFLECT(allow_formating);
REFLECT(alignment);
@@ -75,6 +90,11 @@ IMPLEMENT_REFLECTION(TextStyle) {
String TextValue::toString() const {
return value();
}
bool TextValue::update(Context& ctx) {
Value::update(ctx);
return field().default_script.invokeOnDefault(ctx, value)
| field(). script.invokeOn(ctx, value);
}
IMPLEMENT_REFLECTION_NAMELESS(TextValue) {
REFLECT_NAMELESS(value);