(Created page with "{{Breadcrumbs|Alpha Branch|Custom level creation}} 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 <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...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Breadcrumbs|Alpha Branch|Custom level creation}} | {{Breadcrumbs|Alpha Branch|Custom level creation}} | ||
{{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: | ||
<pre> | <pre> |
Latest revision as of 00:45, 15 January 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]
id
An identifier that can be used by the test code to reference the text object.text
The text to be displayed.font
The font face. Currently onlymono
is supported. Any other option will use the game's normal font.size
The font size. The game's standard size is 24.align
The text alignment. Can beleft
orright
. The default is centered text.- Note: The alignment is measured from center, so
left
aligned 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!
- Note: The alignment is measured from center, so
x
The horizontal offset of the text from the center of the panel (negative values are left).y
The vertical offset of the text from the top of the panel (negative values are up - above the panel itself).hidden
If 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]
id
An identifier that can be used by the test code to reference the image object.filename
The name of the file to load.x
The horizontal offset of the image from the center of the panel (negative values are left).y
The vertical offset of the image from the top of the panel (negative values are up - above the panel itself).hidden
If true, the image will not be displayed until the test code changes this property to false.