material-maker/addons/material_maker/widgets/node_editor/parameter_float.gd
2018-10-28 16:26:37 +01:00

24 lines
457 B
GDScript

tool
extends HBoxContainer
func _ready():
pass
func get_model_data():
var data = {}
data.min = $Min.value
data.max = $Max.value
data.step = $Step.value
if $SpinBox.pressed:
data.widget = "spinbox"
return data
func set_model_data(data):
if data.has("min"):
$Min.value = data.min
if data.has("max"):
$Max.value = data.max
if data.has("step"):
$Step.value = data.step
$SpinBox.pressed = ( data.has("widget") && data.widget == "spinbox" )