I am trying to set up an image map where, on click, a dialog opens that prints the contents of another passage. So far, I’ve gotten the image map to work, got the dialog to open, but what prints is a string of the code I was using to call the passage, not the passage itself.
Here’s the specific line of the area map that’s no quite working: <area shape="rect" alt="mirror" coords="568,280,888,520" onclick="SugarCube.Dialog.setup('', 'description');SugarCube.Dialog.wiki('SugarCube.Story.get("Test Description").processText()');SugarCube.Dialog.open();"/>
The result:
And here’s the full passage code (though I haven’t added anything to the other parts of the image map until i get this part solved).
<map id="qmarsha" name="qmarsha">
<area shape="rect" alt="mirror" coords="568,280,888,520" onclick="SugarCube.Dialog.setup('', 'description');SugarCube.Dialog.wiki('SugarCube.Story.get("Test Description").processText()');SugarCube.Dialog.open();"/>
<area shape="poly" alt="bed" title="" coords="-4,480,296,428,484,636,976,748,980,892,808,988,600,908,328,1052,4,960,4,960"/>
<area shape="poly" alt="window" title="" coords="1088,72,1064,568,1556,696,1548,128"/>
<area shape="poly" alt="bench" title="" coords="1468,944,1592,648,1680,620,1864,700,1896,1052,1688,1024"/>
<area shape="poly" alt="locker" title="" coords="1656,320,1808,344,1812,16,1656,52"/>
</map>
<div class="resizable imageMapObserve">
<img id="room" @src="$setup_path+'images/abstractbedroomtest.png'" usemap="#qmarsha">
</div>
Thank you for any help in advance!