I’m trying to learn Chapbook but the one thing so far I really miss is the popup windows that could be summoned in AXMA by preceding a link with an asterisk like [[*Inventory|invpassage]].
I know that the normal thing is to link to a new passage and use a back link, but this feels clunkier and I tried to make an inventory link that resides in the header, but I get stuck if the player clicks a header link twice because the {back} link in the inventory passage forgets where it needs to go.
I know Sugarcube does it, yeah, yeah. I should learn JavaScript, yeah I know…
Is there any way to replicate this feature in Chapbook - especially for use in layered menu passages - or do I just need to suppress this need to use them and figure out how to do menu-type passages another way?
I was just searching for a solution to my problem and this is my question exactly. Has anyone come up with a way to put a running inventory/status link in a header/footer? The best option I can think of is defining the header in every single passage in the story, but I’m hoping there’s a tidier way.
A possible short term work around is to use the [if] modifier combined with the passage.namelookup variable to conditionally suppress a menu item that relates to the currently shown Passage.
The following TWEE Notation based example shows how to use the {embed passage:}insert to source header content from a child Passage. and the [append]modifier to suppress the line-break between each menu item.
:: Start
config.header.center: "{embed passage: 'Menu'}"
--
This is the {passage.name} passage.
:: Menu
[if passage.name !== 'Inventory']
[[Inventory]]
[append]
[if passage.name !== 'Help']
[[Help]]
:: Inventory
This is the {passage.name} passage.
:: Help
This is the {passage.name} passage.
note: whether or not the above is a “good” solution is an entirely different question.
Hey, it works! I didn’t think to try embedding a passage in the header line, but that’s exactly what I needed. Thanks so much, I really appreciate the help!