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