Skip to content

UI & Message Window

import { Aside } from '@astrojs/starlight/components';


Show or hide the message window.

[wndctrl x=… y=… width=… height=…]

Section titled “[wndctrl x=… y=… width=… height=…]”

Set the position and size of the message window.

TagDescription
[font face=… size=… bold=… italic=…]Set multiple font properties at once
[size value=…]Font size in points
[bold value=…]Bold on/off
[italic value=…]Italic on/off
[resetfont]Reset all font properties to defaults
[ruby text=…]Set ruby (furigana) annotation for the next characters
TagDescription
[nowrap]Disable word wrapping
[endnowrap]Re-enable word wrapping

Inside message text, XML-style inline tags control character-level formatting:

This is <b>bold</b> and <i>italic</i>.
The word <color value="#ff4444">danger</color> is highlighted.
<size value="32">Large text.</size>
<ruby rt="かんじ">漢字</ruby>
TagDescription
<b>…</b>Bold
<i>…</i>Italic
<size value="N">…</size>Font size in points
<color value="#rrggbb">…</color>Text colour
<ruby rt="reading">base</ruby>Furigana annotation
<shadow>…</shadow>Drop shadow
<outline>…</outline>Text outline
<nowrap>…</nowrap>Disable word-wrap for the region

Toggle display of the speaker name box above the message window.

Set the character name shown in the ptext name box.


Spawn a clickable button widget on screen.

[button text="Continue" x=100 y=400 width=200 height=48
bg=ui/btn.png hover_bg=ui/btn_hover.png
exp="f.choice = 1" target=*next key=Return]
Attribute groupAttributes
Contenttext= (label), graphic= (icon image path)
Geometryx=, y=, width=, height=
Appearancebg=, hover_bg=, press_bg=, color=, font_size=
Actiontarget= (label to jump to), storage= (scenario), exp= (Rhai expression on click)
Keyboardkey= (key name, e.g. Return, Space)
Visibilityvisible=, opacity=

Buttons are automatically removed when the script navigates to a new label or file.

Make an existing image layer respond to click events.


The following tags signal the host to open built-in UI panels. The host is responsible for rendering each panel.

TagDescription
[showmenu]Open the main menu
[showload]Open the load screen
[showsave]Open the save screen
[showlog]Open the backlog viewer
[hidemessage]Temporarily hide the message window
[showmenubutton]Show the persistent menu button
[hidemenubutton]Hide the persistent menu button

Display a modal dialog box. Execution blocks until the player dismisses it.

AttributeTypeDescription
text=stringDialog body text
title=stringDialog title

Change the mouse cursor to a custom image.


Configure the images used for the click-wait glyphs.

TagDescription
[glyph storage=… …]Set the default click-wait glyph
[glyph_auto …]Set the glyph shown during auto mode
[glyph_skip …]Set the glyph shown during skip mode

Play a visual effect when skip or auto mode starts or stops.

AttributeTypeDescription
mode=string"skip" or "auto"
effect=stringEffect name

TagDescription
[start_keyconfig]Open the key-binding configuration UI (blocks until closed)
[stop_keyconfig]Close the key-binding UI programmatically