2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 16:08:05 +08:00
<class name= "Slider" inherits= "Range" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-13 04:42:36 +08:00
<brief_description >
2023-04-30 22:26:09 +08:00
Abstract base class for sliders.
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2023-04-30 22:26:09 +08:00
Abstract base class for sliders, used to adjust a value by moving a grabber along a horizontal or vertical axis. Sliders are [Range]-based controls.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<members >
2024-02-22 01:51:08 +08:00
<member name= "editable" type= "bool" setter= "set_editable" getter= "is_editable" default= "true" keywords= "readonly, disabled, enabled" >
2019-04-19 17:21:09 +08:00
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
2017-09-13 04:42:36 +08:00
</member>
2022-11-07 03:27:24 +08:00
<member name= "focus_mode" type= "int" setter= "set_focus_mode" getter= "get_focus_mode" overrides= "Control" enum= "Control.FocusMode" default= "2" />
2019-06-29 18:38:01 +08:00
<member name= "scrollable" type= "bool" setter= "set_scrollable" getter= "is_scrollable" default= "true" >
2019-04-19 17:21:09 +08:00
If [code]true[/code], the value can be changed using the mouse wheel.
2018-07-26 17:56:21 +08:00
</member>
2022-11-09 15:59:49 +08:00
<member name= "step" type= "float" setter= "set_step" getter= "get_step" overrides= "Range" default= "1.0" />
2019-06-29 18:38:01 +08:00
<member name= "tick_count" type= "int" setter= "set_ticks" getter= "get_ticks" default= "0" >
2019-04-19 17:21:09 +08:00
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "ticks_on_borders" type= "bool" setter= "set_ticks_on_borders" getter= "get_ticks_on_borders" default= "false" >
2019-04-19 17:21:09 +08:00
If [code]true[/code], the slider will display ticks for minimum and maximum values.
2017-09-13 04:42:36 +08:00
</member>
</members>
2021-12-10 11:19:10 +08:00
<signals >
<signal name= "drag_ended" >
2022-08-07 02:11:48 +08:00
<param index= "0" name= "value_changed" type= "bool" />
2021-12-10 11:19:10 +08:00
<description >
2022-08-10 10:00:19 +08:00
Emitted when dragging stops. If [param value_changed] is true, [member Range.value] is different from the value when you started the dragging.
2021-12-10 11:19:10 +08:00
</description>
</signal>
<signal name= "drag_started" >
<description >
2023-12-21 11:23:35 +08:00
Emitted when dragging is started. This is emitted before the corresponding [signal Range.value_changed] signal.
2021-12-10 11:19:10 +08:00
</description>
</signal>
</signals>
2023-09-26 22:41:24 +08:00
<theme_items >
<theme_item name= "center_grabber" data_type= "constant" type= "int" default= "0" >
Boolean constant. If [code]1[/code], the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position.
</theme_item>
<theme_item name= "grabber_offset" data_type= "constant" type= "int" default= "0" >
2023-10-03 02:11:43 +08:00
Vertical or horizontal offset of the grabber.
2023-09-26 22:41:24 +08:00
</theme_item>
<theme_item name= "grabber" data_type= "icon" type= "Texture2D" >
The texture for the grabber (the draggable element).
</theme_item>
<theme_item name= "grabber_disabled" data_type= "icon" type= "Texture2D" >
The texture for the grabber when it's disabled.
</theme_item>
<theme_item name= "grabber_highlight" data_type= "icon" type= "Texture2D" >
The texture for the grabber when it's focused.
</theme_item>
<theme_item name= "tick" data_type= "icon" type= "Texture2D" >
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
<theme_item name= "grabber_area" data_type= "style" type= "StyleBox" >
2023-10-03 02:11:43 +08:00
The background of the area to the left or bottom of the grabber.
2023-09-26 22:41:24 +08:00
</theme_item>
<theme_item name= "grabber_area_highlight" data_type= "style" type= "StyleBox" >
2023-10-03 02:11:43 +08:00
The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.
2023-09-26 22:41:24 +08:00
</theme_item>
<theme_item name= "slider" data_type= "style" type= "StyleBox" >
2023-10-03 02:11:43 +08:00
The background for the whole slider. Affects the height or width of the [theme_item grabber_area].
2023-09-26 22:41:24 +08:00
</theme_item>
</theme_items>
2017-09-13 04:42:36 +08:00
</class>