Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AnimationMixer (2)
- AudioStreamPlayer
- CanvasItem (2)
- CanvasLayer (1)
- EditorFileSystem
- EditorPlugin (1)
- EditorResourcePreview
- HTTPRequest
- InstancePlaceholder
- MissingNode
- MultiplayerSpawner
- MultiplayerSynchronizer
- NavigationAgent2D
- NavigationAgent3D
- Node3D (31)
- ResourcePreloader
- ShaderGlobalsOverride
- StatusIndicator
- Timer
- Viewport (2)
- WorldEnvironment
- BaseButton (3)
- ColorRect
- Container (13)
- GraphEdit
- ItemList
- Label
- LineEdit
- MenuBar
- NinePatchRect
- Panel
- Range (6)
- ReferenceRect
- RichTextLabel
- Separator (2)
- TabBar
- TextEdit (1)
- TextureRect
- Tree
- VideoStreamPlayer
Table of contents
-
var allow_greater: bool = false -
var allow_lesser: bool = false -
var exp_edit: bool = false -
var max_value: float = 100.0 -
var min_value: float = 0.0 -
var page: float = 0.0 -
var ratio: float -
var rounded: bool = false -
var size_flags_vertical = SIZE_SHRINK_BEGIN -
var step: float = 0.01 -
var value: float = 0.0 -
virtual func _value_changed(new_value: float) -> void -
func set_value_no_signal(value: float) -> void -
func share(with: Node) -> void -
func unshare() -> void -
signal changed() -
signal value_changed(value: float)
Range #
is_instantiable, Node, core, not_builtin_classes
Abstract base class for controls that represent a number within a range.
Range is an abstract base class for controls that represent a number within a range, using a configured step and page size. See e.g. ScrollBar and Slider for examples of higher-level nodes using Range.
Members #
var allow_greater: bool = false#
If true, value may be greater than max_value.
var allow_lesser: bool = false#
If true, value may be less than min_value.
var exp_edit: bool = false#
If true, and min_value is greater than 0, value will be represented exponentially rather than linearly.
var max_value: float = 100.0#
Maximum value. Range is clamped if value is greater than max_value.
var min_value: float = 0.0#
Minimum value. Range is clamped if value is less than min_value.
var page: float = 0.0#
Page size. Used mainly for ScrollBar. A ScrollBar's grabber length is the ScrollBar's size multiplied by page over the difference between min_value and max_value.
var ratio: float#
The value mapped between 0 and 1.
var rounded: bool = false#
If true, value will always be rounded to the nearest integer.
var size_flags_vertical = SIZE_SHRINK_BEGIN#
var step: float = 0.01#
If greater than 0, value will always be rounded to a multiple of this property's value. If rounded is also true, value will first be rounded to a multiple of this property's value, then rounded to the nearest integer.
var value: float = 0.0#
Range's current value. Changing this property (even via code) will trigger value_changed signal. Use set_value_no_signal if you want to avoid it.
Methods #
virtual func _value_changed(new_value: float) -> void#
Called when the Range's value is changed (following the same conditions as value_changed).
func set_value_no_signal(value: float) -> void#
Sets the Range's current value to the specified value, without emitting the value_changed signal.
func share(with: Node) -> void#
Binds two Ranges together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group.
Annotations #
Constants #
Constructors #
Enums #
Operators #
Signals #
signal changed()#
Emitted when min_value, max_value, page, or step change.
signal value_changed(value: float)#
Emitted when value changes. When used on a Slider, this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to value_changed, consider using a debouncing Timer to call the function less often.
Note: Unlike signals such as LineEdit.text_changed, value_changed is also emitted when value is set directly via code.