diff --git a/Readme.md b/Readme.md
index 008530d..6d0a901 100644
--- a/Readme.md
+++ b/Readme.md
@@ -3,6 +3,8 @@
A lightweight storylet manager for Twee and Sugarcube.
+
+
## Feature list
- [X] Generating potential storylets based on state
@@ -12,5 +14,5 @@ A lightweight storylet manager for Twee and Sugarcube.
- [ ] Storylets bound to specific data
- [ ] Storylet with any binding
- [ ] Storylet tagging and filtering (i.e. pull from only a subset of storylets)
-- [ ] Macro / widget for displaying storylet links
-- [ ]
\ No newline at end of file
+- [X] Widget for displaying storylet links
+ - [ ] Make the widget into a macro
\ No newline at end of file
diff --git a/examples/ball_game.html b/examples/ball_game.html
index 7edb79f..4c30a25 100644
--- a/examples/ball_game.html
+++ b/examples/ball_game.html
@@ -100,7 +100,7 @@ var saveAs=saveAs||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||f
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
- <<set $poetry = 0>>
+Config.passages.nobr = true; // Deal with linebreaks.<<widget ShowStorylets>>
+ <<for _storylet range $args[0]>>
+ <<capture _storylet>>
+ [[_storylet.description|_storylet.passage][$payload=_storylet.payload]]<br>
+ <</capture>>
+ <</for>>
+<</widget>><<set $poetry = 0>>
<<set $gossip = 0>>
-You can go to the [[Ballroom]] or the [[Library]].<<set $location = "Ballroom">>
+You can go to the [[Ballroom]] or the [[Library]].<<set $location = "Ballroom">>
You're in the ballroom.<br>
<<set _possibleStories = window.NM.getNStorylets(3)>>
-<<for _story range _possibleStories>>
- <<capture _story>>
- [[_story.description|_story.passage][$payload=_story.payload]]<br>
- <</capture>>
-<</for>>
-Or you can go to the [[Library]]<<set $partner = $payload["character"]>>
+<<ShowStorylets _possibleStories>>
+Or you can go to the [[Library]]<<set $partner = $payload["character"]>>
You take <<print $partner.firstname>>'s hand and step onto the dance floor. As you dance, you can
talk about [[poetry|Conversation-Poetry-Dancing]], [[trade gossip|Conversation-Gossip]], the latest
-[[current events|Conversation-Politics-Dancing]] -- or you can [[dance in silence|Dance-Quietly]].<br><<if $poetry > $partner.poetry>>
+[[current events|Conversation-Politics-Dancing]] -- or you can [[dance in silence|Dance-Quietly]].<br><<if $poetry > $partner.poetry>>
(Poetry success)
<<elseif $poetry <= $partner.poetry>>
(Poetry fail)
@@ -256,10 +258,10 @@ talk about [[poetry|Conversation-Poetry-Dancing]], [[trade gossip|Conversation-G
<</if>>
<</if>>
<br>
-[[Return | Ballroom]](This is inappropriate to do while dancing)
+[[Return | Ballroom]](This is inappropriate to do while dancing)
<<set $characters[$partner.id].romance = $partner.romance - 1>>
-[[Return | Ballroom]](Dance quietly, some chance of improving romance goes here)
-[[Return | Ballroom]]<<if $gossip > $partner.gossip>>
+[[Return | Ballroom]](Dance quietly, some chance of improving romance goes here)
+[[Return | Ballroom]]<<if $gossip > $partner.gossip>>
"I heard-" you begin archy, and are able to share some juicy gossip you heard earlier, earning a smile.
<<elseif $gossip <= $partner.gossip>>
You bring up a rumor you read earlier, but you can see it's old news already.
@@ -273,17 +275,14 @@ Fortunately, they reply with a rumor of their own -- one you haven't heard y
[[Return | Ballroom]]
<<elseif $location == "Library">>
[[Return | Library]]
-<</if>><<set $location = "Library">>
+<</if>><<set $location = "Library">>
You're in the library.<br>
<<set _possibleStories = window.NM.getNStorylets(3)>>
-<<for _story range _possibleStories>>
- <<capture _story>>
- [[_story.description|_story.passage][$payload=_story.payload]]<br>
- <</capture>>
-<</for>>
-Or you can go to the [[Ballroom]]<<set $partner = $payload["character"]>>
+<<ShowStorylets _possibleStories>>
+
+Or you can go to the [[Ballroom]]<<set $partner = $payload["character"]>>
You talk to $partner.firstname in the library. You can talk about [[poetry|Conversation-Poetry-Talking]], [[trade gossip|Conversation-Gossip]], or the latest
-[[current events|Conversation-Politics-Talking]].<br><<if $poetry > $partner.poetry>>
+[[current events|Conversation-Politics-Talking]].<br><<if $poetry > $partner.poetry>>
(Poetry success)
<<elseif $poetry <= $partner.poetry>>
(Poetry fail)
@@ -293,7 +292,7 @@ You talk to $partner.firstname in the library. You can talk about [[poetry|Conve
<</if>>
<</if>>
<br>
-[[Return | Library]]<<if random(0, 100) < 50>>
+[[Return | Library]]<<if random(0, 100) < 50>>
<<set $characters[$partner.id].friendship = $partner.friendship + 1>>
(Politics conversation success)
<<else>>
diff --git a/examples/ball_game.tw b/examples/ball_game.tw
index eb17618..b3da4e6 100644
--- a/examples/ball_game.tw
+++ b/examples/ball_game.tw
@@ -18,11 +18,7 @@ You can go to the [[Ballroom]] or the [[Library]].
<>
You're in the ballroom.
<>
-<>
- <>
- [[_story.description|_story.passage][$payload=_story.payload]]
- <>
-<>
+<>
Or you can go to the [[Library]]
@@ -76,11 +72,8 @@ Fortunately, they reply with a rumor of their own -- one you haven't heard yet.
<>
You're in the library.
<>
-<>
- <>
- [[_story.description|_story.passage][$payload=_story.payload]]
- <>
-<>
+<>
+
Or you can go to the [[Ballroom]]
:: ConversationRoot
diff --git a/storymanager-widgets.tw b/storymanager-widgets.tw
new file mode 100644
index 0000000..0572f54
--- /dev/null
+++ b/storymanager-widgets.tw
@@ -0,0 +1,8 @@
+:: StoryManager Widgets [widget]
+<>
+ <>
+ <>
+ [[_storylet.description|_storylet.passage][$payload=_storylet.payload]]
+ <>
+ <>
+<>
\ No newline at end of file