Skip to content

Search

Documentation

widget_check

The rows a checkbox, switch or button reads: whether it is on, and what a click does to that.

Sur cette page

ui · 4 properties · UI

The rows a checkbox, switch or button reads: whether it is on, and what a click does to that.

In a scene, widget_check is the node key that applies it. A script reaches each property below as a field on node.widget_check: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_check.get() and node.widget_check.set(table).

Properties

property type default description
checked bool false Whether a checkbox or switch is on, every click flipping it and calling on_change with the new state; a checked button or menu is held down, wearing its pressed look
indeterminate bool false Draw a checkbox as neither ticked nor clear, for a group whose members disagree; a click still flips checked
radio_group string — A name this checkbox, switch or toggle button shares with the ones it is exclusive with: ticking one unticks the rest, and one already ticked stays ticked. Empty leaves it flipping on its own
toggle bool false A button a click holds down and the next releases, flipping checked as a checkbox does, before on_click runs: Godot's toggle mode

Vraiment ?