0 votes
by (120 points)
I am using Sugar Cube 2 and I would like to delete the ui and add my own custom history controls with custom images that do the same thing as the old history controls.

1 Answer

+1 vote
by (35.6k points)

You can use the StoryInterface passage to replace the default SugarCube UI.  You might want to update to the current version of SugarCube, since v2.28.0 introduced some features to make that easier (see here if you need help installing it).

You could use Engine.backward() and Engine.forward() to control going forwards and backwards.  You can also use State.length and State.size to determine the player's current position in the history.

Adding custom clickable images is actually the easy part.  See the "Image" section of the SugarCube documentation or take a look at some image sample code here (click "Jump to Start" on the UI bar to see other sample code there).

Hope that helps!  :-)

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...