UI module

button

procedure · 1 overloadsince 0.31.0Source

A push button. Returns true on the frame it was clicked (or Enter or Space pressed while focused).

button :: (
    text: string,
    options: Button_Options = .{},
    loc := #caller_location
) -> clicked: bool

A push button. Returns true on the frame it was clicked (or Enter or Space pressed while focused).

Parameters

text: string
the caption. It is copied for the frame.
options: Button_Options
look, size and whether it is enabled.
loc := #caller_location
the call site. It identifies the widget from one frame to the next, so leave the default.

Returns

clicked: bool

See also