virtualx-engine/demos/2d/screen_space_shaders/screen_shaders.gd
Rémi Verschelde 7589b2bf60 Improve code formatting
The scripts were streamlined using more or less the following conventions:
 - space after a comma in lists of arguments
 - spaces around weak operators (+, -), no spaces around strong operators (*, /)
 - spaces around comparison operators and compound assignment operators
 - space after a comment start (#)
 - removed trailing spaces or tabs, apart from those that delimit the function indentation level (those could be removed too but since they are added automatically by the editor when typing code, keeping them for now)
 - function blocks separate by two newlines
 - comment sentences start with an upper-case letter
2015-12-09 08:39:12 +01:00

26 lines
668 B
GDScript

extends Control
func _ready():
# Initialization here
for c in get_node("pictures").get_children():
get_node("picture").add_item("PIC: " + c.get_name())
for c in get_node("effects").get_children():
get_node("effect").add_item("FX: " + c.get_name())
func _on_picture_item_selected(ID):
for c in range(get_node("pictures").get_child_count()):
if (ID == c):
get_node("pictures").get_child(c).show()
else:
get_node("pictures").get_child(c).hide()
func _on_effect_item_selected(ID):
for c in range(get_node("effects").get_child_count()):
if (ID == c):
get_node("effects").get_child(c).show()
else:
get_node("effects").get_child(c).hide()