Menu
⚠️
This page is under construction.
⚠️
Beta feature, subject to change.
Menu
lets you create a menu in your visual novel. It is used to navigate between different parts of the story.
new Menu("What should I do?")
.choose("Go left", [
character1.say("I went left"),
scene1.jumpTo(scene2)
])
.choose("Go right", [
character1.say("I went right")
])
Public Method
constructor
Overload 1 of 2
prompt: (string | Word)[] | (string | Word)
- The prompt of the menuconfig?: MenuConfig
- MenuConfig
Overload 2 of 2
prompt: Sentence
- The prompt of the menu, See Sentenceconfig?: MenuConfig
- MenuConfig
Chainable Method
choose
Overload 1 of 3
new Menu("what should I do?")
.choose({
choice: "go left",
action: [
character1.say("I went left"),
]
})
choice: MenuChoice
- The choice of the menu, See MenuChoice
Overload 2 of 3
new Menu("what should I do?")
.choose(new Sentence("go left"), [
character1.say("I went left"),
])
prompt: Sentence
- The prompt of the choice, See Sentenceaction: ChainedActions
- The action of the choice, See ChainedActions
Overload 3 of 3
new Menu("what should I do?")
.choose("go left", [
character1.say("I went left"),
])
prompt: UnSentencePrompt
- The prompt of the choiceaction: ChainedActions
- The action of the choice, See ChainedActions