16 lines
350 B
GDScript
16 lines
350 B
GDScript
@tool
|
|
extends Validator
|
|
class_name RangeValidator
|
|
|
|
|
|
func get_value(control: Control) -> Variant:
|
|
var range_control: Range = control as Range
|
|
if not range_control:
|
|
return null
|
|
return range_control.value
|
|
|
|
|
|
func is_type(node: Node) -> bool:
|
|
return node is Range and \
|
|
not (node is ScrollBar or node is ProgressBar or node is TextureProgressBar)
|