sugarcube-3
sugarcube-3 copied to clipboard
Add a "popout" window
As a fix for the "long return" problem for the <<return>>
macro (see issue #19), how about adding a "popout" tag which could be added to passages, and rather than them going to a new passage, it would simply pop the content over top of the current passage in a closeable window (similar to a dialog, but covers up the passage entirely).
Once you close the "popout" window, then you'll still be right where you left off. Going to a non-"popout" passage would also close the "popout" window. If you went from one "popout" passage to another, it would simply close the existing popout window, and then open the "new" popout window (same "window" but with the new "popout" passage's content). <<back>>
and <<return>>
would also close the "popout" window, though I'm not sure if/how you'd want to handle undoing variable changes in the <<back>>
case.
You might also want to create a :popoutClose event and/or <<popoutClose>>
macro (for use in "popout" tagged passages) so that they can trigger other code when the "popout" window is closed.