Debian Codegraph @

doc/classes/Slider.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="Slider" inherits="Range" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Abstract base class for sliders.
5 </brief_description>
6 <description>
7 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.
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true" keywords="readonly, disabled, enabled">
13 If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
14 </member>
15 <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
16 <member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true">
17 If [code]true[/code], the value can be changed using the mouse wheel.
18 </member>
19 <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
20 <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0">
21 Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
22 </member>
23 <member name="ticks_on_borders" type="bool" setter="set_ticks_on_borders" getter="get_ticks_on_borders" default="false">
24 If [code]true[/code], the slider will display ticks for minimum and maximum values.
25 </member>
26 <member name="ticks_position" type="int" setter="set_ticks_position" getter="get_ticks_position" enum="Slider.TickPosition" default="0">
27 Sets the position of the ticks. See [enum TickPosition] for details.
28 </member>
29 </members>
30 <signals>
31 <signal name="drag_ended">
32 <param index="0" name="value_changed" type="bool" />
33 <description>
34 Emitted when the grabber stops being dragged. If [param value_changed] is [code]true[/code], [member Range.value] is different from the value when the dragging was started.
35 </description>
36 </signal>
37 <signal name="drag_started">
38 <description>
39 Emitted when the grabber starts being dragged. This is emitted before the corresponding [signal Range.value_changed] signal.
40 </description>
41 </signal>
42 </signals>
43 <constants>
44 <constant name="TICK_POSITION_BOTTOM_RIGHT" value="0" enum="TickPosition">
45 Places the ticks at the bottom of the [HSlider], or right of the [VSlider].
46 </constant>
47 <constant name="TICK_POSITION_TOP_LEFT" value="1" enum="TickPosition">
48 Places the ticks at the top of the [HSlider], or left of the [VSlider].
49 </constant>
50 <constant name="TICK_POSITION_BOTH" value="2" enum="TickPosition">
51 Places the ticks at the both sides of the slider.
52 </constant>
53 <constant name="TICK_POSITION_CENTER" value="3" enum="TickPosition">
54 Places the ticks at the center of the slider.
55 </constant>
56 </constants>
57 <theme_items>
58 <theme_item name="center_grabber" data_type="constant" type="int" default="0">
59 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.
60 </theme_item>
61 <theme_item name="grabber_offset" data_type="constant" type="int" default="0">
62 Vertical or horizontal offset of the grabber.
63 </theme_item>
64 <theme_item name="tick_offset" data_type="constant" type="int" default="0">
65 Vertical or horizontal offset of the ticks. The offset is reversed for top or left ticks.
66 </theme_item>
67 <theme_item name="grabber" data_type="icon" type="Texture2D">
68 The texture for the grabber (the draggable element).
69 </theme_item>
70 <theme_item name="grabber_disabled" data_type="icon" type="Texture2D">
71 The texture for the grabber when it's disabled.
72 </theme_item>
73 <theme_item name="grabber_highlight" data_type="icon" type="Texture2D">
74 The texture for the grabber when it's focused.
75 </theme_item>
76 <theme_item name="tick" data_type="icon" type="Texture2D">
77 The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
78 </theme_item>
79 <theme_item name="grabber_area" data_type="style" type="StyleBox">
80 The background of the area to the left or bottom of the grabber.
81 </theme_item>
82 <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
83 The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.
84 </theme_item>
85 <theme_item name="slider" data_type="style" type="StyleBox">
86 The background for the whole slider. Affects the height or width of the [theme_item grabber_area].
87 </theme_item>
88 </theme_items>
89 </class>