Select correct entries in level selector when clicking them

This commit is contained in:
Sebastian Morr 2020-10-01 14:56:24 +02:00
parent 56995440a2
commit 70fe577788
2 changed files with 5 additions and 2 deletions

View file

@ -107,12 +107,14 @@ func repopulate_levels():
level_select.clear()
for level in levels.chapters[current_chapter].levels:
level_select.add_item(level.slug)
level_select.select(current_level)
func repopulate_chapters():
levels.reload()
chapter_select.clear()
for c in levels.chapters:
chapter_select.add_item(c.slug)
chapter_select.select(current_chapter)
func update_repos():
for r in repositories:

View file

@ -157,6 +157,7 @@ func update_node_positions():
objects[ref].position = Vector2(target.position.x ,target.position.y - 100)
var target_reference = objects["HEAD"].children.keys()[0]
if objects.has(target_reference):
var target = objects[target_reference]
objects["HEAD"].position = Vector2(target.position.x ,target.position.y - 100)