mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
23 lines
371 B
GDScript3
23 lines
371 B
GDScript3
|
tool
|
||
|
extends HBoxContainer
|
||
|
|
||
|
func _ready():
|
||
|
pass
|
||
|
|
||
|
func set_model_data(data):
|
||
|
if data.has("rgb"):
|
||
|
$Type.selected = 1
|
||
|
$Default.text = data.rgb
|
||
|
elif data.has("f"):
|
||
|
$Type.selected = 0
|
||
|
$Default.text = data.f
|
||
|
|
||
|
func get_model_data():
|
||
|
if $Type.selected == 1:
|
||
|
return { rgb=$Default.text }
|
||
|
else:
|
||
|
return { f=$Default.text }
|
||
|
|
||
|
func _on_Delete_pressed():
|
||
|
queue_free()
|