:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Slider.xml. .. _class_Slider: Slider ====== **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`HSlider`, :ref:`VSlider` Base class for GUI sliders. Description ----------- Base class for GUI sliders. \ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. Properties ---------- +-------------------------+-----------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`editable` | ``true`` | +-------------------------+-----------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`scrollable` | ``true`` | +-------------------------+-----------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`tick_count` | ``0`` | +-------------------------+-----------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | +-------------------------+-----------------------------------------------------------------+-----------+ Signals ------- .. _class_Slider_signal_drag_ended: - **drag_ended** **(** :ref:`bool` value_changed **)** Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value` is different from the value when you started the dragging. ---- .. _class_Slider_signal_drag_started: - **drag_started** **(** **)** Emitted when dragging is started. Property Descriptions --------------------- .. _class_Slider_property_editable: - :ref:`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` **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` **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` **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. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`