How do I make my own menu?

Twine Version:
[Sugarcube, 2.9.2]

hello, basically, what i want is to have a menu w/o using the sidebar/storymenu? I removed the sidebar and I want to have my very own using symbols (or text links), im thinking the menu could be at the bottom (like a header, footer situation), but I have no idea how to do that, and make it accessible whenever each passage the player goes. how do i do that?

I don’t know if this has been updated, but you can designate specifically named passages to be displayed as the header and footer consistently.

“Headers and Footers” demonstrates the use of “PassageHeader” and “PassageFooter” special names for passages. When these special names are used, the ‘Header’ is prepended and the ‘Footer’ name is appended to all passages.

While it possible to create a menu through PassageHeader or Passage Footer, you will need to wrap it inside a <div> and position it in the StyleSheet, if you don’t want it to stick to the top/bottom of the passage and disappear when scrolling.

However, since you’re forgoing the sidebar altogether, I recommend using the StoryInterface special passage instead, where you can build that interface from scratch (this will also automatically remove the sidebar).

Note: StoryInterface only accepts HTML, CSS (inside a <style>), and JavaScript (inside a <script>) code. (but see example below if you want to use SugarCube code)

A simple option:

:: StoryInterface
<div id="passages"></div>
<div id="menu" data-passage="Menu"></div> 

:: Menu
All the links you want.

data-passage will tell SugarCube to include the content of the passage “Menu” inside the <div>. This way, you can use still SugarCube code (links, conditional statements, APIs) - in the linked passage.

2 Likes