1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Update ShaderEffect.gd

This commit is contained in:
Manolis Papadeas 2021-05-30 17:42:50 +03:00
parent 531fad8217
commit 207b3a5630

View file

@ -130,6 +130,20 @@ func change_shader(_shader : Shader, name : String) -> void:
hbox.add_child(label) hbox.add_child(label)
hbox.add_child(spinbox) hbox.add_child(spinbox)
shader_params.add_child(hbox) shader_params.add_child(hbox)
elif u_type == "int":
var label := Label.new()
label.text = u_name
var spinbox := SpinBox.new()
spinbox.min_value = 0
spinbox.max_value = 255
spinbox.step = 1
if u_value != "":
spinbox.value = int(u_value)
spinbox.connect("value_changed", self, "set_shader_param", [u_name])
var hbox := HBoxContainer.new()
hbox.add_child(label)
hbox.add_child(spinbox)
shader_params.add_child(hbox)
# print("---") # print("---")
# print(uniform_split) # print(uniform_split)