History Layout
A History layout shows the past dialogue lines, so the reader can read them again.
The layout has 3 special elements. One of them repeats once for each past line, from the oldest to the newest.
This example makes a simple list of past lines in a new layout called My History.
Create the layout
- Create a layout. Under Layout Type, choose History. See Create a layout.
- Open the new layout. The Elements list is empty.
Add a column for the lines
The lines need a container that puts them in a column. Without it, all lines show in the same place.
-
Add a Container. See Container.
-
In the Elements list, tap Container. Its settings open.
-
Under Layout, find Direction. Tap the right button.
Add the history item
-
Open the menu of Container.
- Phone or tablet: In the Elements list, tap the three dots button next to Container.
- Desktop: In the Elements list, right-click Container.
-
Scroll down the menu. Tap Container (History Item).
-
Open the menu of Container (History Item). Scroll down, and tap Text (History Line Content).
-
Open the menu of Container (History Item) again. Scroll down, and tap Text (History Character Name).
A new element goes first in its container. So the name is now above the words.
The canvas shows 3 sample lines in a column.
Test it in Preview
- At the top, tap Preview.
- Under Number of History Lines, choose how many lines to show, from 1 to 6.
- Under Character name and History line text, type the name and the words of each line.
The third sample line has no name. Its Text (History Character Name) hides by itself.
Special elements
| Element | What it does |
|---|---|
| Container (History Item) | Repeats once for each past line. Put it in a container whose Direction makes a column. |
| Text (History Character Name) | Shows the name of the character who spoke the line. It hides on lines that nobody spoke. |
| Text (History Line Content) | Shows the words of the line. |
You cannot type words in these texts. Your visual novel fills them in.
Show the history in your visual novel
No action shows a history layout by itself. Add a button to another layout, such as your dialogue box:
- To open the history, give the button a Push Overlay action with your history layout. See Push Overlay.
- To close it, give a button in the history layout a Pop Overlay action. See Pop Overlay.