Qu

ui_text

Builtin index · Plotting

result = ui_text(label, [default], [id=])

Input: label, default, id · Output: result

What it is

Declares a free-text field, labeled label (string). default (string, positional, default "") and id= (string) as above.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = ui_text(label, [default], [id=])
label stringDeclares a free-text field, labeled label (string).
default string, optionaldefault (string, positional, default "") and id= (string) as above.
id string, optionaldefault (string, positional, default "") and id= (string) as above.
result string
Returns the current (or default) text as a string.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

freq = ui_slider("freq", 1, 20, 5)
gain = ui_number("gain", 1.0)
mode = ui_select("mode", ["fast", "slow"])
enabled = ui_checkbox("enabled", true)
pressed = ui_button("reset")
label = ui_text("label", "wave")
print(freq)
print(gain)
print(mode)
print(enabled)
print(pressed)
print(label)
output
5
1
fast
true
false
wave

from plotting

How it works

ui_text(label, [default], [id=])

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.