UI module

text_field

procedure · 1 overloadsince 0.31.0Source

A single-line text field over edit. Returns whether the text changed and whether Enter was pressed.

text_field :: (
    edit: *Text_Edit,
    options: Editor_Options = .{},
    loc := #caller_location
) -> (changed: bool, submitted: bool)

A single-line text field over edit. Returns whether the text changed and whether Enter was pressed.

Parameters

edit: *Text_Edit
the text being edited.
options: Editor_Options
placeholder, size and read-only mode. The font is always the sans one, with no line numbers and no growing.
loc := #caller_location
the call site. It identifies the widget from one frame to the next, so leave the default.

Returns

changed: bool
submitted: bool

See also