godot-demo-projects/2d/screen_space_shaders/screen_shaders.gd

24 lines
529 B
GDScript3
Raw Normal View History

extends Control
func _ready():
2020-02-03 09:53:07 +01:00
for c in $Pictures.get_children():
$Picture.add_item("PIC: " + c.get_name())
for c in $Effects.get_children():
$Effect.add_item("FX: " + c.get_name())
func _on_picture_item_selected(ID):
2020-02-03 09:53:07 +01:00
for c in range($Pictures.get_child_count()):
if ID == c:
2020-02-03 09:53:07 +01:00
$Pictures.get_child(c).show()
else:
2020-02-03 09:53:07 +01:00
$Pictures.get_child(c).hide()
func _on_effect_item_selected(ID):
2020-02-03 09:53:07 +01:00
for c in range($Effects.get_child_count()):
if ID == c:
2020-02-03 09:53:07 +01:00
$Effects.get_child(c).show()
else:
2020-02-03 09:53:07 +01:00
$Effects.get_child(c).hide()