2018-10-09 07:24:44 +02:00
|
|
|
tool
|
|
|
|
extends HBoxContainer
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
pass
|
|
|
|
|
2018-11-11 19:18:26 +01:00
|
|
|
func set_model_data(data):
|
|
|
|
$Name.text = data.name
|
|
|
|
$Label.text = data.label
|
|
|
|
if data.type == "rgb":
|
|
|
|
$Type.selected = 1
|
|
|
|
elif data.type == "rgba":
|
|
|
|
$Type.selected = 2
|
|
|
|
else:
|
|
|
|
$Type.selected = 0
|
|
|
|
$Default.text = data.default
|
|
|
|
|
|
|
|
func get_model_data():
|
|
|
|
var data = { name=$Name.text, label=$Label.text, default=$Default.text }
|
|
|
|
if $Type.selected == 1:
|
|
|
|
data.type = "rgb"
|
|
|
|
elif $Type.selected == 2:
|
|
|
|
data.type = "rgba"
|
|
|
|
else:
|
|
|
|
data.type = "f"
|
|
|
|
return data
|
|
|
|
|
2018-10-09 07:24:44 +02:00
|
|
|
func _on_Delete_pressed():
|
|
|
|
queue_free()
|