class_slider.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Slider.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Slider:
  6. Slider
  7. ======
  8. **Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`HSlider<class_HSlider>`, :ref:`VSlider<class_VSlider>`
  10. Base class for GUI sliders.
  11. Description
  12. -----------
  13. Base class for GUI sliders.
  14. **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.
  15. Properties
  16. ----------
  17. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`editable<class_Slider_property_editable>` | ``true`` |
  19. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  20. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` *(parent override)* |
  21. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`scrollable<class_Slider_property_scrollable>` | ``true`` |
  23. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  24. | :ref:`int<class_int>` | size_flags_vertical | ``0`` *(parent override)* |
  25. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  26. | :ref:`int<class_int>` | :ref:`tick_count<class_Slider_property_tick_count>` | ``0`` |
  27. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | ``false`` |
  29. +------------------------------------------+-----------------------------------------------------------------+---------------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_Slider_property_editable:
  33. - :ref:`bool<class_bool>` **editable**
  34. +-----------+---------------------+
  35. | *Default* | ``true`` |
  36. +-----------+---------------------+
  37. | *Setter* | set_editable(value) |
  38. +-----------+---------------------+
  39. | *Getter* | is_editable() |
  40. +-----------+---------------------+
  41. If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code.
  42. ----
  43. .. _class_Slider_property_scrollable:
  44. - :ref:`bool<class_bool>` **scrollable**
  45. +-----------+-----------------------+
  46. | *Default* | ``true`` |
  47. +-----------+-----------------------+
  48. | *Setter* | set_scrollable(value) |
  49. +-----------+-----------------------+
  50. | *Getter* | is_scrollable() |
  51. +-----------+-----------------------+
  52. If ``true``, the value can be changed using the mouse wheel.
  53. ----
  54. .. _class_Slider_property_tick_count:
  55. - :ref:`int<class_int>` **tick_count**
  56. +-----------+------------------+
  57. | *Default* | ``0`` |
  58. +-----------+------------------+
  59. | *Setter* | set_ticks(value) |
  60. +-----------+------------------+
  61. | *Getter* | get_ticks() |
  62. +-----------+------------------+
  63. Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
  64. ----
  65. .. _class_Slider_property_ticks_on_borders:
  66. - :ref:`bool<class_bool>` **ticks_on_borders**
  67. +-----------+-----------------------------+
  68. | *Default* | ``false`` |
  69. +-----------+-----------------------------+
  70. | *Setter* | set_ticks_on_borders(value) |
  71. +-----------+-----------------------------+
  72. | *Getter* | get_ticks_on_borders() |
  73. +-----------+-----------------------------+
  74. If ``true``, the slider will display ticks for minimum and maximum values.
  75. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  76. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  77. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`