元編程參考文件

畫面

34 個節點

本頁內容 34

新增框

函數

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.

簽名
新增框 -> Screen Layout
    螢幕: Screen Layout
    種類: 文字
    內容: Screen Layout
    X: 數字
    Y: 數字
    間距: 數字
    內邊距: 數字
    背景: 文字
    寬度: 數字
    高度: 數字
    列數: 整數
    條件: 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)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
種類文字—vbox, hbox, grid, frame, fixed or viewport.
內容Screen Layout—What the box holds, from Start Contents.
X數字0.5Across.
Y數字0.5Down.
間距數字0Pixels between what it holds.
內邊距數字0Pixels between its edge and what it holds.
背景文字—A colour such as #000000c0, an image or a file; empty for none.
寬度數字0Its width in pixels; 0 fits what it holds.
高度數字0Its height in pixels; 0 fits what it holds.
列數整數1A grid's number of columns.
條件Condition—Shown only while this holds; empty always.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增遍歷

函數

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

簽名
新增遍歷 -> Screen Layout
    螢幕: Screen Layout
    變數: 文字
    列表: 文字
    內容: Screen Layout
ScreenLayout AddForEach(
    ScreenLayout screen,
    string variable,
    string list,
    ScreenLayout contents)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
變數文字—The name each item goes by, such as item.
列表文字—The list variable, such as bag.
內容Screen Layout—The elements for one item, from Start Contents.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增條件

函數

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

簽名
新增條件 -> Screen Layout
    螢幕: Screen Layout
    條件: Condition
    則: Screen Layout
    否則: Screen Layout
ScreenLayout AddIf(
    ScreenLayout screen,
    Condition condition,
    ScreenLayout then,
    ScreenLayout otherwise)

參數

名稱型別預設值說明
螢幕Screen Layout—
條件Condition—
則Screen Layout—
否則Screen Layout—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增圖片按鈕

函數

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

簽名
新增圖片按鈕 -> Screen Layout
    螢幕: Screen Layout
    影像: 文字
    操作: Button Actions
    懸停影像: 文字
    X: 數字
    Y: 數字
    條件: Condition
    可互動: Condition
ScreenLayout AddPictureButton(
    ScreenLayout screen,
    string image,
    ButtonActions action,
    string hoverImage = "",
    double x = 0.5,
    double y = 0.5,
    Condition when,
    Condition sensitive)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
影像文字—The picture.
操作Button Actions—What pressing it does.
懸停影像文字—The picture under the pointer; empty brightens the first.
X數字0.5Across.
Y數字0.5Down.
條件Condition—Shown only while this holds; empty always.
可互動Condition—Pressable only while this holds, and shown greyed otherwise; empty always.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕進度條

函數

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

簽名
新增螢幕進度條 -> Screen Layout
    螢幕: Screen Layout
    變數: 文字
    最大值: 數字
    X: 數字
    Y: 數字
    寬度: 數字
    高度: 數字
    條件: 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)

參數

名稱型別預設值說明
螢幕Screen Layout—
變數文字—
最大值數字—
X數字0.5
Y數字0.05
寬度數字300
高度數字20
條件Condition—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕按鈕

函數

A button with text on it.

簽名
新增螢幕按鈕 -> Screen Layout
    螢幕: Screen Layout
    文字: 文字
    操作: Button Actions
    X: 數字
    Y: 數字
    條件: Condition
    寬度: 數字
    高度: 數字
    可互動: 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)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
文字文字—What it says.
操作Button Actions—What pressing it does, from the action nodes.
X數字0.5Across.
Y數字0.5Down.
條件Condition—Shown only while this holds; empty always.
寬度數字0Its width in pixels; 0 fits the text.
高度數字0Its height in pixels; 0 for the usual.
可互動Condition—Pressable only while this holds, and shown greyed otherwise; empty always.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕影像

函數

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

簽名
新增螢幕影像 -> Screen Layout
    螢幕: Screen Layout
    影像: 文字
    X: 數字
    Y: 數字
    縮放: 數字
    條件: Condition
ScreenLayout AddScreenImage(
    ScreenLayout screen,
    string image,
    double x = 0.5,
    double y = 0.5,
    double zoom = 1,
    Condition when)

參數

名稱型別預設值說明
螢幕Screen Layout—
影像文字—
X數字0.5
Y數字0.5
縮放數字1
條件Condition—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕輸入框

函數

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

簽名
新增螢幕輸入框 -> Screen Layout
    螢幕: Screen Layout
    變數: 文字
    X: 數字
    Y: 數字
    最大長度: 整數
    允許的字元: 文字
    寬度: 數字
    條件: 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)

參數

名稱型別預設值說明
螢幕Screen Layout—
變數文字—
X數字0.5
Y數字0.5
最大長度整數24
允許的字元文字—
寬度數字400
條件Condition—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕按鍵

函數

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

簽名
新增螢幕按鍵 -> Screen Layout
    螢幕: Screen Layout
    鍵: 文字
    操作: Button Actions
ScreenLayout AddScreenKey(
    ScreenLayout screen,
    string key,
    ButtonActions action)

參數

名稱型別預設值說明
螢幕Screen Layout—
鍵文字—
操作Button Actions—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕空白

函數

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

簽名
新增螢幕空白 -> Screen Layout
    螢幕: Screen Layout
    寬度: 數字
    高度: 數字
ScreenLayout AddScreenSpace(
    ScreenLayout screen,
    double width,
    double height)

參數

名稱型別預設值說明
螢幕Screen Layout—
寬度數字—
高度數字—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕文字

函數

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

簽名
新增螢幕文字 -> Screen Layout
    螢幕: Screen Layout
    文字: 文字
    X: 數字
    Y: 數字
    大小: 數字
    顏色: 文字
    寬度: 數字
    條件: 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)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
文字文字—The text.
X數字0.5Across.
Y數字0.5Down.
大小數字0Its size; 0 for the theme's.
顏色文字—Its colour, such as #ffffff; empty for the theme's.
寬度數字0How wide it may run before wrapping, in pixels; 0 for most of the stage.
條件Condition—Shown only while this holds; empty always.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕計時器

函數

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

簽名
新增螢幕計時器 -> Screen Layout
    螢幕: Screen Layout
    秒數: 數字
    操作: Button Actions
    重複: 真否
ScreenLayout AddScreenTimer(
    ScreenLayout screen,
    double seconds,
    ButtonActions action,
    bool repeat = false)

參數

名稱型別預設值說明
螢幕Screen Layout—
秒數數字—
操作Button Actions—
重複真否False

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增螢幕變數

函數

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.

簽名
新增螢幕變數 -> Screen Layout
    螢幕: Screen Layout
    名稱: 文字
    值: 文字
ScreenLayout AddScreenVariable(
    ScreenLayout screen,
    string name,
    string value)

參數

名稱型別預設值說明
螢幕Screen Layout—
名稱文字—
值文字—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

新增引用畫面

函數

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

簽名
新增引用畫面 -> Screen Layout
    螢幕: Screen Layout
    使用中: 文字
    參數: 文字
ScreenLayout AddUseScreen(
    ScreenLayout screen,
    string used,
    string arguments = "")

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
使用中文字—The other screen's name.
參數文字—Values for its parameters as a script writes them, separated by commas: trust, "Wen"; empty for none.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

錨定最後一個元素

函數

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.

簽名
錨定最後一個元素 -> Screen Layout
    螢幕: Screen Layout
    X 錨點: 數字
    Y 錨點: 數字
ScreenLayout AnchorLastElement(
    ScreenLayout screen,
    double xAnchor = 0.5,
    double yAnchor = 0.5)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
X 錨點數字0.5The point across it, as a share of its width.
Y 錨點數字0.5The point down it, as a share of its height.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

回答

函數

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

簽名
回答(值: 文字) -> Button Actions
ButtonActions Answer(string value)

參數

名稱型別預設值說明
值文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

關閉畫面

函數

Closes the screen; a called one answers nothing.

簽名
關閉畫面() -> Button Actions
ButtonActions CloseScreen()

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

前往標籤

函數

Leaves the screen and continues the story at a label.

簽名
前往標籤(標籤: 文字) -> Button Actions
ButtonActions GoToLabel(string label)

參數

名稱型別預設值說明
標籤文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

隱藏畫面操作

函數

Hides another screen.

簽名
隱藏畫面操作(螢幕: 文字) -> Button Actions
ButtonActions HideScreenAction(string screen)

參數

名稱型別預設值說明
螢幕文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

通知操作

函數

Shows a notification.

簽名
通知操作(文字: 文字) -> Button Actions
ButtonActions NotifyAction(string text)

參數

名稱型別預設值說明
文字文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

開啟選單操作

函數

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

簽名
開啟選單操作(選單: 文字) -> Button Actions
ButtonActions OpenMenuAction(string menu)

參數

名稱型別預設值說明
選單文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

播放聲音操作

函數

Plays a sound once.

簽名
播放聲音操作(檔案: 文字) -> Button Actions
ButtonActions PlaySoundAction(string file)

參數

名稱型別預設值說明
檔案文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

執行命令操作

函數

Runs a command the game registers.

簽名
執行命令操作(命令: 文字) -> Button Actions
ButtonActions RunCommandAction(string command)

參數

名稱型別預設值說明
命令文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

畫面轉為指令碼

函數

A screen as a script writes it.

簽名
畫面轉為指令碼(螢幕: Screen Layout) -> 文字
string ScreenToScript(ScreenLayout screen)

參數

名稱型別預設值說明
螢幕Screen Layout—

返回

指令碼文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

設定最後一個元素的樣式屬性

函數

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.

簽名
設定最後一個元素的樣式屬性 -> Screen Layout
    螢幕: Screen Layout
    屬性: 文字
    值: 文字
ScreenLayout SetLastElementStyleProperty(
    ScreenLayout screen,
    string property,
    string value)

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
屬性文字—The property, as a script names it.
值文字—Its value, as a script writes it.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

設定畫面樣式字首

函數

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

簽名
設定畫面樣式字首 -> Screen Layout
    螢幕: Screen Layout
    字首: 文字
ScreenLayout SetScreenStylePrefix(
    ScreenLayout screen,
    string prefix)

參數

名稱型別預設值說明
螢幕Screen Layout—
字首文字—

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

設定變數操作

函數

Sets a variable to a value, as typed.

簽名
設定變數操作(變數: 文字, 值: 文字) -> Button Actions
ButtonActions SetVariableAction(string variable, string value)

參數

名稱型別預設值說明
變數文字—
值文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

把變數設為某值操作

函數

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

簽名
把變數設為某值操作(變數: 文字, 表示式: 文字) -> Button Actions
ButtonActions SetVariableToAction(
    string variable,
    string expression)

參數

名稱型別預設值說明
變數文字—
表示式文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

顯示畫面操作

函數

Shows another screen.

簽名
顯示畫面操作(螢幕: 文字) -> Button Actions
ButtonActions ShowScreenAction(string screen)

參數

名稱型別預設值說明
螢幕文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

開始內容

函數

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.

簽名
開始內容() -> Screen Layout
ScreenLayout StartContents()

返回

內容Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

開始畫面

函數

A screen with nothing on it yet.

簽名
開始畫面 -> Screen Layout
    名稱: 文字
    調暗背景: 真否
    背景: 文字
    模態: 真否
    參數: 文字
ScreenLayout StartScreen(
    string name,
    bool dim = true,
    string background = "",
    bool modal = false,
    string parameters = "")

參數

名稱型別預設值說明
名稱文字—What Show Screen and Call Screen name it by.
調暗背景真否TrueDarken the game behind it.
背景文字—An image covering the stage behind it; empty for none.
模態真否FalseWhen shown, keep the player's clicks from the story underneath.
參數文字—Parameters its arguments bind to, separated by commas: question="Who?"; empty for none.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

最後一個元素的樣式

函數

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).

簽名
最後一個元素的樣式 -> Screen Layout
    螢幕: Screen Layout
    樣式: 文字
    字首: 文字
ScreenLayout StyleLastElement(
    ScreenLayout screen,
    string style = "",
    string prefix = "")

參數

名稱型別預設值說明
螢幕Screen Layout—The screen.
樣式文字—The style it draws with; empty keeps its kind's.
字首文字—For a box: with gold, the buttons in it draw with gold_button when there is one; empty for none.

返回

畫面Screen Layout
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

然後執行操作

函數

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

簽名
然後執行操作 -> Button Actions
    第一個: Button Actions
    第二個: Button Actions
ButtonActions ThenAction(
    ButtonActions first,
    ButtonActions second)

參數

名稱型別預設值說明
第一個Button Actions—
第二個Button Actions—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說

切換變數操作

函數

Turns a true variable false and a false one true.

簽名
切換變數操作(變數: 文字) -> Button Actions
ButtonActions ToggleVariableAction(string variable)

參數

名稱型別預設值說明
變數文字—

返回

操作Button Actions
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
畫面
所屬包
Novella 視覺小說