Twine Version: Harlowe 3.3.5
Hello, all.
I am trying to create a “Settings” page to allow players to change the text font and size for accessibility purposes, as well as general preferences. I think that I’ve got the code for the settings correct. My goal is that the variable $FontSize (by default set to 1) will be used to change all of the font to the corresponding size. However, I can’t test whether my code (see below) works, because once I click “Settings” I cannot leave that passage again. Even clicking return – which I don’t really want to do – doesn’t take me back to the passage I left. I think maybe it’s because I used (go-to:). Even so, I think (link-undo:) would just undo the change to the formatting.
If anyone has any solution, I would much appreciate it.
Code for Settings
The following puts a link to the “Settings” passage in the corner of the screen.
(float-box: "====X","Y====")[
(text-color: red+white)+(font: "Copperplate Gothic")[
[[Settings->Settings]]]
]
The “Settings” passage looks like this:
(align:"=><=")+(text-size:2.0)+(text-color: red+white)+(font: "Copperplate Gothic")[''Settings'']
''//Change Font Size://'' [[(-)->decrease font]] [[(reset)->default font size]] [[(+)->increase font]]
The passages that are linked look like as follows:
{
(set: $FontSize to $FontSize+0.2)
(go-to: "Settings")
}
I also have the following line of code that should run for every passage:
(enchant: ?text, (size: $FontSize))