What does it do ?
RangeSlider is a Godot 4 plugin that adds a two-handle slider to edit a Vector2 as a min/max range, instead of juggling two separate float variables and their clamping setters.
How does it work ?
It plugs into the inspector automatically: export a Vector2 with a range hint and the default editor is replaced by the slider :
@export_custom(PROPERTY_HINT_RANGE, "0,100,1") var health_range: Vector2 = Vector2(25, 75)
It also ships as HRangeSlider and VRangeSlider nodes you can drop into your own scenes like any other Control node.
All the styling is exposed as exported variables under the Visuals group.
The goal was to make a faithful adaptation of the MinMaxPropertyEditor that already lives in Godot (used by ParticleProcessMaterial) but isn't exposed in the editor.
Key features
- Drag the handles to set the bounds, or drag the bar to move the whole range at once.
- Hold Shift to scale around the midpoint, Ctrl/Cmd to snap to integers, scroll to step.
- Exponential and radians-as-degrees modes.
- Customizable handles, icons, colors and StyleBoxes, with defaults that follow the editor theme.
- Read and write from code via
value_range, thestart_value/end_valueshortcuts, and therange_changedsignal.
Full documentation, examples and screenshots are on the GitHub repository.
Changelog for version v1.0.0
No changelog provided for this version.