really loved this one!
avery
Creator of
Recent community posts
Hi! Haven't been able to find any discussion on this exact topic, apologies if I've missed a solution sitting right in my face.
Messing with Ply and Twee once more. I wanted to create a link that might shoot out an event when clicked, but not link between Passages. If I could define custom syntax, it might look something like:
```
:: LinkingPassage
There's a lightswitch. <Click!->flickswitch>
[[Whatever.->SomeOtherPassage]]
```
`Click!` would show up as a hyperlink that would send the event `flickswitch` out to the deck when clicked.
Now, there are some horrible ways I could do this, like linking to a passage with some tags (`SpawnDogImage`) that I ingest somewhere as in the twee.deck example, then run some logic that adds my dog image to the deck then renders the previous passage, maybe changing some state to change how the passage is rendered. Obviously, this feels pretty gross.
Is there an idiomatic way to emit an event when clicking on a rich text link in Decker that I'm missing? I'm completely fine with writing some inline Lil in my twees, custom syntax was a pipedream example..
Thank you for your incredible work on Decker as always :) hope to have something neat to show when this project is done.
Hi!
Messing around for the jam, and have been considering doing something with Ply. I'd like to be able to affect the state of my card (say, toggling visibility of some widget `toggler` by using `toggler.toggle["solid"]`) from within my Ply syntax.
Currently, with the twine player from https://beyondloom.com/decker/twee.html#twineplayer , I cannot find a way to do this. Throwing `{toggler.toggle["solid"]}` inside of the syntax here seems to have no effect. I assume this is some sandboxing / side effect of the way lil is handled by the twee library, but I'm curious if there's existing work on this topic that I could draw from instead of sitting down and plonking away at this myself.
Thanks!




