class_editorspinslider.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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/EditorSpinSlider.xml.
  6. .. _class_EditorSpinSlider:
  7. EditorSpinSlider
  8. ================
  9. **Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Godot editor's control for editing numeric values.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This :ref:`Control<class_Control>` node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` to recreate the same behavior.
  15. If the :ref:`Range.step<class_Range_property_step>` value is ``1``, the **EditorSpinSlider** will display up/down arrows, similar to :ref:`SpinBox<class_SpinBox>`. If the :ref:`Range.step<class_Range_property_step>` value is not ``1``, a slider will be displayed instead.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`flat<class_EditorSpinSlider_property_flat>` | ``false`` |
  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:`hide_slider<class_EditorSpinSlider_property_hide_slider>` | ``false`` |
  27. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  28. | :ref:`String<class_String>` | :ref:`label<class_EditorSpinSlider_property_label>` | ``""`` |
  29. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`read_only<class_EditorSpinSlider_property_read_only>` | ``false`` |
  31. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  32. | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) |
  33. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  34. | :ref:`float<class_float>` | step | ``1.0`` (overrides :ref:`Range<class_Range_property_step>`) |
  35. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  36. | :ref:`String<class_String>` | :ref:`suffix<class_EditorSpinSlider_property_suffix>` | ``""`` |
  37. +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+
  38. .. rst-class:: classref-reftable-group
  39. Theme Properties
  40. ----------------
  41. .. table::
  42. :widths: auto
  43. +-----------------------------------+---------------------------------------------------------------------------+
  44. | :ref:`Texture2D<class_Texture2D>` | :ref:`updown<class_EditorSpinSlider_theme_icon_updown>` |
  45. +-----------------------------------+---------------------------------------------------------------------------+
  46. | :ref:`Texture2D<class_Texture2D>` | :ref:`updown_disabled<class_EditorSpinSlider_theme_icon_updown_disabled>` |
  47. +-----------------------------------+---------------------------------------------------------------------------+
  48. .. rst-class:: classref-section-separator
  49. ----
  50. .. rst-class:: classref-descriptions-group
  51. Signals
  52. -------
  53. .. _class_EditorSpinSlider_signal_grabbed:
  54. .. rst-class:: classref-signal
  55. **grabbed**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_grabbed>`
  56. Emitted when the spinner/slider is grabbed.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_EditorSpinSlider_signal_ungrabbed:
  60. .. rst-class:: classref-signal
  61. **ungrabbed**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_ungrabbed>`
  62. Emitted when the spinner/slider is ungrabbed.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_EditorSpinSlider_signal_value_focus_entered:
  66. .. rst-class:: classref-signal
  67. **value_focus_entered**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_value_focus_entered>`
  68. Emitted when the value form gains focus.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_EditorSpinSlider_signal_value_focus_exited:
  72. .. rst-class:: classref-signal
  73. **value_focus_exited**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_value_focus_exited>`
  74. Emitted when the value form loses focus.
  75. .. rst-class:: classref-section-separator
  76. ----
  77. .. rst-class:: classref-descriptions-group
  78. Property Descriptions
  79. ---------------------
  80. .. _class_EditorSpinSlider_property_flat:
  81. .. rst-class:: classref-property
  82. :ref:`bool<class_bool>` **flat** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_flat>`
  83. .. rst-class:: classref-property-setget
  84. - |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ )
  85. - :ref:`bool<class_bool>` **is_flat**\ (\ )
  86. If ``true``, the slider will not draw background.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_EditorSpinSlider_property_hide_slider:
  90. .. rst-class:: classref-property
  91. :ref:`bool<class_bool>` **hide_slider** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_hide_slider>`
  92. .. rst-class:: classref-property-setget
  93. - |void| **set_hide_slider**\ (\ value\: :ref:`bool<class_bool>`\ )
  94. - :ref:`bool<class_bool>` **is_hiding_slider**\ (\ )
  95. If ``true``, the slider and up/down arrows are hidden.
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_EditorSpinSlider_property_label:
  99. .. rst-class:: classref-property
  100. :ref:`String<class_String>` **label** = ``""`` :ref:`🔗<class_EditorSpinSlider_property_label>`
  101. .. rst-class:: classref-property-setget
  102. - |void| **set_label**\ (\ value\: :ref:`String<class_String>`\ )
  103. - :ref:`String<class_String>` **get_label**\ (\ )
  104. The text that displays to the left of the value.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_EditorSpinSlider_property_read_only:
  108. .. rst-class:: classref-property
  109. :ref:`bool<class_bool>` **read_only** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_read_only>`
  110. .. rst-class:: classref-property-setget
  111. - |void| **set_read_only**\ (\ value\: :ref:`bool<class_bool>`\ )
  112. - :ref:`bool<class_bool>` **is_read_only**\ (\ )
  113. If ``true``, the slider can't be interacted with.
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_EditorSpinSlider_property_suffix:
  117. .. rst-class:: classref-property
  118. :ref:`String<class_String>` **suffix** = ``""`` :ref:`🔗<class_EditorSpinSlider_property_suffix>`
  119. .. rst-class:: classref-property-setget
  120. - |void| **set_suffix**\ (\ value\: :ref:`String<class_String>`\ )
  121. - :ref:`String<class_String>` **get_suffix**\ (\ )
  122. The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.
  123. .. rst-class:: classref-section-separator
  124. ----
  125. .. rst-class:: classref-descriptions-group
  126. Theme Property Descriptions
  127. ---------------------------
  128. .. _class_EditorSpinSlider_theme_icon_updown:
  129. .. rst-class:: classref-themeproperty
  130. :ref:`Texture2D<class_Texture2D>` **updown** :ref:`🔗<class_EditorSpinSlider_theme_icon_updown>`
  131. Single texture representing both the up and down buttons.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_EditorSpinSlider_theme_icon_updown_disabled:
  135. .. rst-class:: classref-themeproperty
  136. :ref:`Texture2D<class_Texture2D>` **updown_disabled** :ref:`🔗<class_EditorSpinSlider_theme_icon_updown_disabled>`
  137. Single texture representing both the up and down buttons, when the control is readonly or disabled.
  138. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  139. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  140. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  141. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  142. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  143. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  144. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  145. .. |void| replace:: :abbr:`void (No return value.)`