diff --git a/assets/design.afdesign b/assets/design.afdesign index 5e102a7..1508daf 100644 --- a/assets/design.afdesign +++ b/assets/design.afdesign @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:034fb07ad84872c283141a5f2ae34989b349cdf77328cab5458a9263f58e4967 -size 2984138 +oid sha256:5dd5bdc3b7b21e92d97979f8e41b363fef7e6f8728aa6cc44ceee80a72c7cf91 +size 3081472 diff --git a/content/ui/menu/menu.gd b/content/ui/menu/menu.gd index 05621c2..79acafc 100644 --- a/content/ui/menu/menu.gd +++ b/content/ui/menu/menu.gd @@ -39,6 +39,11 @@ func render_entities(): return var entities = info["entities"] + + var back_button = Entity.instantiate() + back_button.click.connect(_on_entity_click) + devices_node.add_child(back_button) + back_button.set_entity_name("#back") for entity in entities: var entity_instance = Entity.instantiate() @@ -56,10 +61,14 @@ func _on_device_click(device_id): func _on_entity_click(entity_name): print(entity_name) + selected_device = null clear_menu() render_devices() + if entity_name == "#back": + return + var type = entity_name.split(".")[0] print(type)