screen_shaders.gd 661 B

123456789101112131415161718192021222324252627282930
  1. extends Control
  2. onready var effect = $Effect
  3. onready var effects = $Effects
  4. onready var picture = $Picture
  5. onready var pictures = $Pictures
  6. func _ready():
  7. for c in pictures.get_children():
  8. picture.add_item("PIC: " + String(c.get_name()))
  9. for c in effects.get_children():
  10. effect.add_item("FX: " + String(c.get_name()))
  11. func _on_picture_item_selected(ID):
  12. for c in range(pictures.get_child_count()):
  13. if ID == c:
  14. pictures.get_child(c).show()
  15. else:
  16. pictures.get_child(c).hide()
  17. func _on_effect_item_selected(ID):
  18. for c in range(effects.get_child_count()):
  19. if ID == c:
  20. effects.get_child(c).show()
  21. else:
  22. effects.get_child(c).hide()