class_slider.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Slider.xml.
  6. .. _class_Slider:
  7. Slider
  8. ======
  9. **Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`HSlider<class_HSlider>`, :ref:`VSlider<class_VSlider>`
  11. Base class for GUI sliders.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Base class for GUI sliders.
  16. \ **Note:** The :ref:`Range.changed<class_Range_signal_changed>` and :ref:`Range.value_changed<class_Range_signal_value_changed>` signals are part of the :ref:`Range<class_Range>` class which this class inherits from.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`editable<class_Slider_property_editable>` | ``true`` |
  24. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  25. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  26. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`scrollable<class_Slider_property_scrollable>` | ``true`` |
  28. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | size_flags_vertical | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) |
  30. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`tick_count<class_Slider_property_tick_count>` | ``0`` |
  32. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | ``false`` |
  34. +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  35. .. rst-class:: classref-section-separator
  36. ----
  37. .. rst-class:: classref-descriptions-group
  38. Signals
  39. -------
  40. .. _class_Slider_signal_drag_ended:
  41. .. rst-class:: classref-signal
  42. **drag_ended** **(** :ref:`bool<class_bool>` value_changed **)**
  43. Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value<class_Range_property_value>` is different from the value when you started the dragging.
  44. .. rst-class:: classref-item-separator
  45. ----
  46. .. _class_Slider_signal_drag_started:
  47. .. rst-class:: classref-signal
  48. **drag_started** **(** **)**
  49. Emitted when dragging is started.
  50. .. rst-class:: classref-section-separator
  51. ----
  52. .. rst-class:: classref-descriptions-group
  53. Property Descriptions
  54. ---------------------
  55. .. _class_Slider_property_editable:
  56. .. rst-class:: classref-property
  57. :ref:`bool<class_bool>` **editable** = ``true``
  58. .. rst-class:: classref-property-setget
  59. - void **set_editable** **(** :ref:`bool<class_bool>` value **)**
  60. - :ref:`bool<class_bool>` **is_editable** **(** **)**
  61. If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code.
  62. .. rst-class:: classref-item-separator
  63. ----
  64. .. _class_Slider_property_scrollable:
  65. .. rst-class:: classref-property
  66. :ref:`bool<class_bool>` **scrollable** = ``true``
  67. .. rst-class:: classref-property-setget
  68. - void **set_scrollable** **(** :ref:`bool<class_bool>` value **)**
  69. - :ref:`bool<class_bool>` **is_scrollable** **(** **)**
  70. If ``true``, the value can be changed using the mouse wheel.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_Slider_property_tick_count:
  74. .. rst-class:: classref-property
  75. :ref:`int<class_int>` **tick_count** = ``0``
  76. .. rst-class:: classref-property-setget
  77. - void **set_ticks** **(** :ref:`int<class_int>` value **)**
  78. - :ref:`int<class_int>` **get_ticks** **(** **)**
  79. Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_Slider_property_ticks_on_borders:
  83. .. rst-class:: classref-property
  84. :ref:`bool<class_bool>` **ticks_on_borders** = ``false``
  85. .. rst-class:: classref-property-setget
  86. - void **set_ticks_on_borders** **(** :ref:`bool<class_bool>` value **)**
  87. - :ref:`bool<class_bool>` **get_ticks_on_borders** **(** **)**
  88. If ``true``, the slider will display ticks for minimum and maximum values.
  89. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  90. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  91. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  92. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`