Skip to content

Theme module

Nikita Yudin edited this page Dec 29, 2023 · 1 revision

About

SpinButton comes with some theme properties that you apply for styling. The theme module is applied to SBBaseButton, so it is available in all inheritors.

Nodes

Name Type
SBWrapper MarginContainer
SBTitle RichTextLabel
SBDesc RichTextLabel
SBValue RichTextLabel
SBLeftIcon Button
SBRightIcon Button
SBNextNav Button
SBPrevNav Button
SBSlider Slider
SBSliderValue RichTextLabel
SBSliderTooltip RichTextLabel
SBContent Button

Theme Properties

MarginContainer

  • SBWrapper
Property Type Default Description
margin_bottom int 0 Offsets towards the inside direct children of the container by this amount of pixels from the bottom.
margin_left int 0 Offsets towards the inside direct children of the container by this amount of pixels from the left.
margin_right int 0 Offsets towards the inside direct children of the container by this amount of pixels from the right.
margin_top int 0 Offsets towards the inside direct children of the container by this amount of pixels from the top.

RichTextLabel

  • SBTitle
  • SBDesc
  • SBValue
  • SBSliderValue
  • SBSliderTooltip
Property Type Default Description
default_color Color Color(1, 1, 1, 1) The default text color.
font_outline_color Color Color(1, 1, 1, 1) The default tint of text outline.
font_shadow_color Color Color(1, 1, 1, 1) The color of the font's shadow.
font_hover_color Color Color(1, 1, 1, 1) The color of the text when hovering over the button.
font_focus_color Color Color(1, 1, 1, 1) The color of the text when the button is in focus.
font_pressed_color Color Color(1, 1, 1, 1) The color of the text when the button is pressed.
font_disabled_color Color Color(1, 1, 1, 1) The color of the text when the button is disabled.
normal StyleBox The normal background.
hover StyleBox The hover background.
focus StyleBox The focus background.
pressed StyleBox The pressed background.
disabled StyleBox The disabled background.
normal_font Font The default text font.
mono_font Font The font used for monospace text.
italics_font Font The font used for italics text.
bold_italics_font Font The font used for bold italics text.
bold_font Font The font used for bold text.
normal_font_size int The default text font size.
bold_font_size int The font size used for bold text.
bold_italics_font_size int The font size used for bold italics text.
italics_font_size int The font size used for italics text.
mono_font_size int The font size used for monospace text.

Button

  • SBLeftIcon
  • SBRightIcon
  • SBNextNav
  • SBPrevNav
  • SBContent
Property Type Default Description
icon_max_width int 0 The maximum allowed width of the Button's icon.
icon_normal_color Color Color(1, 1, 1, 1) Default icon modulate Color of the Button.
icon_hover_color Color Color(1, 1, 1, 1) Icon modulate Color used when the Button is being hovered.
icon_focus_color Color Color(1, 1, 1, 1) Icon modulate Color used when the Button is focused.
icon_pressed_color Color Color(1, 1, 1, 1) Icon modulate Color used when the Button is being pressed.
icon_disabled_color Color Color(1, 1, 1, 1) The color of the text when the button is disabled.
normal StyleBox The normal background.
hover StyleBox The hover background.
focus StyleBox The focus background.
pressed StyleBox The pressed background.
disabled StyleBox The disabled background.

Slider

  • SBSlider
Property Type Default Description
center_grabber int 0 Boolean constant. If 1, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position.
grabber_offset int 0 Vertical or horizontal offset of the grabber.
grabber Texture2D The texture for the grabber (the draggable element).
grabber_disabled Texture2D The texture for the grabber when it's disabled.
grabber_hover Texture2D The texture for the grabber when it's hovered.
grabber_focus Texture2D The texture for the grabber when it's focused.
grabber_pressed Texture2D The texture for the grabber when it's pressed.
grabber_area StyleBox The background of the area to the left or bottom of the grabber.
grabber_area_disabled StyleBox The background of the area to the left or bottom of the grabber that displays when it's disabled.
grabber_area_hover StyleBox The background of the area to the left or bottom of the grabber that displays when it's hovered.
grabber_area_focus StyleBox The background of the area to the left or bottom of the grabber that displays when it's focused.
grabber_area_pressed StyleBox The background of the area to the left or bottom of the grabber that displays when it's pressed.
slider StyleBox The background for the whole slider. Affects the height or width of the grabber_area.
slider_disabled StyleBox Background for the whole slider when the button is disabled.
slider_hover StyleBox Background for the whole slider when the button is hovered.
slider_focus StyleBox Background for the whole slider when the button is focused.
slider_pressed StyleBox Background for the whole slider when the button is pressed.