class_slider.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/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. Abstract base class for sliders.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Abstract base class for sliders, used to adjust a value by moving a grabber along a horizontal or vertical axis. Sliders are :ref:`Range<class_Range>`-based controls.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`editable<class_Slider_property_editable>` | ``true`` |
  23. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  24. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  25. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`scrollable<class_Slider_property_scrollable>` | ``true`` |
  27. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | step | ``1.0`` (overrides :ref:`Range<class_Range_property_step>`) |
  29. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  30. | :ref:`int<class_int>` | :ref:`tick_count<class_Slider_property_tick_count>` | ``0`` |
  31. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | ``false`` |
  33. +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Signals
  38. -------
  39. .. _class_Slider_signal_drag_ended:
  40. .. rst-class:: classref-signal
  41. **drag_ended** **(** :ref:`bool<class_bool>` value_changed **)**
  42. 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.
  43. .. rst-class:: classref-item-separator
  44. ----
  45. .. _class_Slider_signal_drag_started:
  46. .. rst-class:: classref-signal
  47. **drag_started** **(** **)**
  48. Emitted when dragging is started.
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Property Descriptions
  53. ---------------------
  54. .. _class_Slider_property_editable:
  55. .. rst-class:: classref-property
  56. :ref:`bool<class_bool>` **editable** = ``true``
  57. .. rst-class:: classref-property-setget
  58. - void **set_editable** **(** :ref:`bool<class_bool>` value **)**
  59. - :ref:`bool<class_bool>` **is_editable** **(** **)**
  60. If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_Slider_property_scrollable:
  64. .. rst-class:: classref-property
  65. :ref:`bool<class_bool>` **scrollable** = ``true``
  66. .. rst-class:: classref-property-setget
  67. - void **set_scrollable** **(** :ref:`bool<class_bool>` value **)**
  68. - :ref:`bool<class_bool>` **is_scrollable** **(** **)**
  69. If ``true``, the value can be changed using the mouse wheel.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_Slider_property_tick_count:
  73. .. rst-class:: classref-property
  74. :ref:`int<class_int>` **tick_count** = ``0``
  75. .. rst-class:: classref-property-setget
  76. - void **set_ticks** **(** :ref:`int<class_int>` value **)**
  77. - :ref:`int<class_int>` **get_ticks** **(** **)**
  78. Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_Slider_property_ticks_on_borders:
  82. .. rst-class:: classref-property
  83. :ref:`bool<class_bool>` **ticks_on_borders** = ``false``
  84. .. rst-class:: classref-property-setget
  85. - void **set_ticks_on_borders** **(** :ref:`bool<class_bool>` value **)**
  86. - :ref:`bool<class_bool>` **get_ticks_on_borders** **(** **)**
  87. If ``true``, the slider will display ticks for minimum and maximum values.
  88. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  89. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  90. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  91. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  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.)`
  93. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`