text
The most basic widget for displaying strings of text on the UI.
Signature
Section titled “Signature”ui.text(text)Description
Section titled “Description”Displays a string. Text will stay on the same line as previous widgets if ui.sameLine() was called, otherwise it starts a new line.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | - | The string to be displayed. |
Examples
Section titled “Examples”ui.text("Hello, Assetto Corsa!")Displaying changing values from the simulation.
function script.update() local car = ac.getCar(0) ui.text(string.format("Current Speed: %.0f KM/H", car.speedKmh))end