Image Cartography (Patreon)
Content
Well, I haven't had the best luck the last couple days; things keep seeming to pop up and interrupt my work or take up my time. Today it was a mini-crisis at work that took up most of the day. (Though I'm actually pretty thankful to have a job that normally has free time, which gives me extra time to work on AW.) Anyway, moaning aside, it wasn't an unproductive day.
So I've bemoaned the complications with image maps in twine before, but I've since figured out how to get them working, it was really just a matter of handling them slightly differently. In fact, it's not hard at all, I just wasn't looking in the right place.
So some of the neat things you'd commonly see on an image map--like hover highlights and title text--don't exactly work in twine. However, if you take the maphilight library for jquery, and modify it a bit, you can change it so that it works in Twine SugarCube. Then, you can use the script macro to run a function using the library after the passage has finished loading. Using class designations in the standard html map element, you can call on that in the script to selectively alter your color and other settings.
The pictures above demonstrate working hover highlights and text in AW. The image is of the tier-2 home, notice that for this test I colored the "leave your house" area red, which is different from the other areas.
So now, I'm going to eat something, and then get back to some more coding :)