Button component#
<Button>#
A clickable, decorated button#
Parameters#
text: string
Simple text
translation: string
Translated by key
round: float (default: 4) | percent (0-100%)
border: float (default: 2)
color: #FFAABB | #FFAABBCC
border_color: #FFAABB | #FFAABBCC
hover_color: #FFAABB | #FFAABBCC
hover_border_color: #FFAABB | #FFAABBCC
tooltip: string
Tooltip text on hover, translated by key
tooltip_str: string
Tooltip text on hover, raw text (not translated)
tooltip_side: “top” | “bottom” | “left” | “right” (default: top)
sticky: “1” | “0” (default: “0”)
make button act as a toggle (visual only)
sprite_src | sprite_src_ext | sprite_src_builtin | sprite_src_internal
Image path (see sprite) for src descriptions
sprite_color
Sprite color
Info#
Child widgets are supported and can be added directly in XML.
Label parameters can be passed by using text_size, text_wrap, text_color, text_align, text_weight, text_shadow, text_shadow_x, text_shadow_y keys (see label for more information.)