mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Content dependent scripted images of (multiple) choice values are now updated correctly
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1064 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -59,6 +59,12 @@ void draw_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& style,
|
||||
if (style.render_style & RENDER_IMAGE) {
|
||||
// draw image
|
||||
CachedScriptableImage& img = style.image;
|
||||
if (style.content_dependent) {
|
||||
// re run script
|
||||
Context& ctx = viewer.viewer.getContext();
|
||||
ctx.setVariable(SCRIPT_VAR_input, to_script(value));
|
||||
img.update(ctx);
|
||||
}
|
||||
if (img.isReady()) {
|
||||
GeneratedImage::Options img_options;
|
||||
get_options(dc, viewer, style, img_options);
|
||||
|
||||
Reference in New Issue
Block a user