mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
thumbnails for choice editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@159 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -48,15 +48,39 @@ Set::~Set() {}
|
||||
|
||||
|
||||
Context& Set::getContext() {
|
||||
assert(wxThread::IsMain());
|
||||
return script_manager->getContext(stylesheet);
|
||||
}
|
||||
Context& Set::getContext(const CardP& card) {
|
||||
assert(wxThread::IsMain());
|
||||
return script_manager->getContext(card);
|
||||
}
|
||||
void Set::updateFor(const CardP& card) {
|
||||
script_manager->updateStyles(card);
|
||||
}
|
||||
|
||||
Context& Set::getContextForThumbnails() {
|
||||
assert(!wxThread::IsMain());
|
||||
if (!thumbnail_script_context) {
|
||||
thumbnail_script_context.reset(new SetScriptContext(*this));
|
||||
}
|
||||
return thumbnail_script_context->getContext(stylesheet);
|
||||
}
|
||||
Context& Set::getContextForThumbnails(const CardP& card) {
|
||||
assert(!wxThread::IsMain());
|
||||
if (!thumbnail_script_context) {
|
||||
thumbnail_script_context.reset(new SetScriptContext(*this));
|
||||
}
|
||||
return thumbnail_script_context->getContext(card);
|
||||
}
|
||||
Context& Set::getContextForThumbnails(const StyleSheetP& stylesheet) {
|
||||
assert(!wxThread::IsMain());
|
||||
if (!thumbnail_script_context) {
|
||||
thumbnail_script_context.reset(new SetScriptContext(*this));
|
||||
}
|
||||
return thumbnail_script_context->getContext(stylesheet);
|
||||
}
|
||||
|
||||
StyleSheetP Set::stylesheetFor(const CardP& card) {
|
||||
if (card && card->stylesheet) return card->stylesheet;
|
||||
else return stylesheet;
|
||||
|
||||
Reference in New Issue
Block a user