tui.button
tui.button ID PANE ROW TEXT [ACTION]
Creates a focusable button.
Parameters
TEXT: caption, drawn as given (include brackets yourself:"[ Save ]").ACTION: function called asACTION IDon Enter or click.
Returns: 1 when ID or PANE is empty.
Notes
- Buttons are centered in their pane unless
tui.alignortui.pane_alignsays otherwise. ACTIONmay also be a built-in action such astui.action.back.
Example
tui.button btn_save form 3 "[ Save ]" on_save
on_save() { tui.notify "Saved $(tui.get inp_name)" success; }
See also: tui.on_action, tui.set_label
