No edit summary |
m (Remove breadcrumbs in favor of built-ins) |
||
| Line 1: | Line 1: | ||
{{Early-access-version|0|1346}} | {{Early-access-version|0|1346}} | ||
The <code>ui.txt</code> is used to define text and image metadata used by the bottom flyout panel, and can be manipulated from within the [[Custom level creation/test.si|<code>test.si</code>]] test code. It has a relatively simple structure in comparison to the other files used for custom level creation. Each entry is a single line enclosed in square brackets (<code>[]</code>). There are currently only two valid entry types: | The <code>ui.txt</code> is used to define text and image metadata used by the bottom flyout panel, and can be manipulated from within the [[Custom level creation/test.si|<code>test.si</code>]] test code. It has a relatively simple structure in comparison to the other files used for custom level creation. Each entry is a single line enclosed in square brackets (<code>[]</code>). There are currently only two valid entry types: | ||
Latest revision as of 10:01, 19 February 2025
The ui.txt is used to define text and image metadata used by the bottom flyout panel, and can be manipulated from within the test.si test code. It has a relatively simple structure in comparison to the other files used for custom level creation. Each entry is a single line enclosed in square brackets ([]). There are currently only two valid entry types:
[text id="text_id" text="Any text you wish to display" font=mono size=24 align=left x=78 y=90 hidden=true] [image id="image_id" file="filename.png" x=78 y=90 hidden=true]
ui.txt is not hot-reloaded, even upon level change. You will need to restart the game to pick up changes to this file.Text metadata[edit | edit source]
[text id="text_id" text="Any text you wish to display" font=mono size=24 align=left x=78 y=90 hidden=true]
idAn identifier that can be used by the test code to reference the text object.textThe text to be displayed.fontThe font face. Currently onlymonois supported. Any other option will use the game's normal font.sizeThe font size. The game's standard size is 24.alignThe text alignment. Can beleftorright. The default is centered text.
Note: The alignment is measured from center, so leftaligned grows from center to the right, and <right> aligned grows from center to the left. This can make it appear like the values are reversed if you're not expecting it!
xThe horizontal offset of the text from the center of the panel (negative values are left).yThe vertical offset of the text from the top of the panel (negative values are up - above the panel itself).hiddenIf true, the text will not be displayed until the test code changes this property to false.
Image metadata[edit | edit source]
Images currently need to be compiled into the game files. Simply including them in your level directory is not sufficient and attempting to reference such a file will result in the game crashing on startup.
You can reuse images from existing levels using normal path navigation (eg:
../sort/0.png for a slice of pie on a plate).
This should not be considered a viable long-term solution as your level becomes dependent both on the other level(s) not changing their images, and also on the game not enforcing directory locality in the future. It can be a good placeholder during development however, and if your level is accepted into the base game you can replace the temporary image references with valid ones at that time.[image id="image_id" file="filename.png" x=78 y=90 hidden=true]
idAn identifier that can be used by the test code to reference the image object.filenameThe name of the file to load.xThe horizontal offset of the image from the center of the panel (negative values are left).yThe vertical offset of the image from the top of the panel (negative values are up - above the panel itself).hiddenIf true, the image will not be displayed until the test code changes this property to false.
