class_slider.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/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. Description
  13. -----------
  14. Base class for GUI sliders.
  15. \ **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.
  16. Properties
  17. ----------
  18. +-------------------------+-----------------------------------------------------------------+-----------+
  19. | :ref:`bool<class_bool>` | :ref:`editable<class_Slider_property_editable>` | ``true`` |
  20. +-------------------------+-----------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`scrollable<class_Slider_property_scrollable>` | ``true`` |
  22. +-------------------------+-----------------------------------------------------------------+-----------+
  23. | :ref:`int<class_int>` | :ref:`tick_count<class_Slider_property_tick_count>` | ``0`` |
  24. +-------------------------+-----------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | ``false`` |
  26. +-------------------------+-----------------------------------------------------------------+-----------+
  27. Signals
  28. -------
  29. .. _class_Slider_signal_drag_ended:
  30. - **drag_ended** **(** :ref:`bool<class_bool>` value_changed **)**
  31. 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.
  32. ----
  33. .. _class_Slider_signal_drag_started:
  34. - **drag_started** **(** **)**
  35. Emitted when dragging is started.
  36. Property Descriptions
  37. ---------------------
  38. .. _class_Slider_property_editable:
  39. - :ref:`bool<class_bool>` **editable**
  40. +-----------+---------------------+
  41. | *Default* | ``true`` |
  42. +-----------+---------------------+
  43. | *Setter* | set_editable(value) |
  44. +-----------+---------------------+
  45. | *Getter* | is_editable() |
  46. +-----------+---------------------+
  47. If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code.
  48. ----
  49. .. _class_Slider_property_scrollable:
  50. - :ref:`bool<class_bool>` **scrollable**
  51. +-----------+-----------------------+
  52. | *Default* | ``true`` |
  53. +-----------+-----------------------+
  54. | *Setter* | set_scrollable(value) |
  55. +-----------+-----------------------+
  56. | *Getter* | is_scrollable() |
  57. +-----------+-----------------------+
  58. If ``true``, the value can be changed using the mouse wheel.
  59. ----
  60. .. _class_Slider_property_tick_count:
  61. - :ref:`int<class_int>` **tick_count**
  62. +-----------+------------------+
  63. | *Default* | ``0`` |
  64. +-----------+------------------+
  65. | *Setter* | set_ticks(value) |
  66. +-----------+------------------+
  67. | *Getter* | get_ticks() |
  68. +-----------+------------------+
  69. Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
  70. ----
  71. .. _class_Slider_property_ticks_on_borders:
  72. - :ref:`bool<class_bool>` **ticks_on_borders**
  73. +-----------+-----------------------------+
  74. | *Default* | ``false`` |
  75. +-----------+-----------------------------+
  76. | *Setter* | set_ticks_on_borders(value) |
  77. +-----------+-----------------------------+
  78. | *Getter* | get_ticks_on_borders() |
  79. +-----------+-----------------------------+
  80. If ``true``, the slider will display ticks for minimum and maximum values.
  81. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  82. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  83. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  84. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  85. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  86. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`