mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
+22
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user