screen_shaders.gd 730 B

1234567891011121314151617181920212223242526272829
  1. extends Control
  2. @onready var effect: OptionButton = $Effect
  3. @onready var effects: Control = $Effects
  4. @onready var picture: OptionButton = $Picture
  5. @onready var pictures: Control = $Pictures
  6. func _ready() -> void:
  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: int) -> void:
  12. for c in 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: int) -> void:
  18. for c in effects.get_child_count():
  19. if id == c:
  20. effects.get_child(c).show()
  21. else:
  22. effects.get_child(c).hide()