Divooka Reference

Screens

34 nodes

On this page 34

Add Box

Function

A box of elements, laid out by its kind: vbox one under another, hbox side by side, grid in rows of columns, frame a panel with them placed over it, fixed each where its position puts it, viewport one under another and scrolled with the wheel.

Signature
AddBox -> Screen Layout
    screen: Screen Layout
    kind: Text
    contents: Screen Layout
    x: Number
    y: Number
    spacing: Number
    padding: Number
    background: Text
    width: Number
    height: Number
    columns: Integer
    when: Condition
ScreenLayout AddBox(
    ScreenLayout screen,
    string kind,
    ScreenLayout contents,
    double x = 0.5,
    double y = 0.5,
    double spacing = 0,
    double padding = 0,
    string background = "",
    double width = 0,
    double height = 0,
    int columns = 1,
    Condition when)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
kindText—vbox, hbox, grid, frame, fixed or viewport.
contentsScreen Layout—What the box holds, from Start Contents.
xNumber0.5Across.
yNumber0.5Down.
spacingNumber0Pixels between what it holds.
paddingNumber0Pixels between its edge and what it holds.
backgroundText—A colour such as #000000c0, an image or a file; empty for none.
widthNumber0Its width in pixels; 0 fits what it holds.
heightNumber0Its height in pixels; 0 fits what it holds.
columnsInteger1A grid's number of columns.
whenCondition—Shown only while this holds; empty always.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add For Each

Function

Elements once for every item of a list, with the item in a variable: a row for every gift in the bag.

Signature
AddForEach -> Screen Layout
    screen: Screen Layout
    variable: Text
    list: Text
    contents: Screen Layout
ScreenLayout AddForEach(
    ScreenLayout screen,
    string variable,
    string list,
    ScreenLayout contents)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
variableText—The name each item goes by, such as item.
listText—The list variable, such as bag.
contentsScreen Layout—The elements for one item, from Start Contents.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add If

Function

Some elements while a condition holds and, optionally, others while it does not.

Signature
AddIf -> Screen Layout
    screen: Screen Layout
    condition: Condition
    then: Screen Layout
    otherwise: Screen Layout
ScreenLayout AddIf(
    ScreenLayout screen,
    Condition condition,
    ScreenLayout then,
    ScreenLayout otherwise)

Parameters

nametypedefaultdescription
screenScreen Layout—
conditionCondition—
thenScreen Layout—
otherwiseScreen Layout—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Picture Button

Function

A picture to press, such as a place on a map, with another picture under the pointer.

Signature
AddPictureButton -> Screen Layout
    screen: Screen Layout
    image: Text
    action: Button Actions
    hoverImage: Text
    x: Number
    y: Number
    when: Condition
    sensitive: Condition
ScreenLayout AddPictureButton(
    ScreenLayout screen,
    string image,
    ButtonActions action,
    string hoverImage = "",
    double x = 0.5,
    double y = 0.5,
    Condition when,
    Condition sensitive)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
imageText—The picture.
actionButton Actions—What pressing it does.
hoverImageText—The picture under the pointer; empty brightens the first.
xNumber0.5Across.
yNumber0.5Down.
whenCondition—Shown only while this holds; empty always.
sensitiveCondition—Pressable only while this holds, and shown greyed otherwise; empty always.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Bar

Function

A bar showing a variable against a maximum, such as trust out of ten.

Signature
AddScreenBar -> Screen Layout
    screen: Screen Layout
    variable: Text
    maximum: Number
    x: Number
    y: Number
    width: Number
    height: Number
    when: Condition
ScreenLayout AddScreenBar(
    ScreenLayout screen,
    string variable,
    double maximum,
    double x = 0.5,
    double y = 0.05,
    double width = 300,
    double height = 20,
    Condition when)

Parameters

nametypedefaultdescription
screenScreen Layout—
variableText—
maximumNumber—
xNumber0.5
yNumber0.05
widthNumber300
heightNumber20
whenCondition—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Button

Function

A button with text on it.

Signature
AddScreenButton -> Screen Layout
    screen: Screen Layout
    text: Text
    action: Button Actions
    x: Number
    y: Number
    when: Condition
    width: Number
    height: Number
    sensitive: Condition
ScreenLayout AddScreenButton(
    ScreenLayout screen,
    string text,
    ButtonActions action,
    double x = 0.5,
    double y = 0.5,
    Condition when,
    double width = 0,
    double height = 0,
    Condition sensitive)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
textText—What it says.
actionButton Actions—What pressing it does, from the action nodes.
xNumber0.5Across.
yNumber0.5Down.
whenCondition—Shown only while this holds; empty always.
widthNumber0Its width in pixels; 0 fits the text.
heightNumber0Its height in pixels; 0 for the usual.
sensitiveCondition—Pressable only while this holds, and shown greyed otherwise; empty always.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Image

Function

A picture on the screen: an image name or a file.

Signature
AddScreenImage -> Screen Layout
    screen: Screen Layout
    image: Text
    x: Number
    y: Number
    zoom: Number
    when: Condition
ScreenLayout AddScreenImage(
    ScreenLayout screen,
    string image,
    double x = 0.5,
    double y = 0.5,
    double zoom = 1,
    Condition when)

Parameters

nametypedefaultdescription
screenScreen Layout—
imageText—
xNumber0.5
yNumber0.5
zoomNumber1
whenCondition—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Input

Function

A text field that types into a variable, such as a name.

Signature
AddScreenInput -> Screen Layout
    screen: Screen Layout
    variable: Text
    x: Number
    y: Number
    maximumLength: Integer
    allowed: Text
    width: Number
    when: Condition
ScreenLayout AddScreenInput(
    ScreenLayout screen,
    string variable,
    double x = 0.5,
    double y = 0.5,
    int maximumLength = 24,
    string allowed = "",
    double width = 400,
    Condition when)

Parameters

nametypedefaultdescription
screenScreen Layout—
variableText—
xNumber0.5
yNumber0.5
maximumLengthInteger24
allowedText—
widthNumber400
whenCondition—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Key

Function

Acts when a key is pressed while the screen is up: escape, enter, space, left, a letter, f1...

Signature
AddScreenKey -> Screen Layout
    screen: Screen Layout
    key: Text
    action: Button Actions
ScreenLayout AddScreenKey(
    ScreenLayout screen,
    string key,
    ButtonActions action)

Parameters

nametypedefaultdescription
screenScreen Layout—
keyText—
actionButton Actions—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Space

Function

Empty space of a size, to hold things apart in a box.

Signature
AddScreenSpace -> Screen Layout
    screen: Screen Layout
    width: Number
    height: Number
ScreenLayout AddScreenSpace(
    ScreenLayout screen,
    double width,
    double height)

Parameters

nametypedefaultdescription
screenScreen Layout—
widthNumber—
heightNumber—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Text

Function

Text on the screen; it may show variables with [name].

Signature
AddScreenText -> Screen Layout
    screen: Screen Layout
    text: Text
    x: Number
    y: Number
    size: Number
    color: Text
    width: Number
    when: Condition
ScreenLayout AddScreenText(
    ScreenLayout screen,
    string text,
    double x = 0.5,
    double y = 0.5,
    double size = 0,
    string color = "",
    double width = 0,
    Condition when)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
textText—The text.
xNumber0.5Across.
yNumber0.5Down.
sizeNumber0Its size; 0 for the theme's.
colorText—Its colour, such as #ffffff; empty for the theme's.
widthNumber0How wide it may run before wrapping, in pixels; 0 for most of the stage.
whenCondition—Shown only while this holds; empty always.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Timer

Function

Acts when some seconds have passed, as a timed choice runs out; again every time they pass, when repeating.

Signature
AddScreenTimer -> Screen Layout
    screen: Screen Layout
    seconds: Number
    action: Button Actions
    repeat: Truth
ScreenLayout AddScreenTimer(
    ScreenLayout screen,
    double seconds,
    ButtonActions action,
    bool repeat = false)

Parameters

nametypedefaultdescription
screenScreen Layout—
secondsNumber—
actionButton Actions—
repeatTruthFalse

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Screen Variable

Function

A variable of the screen's own with its first value, as typed; its buttons can change it, and it lasts as long as the screen.

Signature
AddScreenVariable -> Screen Layout
    screen: Screen Layout
    name: Text
    value: Text
ScreenLayout AddScreenVariable(
    ScreenLayout screen,
    string name,
    string value)

Parameters

nametypedefaultdescription
screenScreen Layout—
nameText—
valueText—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Add Use Screen

Function

Another screen's elements in place, such as a status bar several screens share.

Signature
AddUseScreen -> Screen Layout
    screen: Screen Layout
    used: Text
    arguments: Text
ScreenLayout AddUseScreen(
    ScreenLayout screen,
    string used,
    string arguments = "")

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
usedText—The other screen's name.
argumentsText—Values for its parameters as a script writes them, separated by commas: trust, "Wen"; empty for none.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Anchor Last Element

Function

Puts the element added last at a point of itself other than its centre: (0, 0) puts its top left corner at its position, (1, 1) its bottom right, so (1, 1) at (1, 1) sits it in the stage's corner. In a vbox, an hbox or a grid it lines the element up within its place instead: (0, 0.5) in a vbox puts it against the box's left edge.

Signature
AnchorLastElement -> Screen Layout
    screen: Screen Layout
    xAnchor: Number
    yAnchor: Number
ScreenLayout AnchorLastElement(
    ScreenLayout screen,
    double xAnchor = 0.5,
    double yAnchor = 0.5)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
xAnchorNumber0.5The point across it, as a share of its width.
yAnchorNumber0.5The point down it, as a share of its height.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Answer

Function

Answers a called screen with a value, as typed, which the story reads as _return.

Signature
Answer(value: Text) -> Button Actions
ButtonActions Answer(string value)

Parameters

nametypedefaultdescription
valueText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Close Screen

Function

Closes the screen; a called one answers nothing.

Signature
CloseScreen() -> Button Actions
ButtonActions CloseScreen()

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Go To Label

Function

Leaves the screen and continues the story at a label.

Signature
GoToLabel(label: Text) -> Button Actions
ButtonActions GoToLabel(string label)

Parameters

nametypedefaultdescription
labelText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Hide Screen Action

Function

Hides another screen.

Signature
HideScreenAction(screen: Text) -> Button Actions
ButtonActions HideScreenAction(string screen)

Parameters

nametypedefaultdescription
screenText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Notify Action

Function

Shows a notification.

Signature
NotifyAction(text: Text) -> Button Actions
ButtonActions NotifyAction(string text)

Parameters

nametypedefaultdescription
textText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Open Menu Action

Function

Opens one of the game's menus: save, load, preferences, history, gallery, music_room, achievements or main_menu.

Signature
OpenMenuAction(menu: Text) -> Button Actions
ButtonActions OpenMenuAction(string menu)

Parameters

nametypedefaultdescription
menuText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Play Sound Action

Function

Plays a sound once.

Signature
PlaySoundAction(file: Text) -> Button Actions
ButtonActions PlaySoundAction(string file)

Parameters

nametypedefaultdescription
fileText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Run Command Action

Function

Runs a command the game registers.

Signature
RunCommandAction(command: Text) -> Button Actions
ButtonActions RunCommandAction(string command)

Parameters

nametypedefaultdescription
commandText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Screen To Script

Function

A screen as a script writes it.

Signature
ScreenToScript(screen: Screen Layout) -> Text
string ScreenToScript(ScreenLayout screen)

Parameters

nametypedefaultdescription
screenScreen Layout—

Returns

ScriptText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Set Last Element Style Property

Function

Sets a style property on the element added last itself, laid over its style: outline_width2; on a button, a property starting text_ styles its label.

Signature
SetLastElementStyleProperty -> Screen Layout
    screen: Screen Layout
    property: Text
    value: Text
ScreenLayout SetLastElementStyleProperty(
    ScreenLayout screen,
    string property,
    string value)

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
propertyText—The property, as a script names it.
valueText—Its value, as a script writes it.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Set Screen Style Prefix

Function

A prefix for the styles of everything on the screen: with gold, its buttons draw with gold_button when there is one.

Signature
SetScreenStylePrefix -> Screen Layout
    screen: Screen Layout
    prefix: Text
ScreenLayout SetScreenStylePrefix(
    ScreenLayout screen,
    string prefix)

Parameters

nametypedefaultdescription
screenScreen Layout—
prefixText—

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Set Variable Action

Function

Sets a variable to a value, as typed.

Signature
SetVariableAction(variable: Text, value: Text) -> Button Actions
ButtonActions SetVariableAction(string variable, string value)

Parameters

nametypedefaultdescription
variableText—
valueText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Set Variable To Action

Function

Sets a variable to what an expression gives when the button is pressed, such as the item of a For Each row: item.

Signature
SetVariableToAction -> Button Actions
    variable: Text
    expression: Text
ButtonActions SetVariableToAction(
    string variable,
    string expression)

Parameters

nametypedefaultdescription
variableText—
expressionText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Show Screen Action

Function

Shows another screen.

Signature
ShowScreenAction(screen: Text) -> Button Actions
ButtonActions ShowScreenAction(string screen)

Parameters

nametypedefaultdescription
screenText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Start Contents

Function

A set of elements with no screen of its own yet, to fill a box, a branch or a loop with; build it with the Add nodes as a screen is built.

Signature
StartContents() -> Screen Layout
ScreenLayout StartContents()

Returns

ContentsScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Start Screen

Function

A screen with nothing on it yet.

Signature
StartScreen -> Screen Layout
    name: Text
    dim: Truth
    background: Text
    modal: Truth
    parameters: Text
ScreenLayout StartScreen(
    string name,
    bool dim = true,
    string background = "",
    bool modal = false,
    string parameters = "")

Parameters

nametypedefaultdescription
nameText—What Show Screen and Call Screen name it by.
dimTruthTrueDarken the game behind it.
backgroundText—An image covering the stage behind it; empty for none.
modalTruthFalseWhen shown, keep the player's clicks from the story underneath.
parametersText—Parameters its arguments bind to, separated by commas: question="Who?"; empty for none.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Style Last Element

Function

Gives the element added last a style of its own (style), and for a box, a prefix for the styles of what it holds (style_prefix).

Signature
StyleLastElement -> Screen Layout
    screen: Screen Layout
    style: Text
    prefix: Text
ScreenLayout StyleLastElement(
    ScreenLayout screen,
    string style = "",
    string prefix = "")

Parameters

nametypedefaultdescription
screenScreen Layout—The screen.
styleText—The style it draws with; empty keeps its kind's.
prefixText—For a box: with gold, the buttons in it draw with gold_button when there is one; empty for none.

Returns

ScreenScreen Layout
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Then Action

Function

One action and then another: set a variable, then go to a label.

Signature
ThenAction -> Button Actions
    first: Button Actions
    second: Button Actions
ButtonActions ThenAction(
    ButtonActions first,
    ButtonActions second)

Parameters

nametypedefaultdescription
firstButton Actions—
secondButton Actions—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels

Toggle Variable Action

Function

Turns a true variable false and a false one true.

Signature
ToggleVariableAction(variable: Text) -> Button Actions
ButtonActions ToggleVariableAction(string variable)

Parameters

nametypedefaultdescription
variableText—

Returns

ActionButton Actions
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Screens
Package
Novella Visual Novels