Files
godot-docs/classes/class_slider.rst
Rémi Verschelde 2b4319bc29 Sync classref with current source
Changes order of brief/long descriptions and removes category
as per godotengine/godot#35132.
2020-01-15 00:51:47 +01:00

105 lines
3.9 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the Slider.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_Slider:
Slider
======
**Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`HSlider<class_HSlider>`, :ref:`VSlider<class_VSlider>`
Base class for GUI sliders.
Description
-----------
Base class for GUI sliders.
Properties
----------
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`editable<class_Slider_property_editable>` | true |
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | **O:** 2 |
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`scrollable<class_Slider_property_scrollable>` | true |
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`int<class_int>` | size_flags_vertical | **O:** 0 |
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`int<class_int>` | :ref:`tick_count<class_Slider_property_tick_count>` | 0 |
+------------------------------------------+-----------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | false |
+------------------------------------------+-----------------------------------------------------------------+----------+
Property Descriptions
---------------------
.. _class_Slider_property_editable:
- :ref:`bool<class_bool>` **editable**
+-----------+---------------------+
| *Default* | true |
+-----------+---------------------+
| *Setter* | set_editable(value) |
+-----------+---------------------+
| *Getter* | is_editable() |
+-----------+---------------------+
If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code.
----
.. _class_Slider_property_scrollable:
- :ref:`bool<class_bool>` **scrollable**
+-----------+-----------------------+
| *Default* | true |
+-----------+-----------------------+
| *Setter* | set_scrollable(value) |
+-----------+-----------------------+
| *Getter* | is_scrollable() |
+-----------+-----------------------+
If ``true``, the value can be changed using the mouse wheel.
----
.. _class_Slider_property_tick_count:
- :ref:`int<class_int>` **tick_count**
+-----------+------------------+
| *Default* | 0 |
+-----------+------------------+
| *Setter* | set_ticks(value) |
+-----------+------------------+
| *Getter* | get_ticks() |
+-----------+------------------+
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
----
.. _class_Slider_property_ticks_on_borders:
- :ref:`bool<class_bool>` **ticks_on_borders**
+-----------+-----------------------------+
| *Default* | false |
+-----------+-----------------------------+
| *Setter* | set_ticks_on_borders(value) |
+-----------+-----------------------------+
| *Getter* | get_ticks_on_borders() |
+-----------+-----------------------------+
If ``true``, the slider will display ticks for minimum and maximum values.