Made symbol font size and alignment scriptable.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1091 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-08 00:35:53 +00:00
parent 01630e0f5f
commit 01a220f199
4 changed files with 20 additions and 15 deletions
+9 -4
View File
@@ -550,17 +550,22 @@ bool SymbolFontRef::valid() const {
}
bool SymbolFontRef::update(Context& ctx) {
bool changes = false;
if (name.update(ctx)) {
// font name changed, load another font
loadFont(ctx);
return true;
} else {
if (!font) loadFont(ctx);
return false;
changes = true;
} else if (!font) {
loadFont(ctx);
}
changes |= size.update(ctx);
changes |= alignment.update(ctx);
return changes;
}
void SymbolFontRef::initDependencies(Context& ctx, const Dependency& dep) const {
name.initDependencies(ctx, dep);
size.initDependencies(ctx, dep);
alignment.initDependencies(ctx, dep);
}
void SymbolFontRef::loadFont(Context& ctx) {