2018-10-09 07:24:44 +02:00
|
|
|
tool
|
|
|
|
extends HBoxContainer
|
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func set_model_data(data) -> void:
|
2018-10-09 07:24:44 +02:00
|
|
|
if data.has("rgb"):
|
|
|
|
$Type.selected = 1
|
2018-10-28 17:06:42 +01:00
|
|
|
$Value.text = data.rgb
|
|
|
|
elif data.has("rgba"):
|
|
|
|
$Type.selected = 2
|
|
|
|
$Value.text = data.rgba
|
2018-10-09 07:24:44 +02:00
|
|
|
elif data.has("f"):
|
|
|
|
$Type.selected = 0
|
2018-10-28 17:06:42 +01:00
|
|
|
$Value.text = data.f
|
2018-10-09 07:24:44 +02:00
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func get_model_data() -> Dictionary:
|
2018-10-09 07:24:44 +02:00
|
|
|
if $Type.selected == 1:
|
2018-10-28 17:06:42 +01:00
|
|
|
return { rgb=$Value.text }
|
|
|
|
elif $Type.selected == 2:
|
|
|
|
return { rgba=$Value.text }
|
2018-10-09 07:24:44 +02:00
|
|
|
else:
|
2018-10-28 17:06:42 +01:00
|
|
|
return { f=$Value.text }
|
2018-10-09 07:24:44 +02:00
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func _on_Delete_pressed() -> void:
|
2018-10-09 07:24:44 +02:00
|
|
|
queue_free()
|