Skinning HowTo/XUI Buttons, Sliders, and Spinners
This page describes the XML attributes for the buttons, sliders, and spinners. These are some of the XML elements and parameters used within the floaters, panels, and so forth, that make up the viewer user interface. They are used by the XUI files in the \skins\default\xui folders. You can find attributes for other XUI elements at:
- Skinning HowTo/XUI Menus
- Skinning HowTo/XUI Containers
- Skinning HowTo/XUI Selection Widgets
- Skinning HowTo/XUI Text Entry Widgets
- Skinning HowTo/XUI Other Widgets
and you can find more general information at Skinning HowTo/Basics
Many XUI elements share the same parameters. Rather than repeatedly describing them, we just list their names here and describe them at Skinning HowTo/Common XUI XML parameters.
button parameters
- Class LLButton : LLUICtrl : LLView
- In source file llui/llbutton.cpp
- Used by floater, panel, layout_stack, layout_panel, and form.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: label, font, font_size, font_style, halign
- Others:
Specific parameters
scale_image
Optional. Specifies whether to scale the button art as its container/floater is resized. As of 1.18.x, all button art has this property set to true
where the button size is not equal to 32x128.
Boolean: scale_image="true"
label_selected
Optional. Label is the text on the button's face when pressed into an 'on' state. Your button will inherit the label
if you omit this property.
String: label_selected="I've been clicked."
image_unselected
Optional. Overrides the default button art for the unselected/up and enabled button state. Art must be located in the ..\skins\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/textures
). Art must also be named in textures.xml
with an assigned UUID. By default, the button art is stretched to fit the specified button size.
String: image_unselected="btn_square_32x128.tga"
image_selected
Optional. Overrides the default button art for the selected/down button state. Art must be located in the ..\skins\[SKIN]\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/textures
). By default, the button art is stretched to fit the specified button size.
String: image_selected="btn_square-down_32x128.tga"
image_hover_selected
Optional. Overrides the default button art for the selected/down and mouseover/hover button state. Art must be located in the ..\skins\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/[SKIN]/textures
). Art must also be named in textures.xml
with an assigned UUID. By default, the button art is stretched to fit the specified button size.
String: image_unselected="btn_square-down-hover_32x128.tga"
image_hover_unselected
Optional. Overrides the default button art for the unselected/up and mouseover/hover button state. Art must be located in the ..\skins\[SKIN]\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/[SKIN]/textures
). Art must also be named in textures.xml
with an assigned UUID. By default, the button art is stretched to fit the specified button size.
String: image_unselected="btn_square-up-hover_32x128.tga"
image_disabled
Optional. Overrides the default button art for the disabled button state. Art must be located in the ..\skins\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/[SKIN]/textures
). Art must also be named in textures.xml
with an assigned UUID. By default, the button art is stretched to fit the specified button size.
String: image_unselected="btn_square-disabled_32x128.tga"
image_disabled_selected
Optional. Overrides the default button art for the disabled and selected/down button state. Art must be located in the ..\skins\[SKIN]\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/textures
). Art must also be named in textures.xml
with an assigned UUID. By default, the button art is stretched to fit the specified button size.
String: image_unselected="btn_square-down-disabled_32x128.tga"
image_overlay
Optional. Applies an overlay image to the button. The button art will be sized to fit. As of 1.18.x, these icons should be 16 pixels high at maximum on a standard height 24px button to minimize scaling artifacts. Can be used with or without text. Art must be located in the ..\skins\[SKIN]\textures
directory within the Second Life application folder (on a Mac, this is inside the package at Contents/MacOS/Resources/skins/[SKIN]/textures
). Art must also be named in textures.xml
with an assigned UUID. See image_overlay_alignment for alignment options.
String: image_overlay="icn_media-play_16.tga"
image_overlay_alignment
Optional. Sets the alignment of the image_overlay
icon.
Values:
- left: left-aligns the art on the button. This standard is used for new button art with text in the Dazzle branch.
- right: right-aligns the the art on the button.
- center: centers the art on the button. This standard is used for new button art without text in the Dazzle branch.
String: image_overlay_alignment="left"
toggle
Optional. Determines whether the button is a toggle button or not. The Fly/Stop Flying button is a toggle button, for example.
Boolean: toggle="false"
pad_right
Optional.
Optional.
tab_stop
Optional.
help_url
Optional.
auto_resize
Optional.
user_resize
Optional.
default
Optional.
index
Optional.
text
Optional.
ignore
Optional.
label_width
Optional.
image
Optional.
flyout_button parameters
- Class LLFlyoutButton : LLComboBox : LLUICtrl : LLView
- In source file llui/llcombobox.cpp
- Used by floater, panel, and layout_stack.
- Can contain flyout_button_item.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: label, font, font_size, font_style, halign
Specific parameters
label_selected
Optional.
list_position
Optional.
auto_resize
Optional.
user_resize
Optional.
flyout_button_item parameters
- member of LLFlyoutButton : LLComboBox : LLUICtrl : LLView
- In source file llui/llcombobox.cpp
- Used by flyout_button.
value
name
joystick_turn parameters
- Class LLJoystickAgentTurn : LLJoystick : LLButton : LLUICtrl : LLView
- In source file newview/lljoystickbutton.cpp
- Used by floater.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: halign
Specific parameters
image_selected
image_unselected
quadrant
scale_image
joystick_slide parameters
- Class LLJoystickAgentSlide : LLJoystick : LLButton : LLUICtrl : LLView
- In source file newview/lljoystickbutton.cpp
- Used by floater.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: halign
Specific parameters
image_selected
image_unselected
quadrant
scale_image
multi_slider parameters
- Class LLMultiSlider : LLUICtrl : LLView
- In source file llui/llmultislider.cpp
- Used by panel.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: label, font, font_size, font_style
Specific parameters
allow_overlap
can_edit_text
decimal_digits
draw_track
Optional.
increment
initial_val
max_sliders
max_val
min_val
show_text
use_triangle
Optional.
value
slider parameters
- Class LLSliderCtrl : LLUICtrl : LLView
- In source file llui/llsliderctrl.cpp
- Used by floater and panel.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
- Text: label, font, font_size, font_style
Specific parameters
increment
initial_val
Optional.
label_width
Optional.
max_val
min_val
show_text
Optional.
decimal_digits
Optional.
can_edit_text
Optional.
value
Optional.
volume
Optional.
edit_text
Optional.
slider_bar parameters
- Class LLSlider : LLUICtrl : LLView
- In source file llui/llslider.cpp
- Used by panel.
Common parameters
- General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
- Positioning: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
Specific parameters
increment
initial_val
max_val
min_val
spinner parameters
- Class LLSpinCtrl : LLUICtrl : LLView
- In source file llui/llspinctrl.cpp
- Used by floater and panel.
bottom
Optional.
bottom_delta
Optional.
left
Optional.
left_delta
Optional.
right_delta
Optional.
decimal_digits
Optional.
enabled
Optional.
follows
Optional.
halign
Optional.
height
Optional.
width
Optional.
increment
Optional.
initial_val
Optional.
max_val
min_val
Optional.
name
tool_tip
Optional.
label
Optional.
label_width
Optional.
mouse_opaque
Optional.
control_name
Optional.
can_edit_text
Optional.
visible
Optional.
allow_text_entry
Optional.
text_enabled_color
Optional.
text_disabled_color
Optional.
bg_visible
Optional.
border_drop_shadow_visible
Optional.
border_visible
Optional.
drop_shadow_visible
Optional.
font
Optional.
h_pad
Optional.
v_pad
Optional.
volume_slider parameters
- Class LLSlider : LLUICtrl : LLView
- In source file llui/llslider.cpp
- Used by floater and panel.
bottom
Optional.
bottom_delta
Optional.
left
Optional.
left_delta
Optional.
follows
Optional.
height
width
increment
initial_val
max_val
min_val
name
mouse_opaque
Optional.
Optional.
enabled
Optional.
tool_tip
Optional.
control_name
Optional.