widget_button
The rows a button or menu reads: what its face holds beside its caption, and what the pointer may do to it.
في هذه الصفحة
ui · 7 properties · UI
The rows a button or menu reads: what its face holds beside its caption, and what the pointer may do to it.
In a scene, widget_button is the node key that applies it. A script reaches each property below as a field on node.widget_button: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_button.get() and node.widget_button.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
face_gap |
float | -1 |
The space between its picture, icon and caption, in design pixels; below zero takes the theme's own, else half the font size |
icon |
string | — | A glyph from the theme's icon family, drawn before text |
icon_color |
string | — | What that glyph is tinted with, as #rrggbb or a name from the theme's [colors]; empty takes the role's own |
icon_size |
float | -1 |
That glyph's size in design pixels; below zero takes the caption's |
image |
string | — | The project-relative picture drawn before the caption at the caption's height |
sense |
enum | click |
What the pointer may do to it: click reports a press let go as a click; under click_and_drag a press that moves past egui's drag distance is a drag and no click; drag and hover never click One of click, click_and_drag, drag, hover. |
trailing |
string | — | Text drawn against its far edge, dimmer than its caption: a shortcut, or a menu's caret |