mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
Select correct entries in level selector when clicking them
This commit is contained in:
parent
56995440a2
commit
70fe577788
2 changed files with 5 additions and 2 deletions
2
main.gd
2
main.gd
|
@ -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:
|
||||
|
|
|
@ -157,8 +157,9 @@ func update_node_positions():
|
|||
objects[ref].position = Vector2(target.position.x ,target.position.y - 100)
|
||||
|
||||
var target_reference = objects["HEAD"].children.keys()[0]
|
||||
var target = objects[target_reference]
|
||||
objects["HEAD"].position = Vector2(target.position.x ,target.position.y - 100)
|
||||
if objects.has(target_reference):
|
||||
var target = objects[target_reference]
|
||||
objects["HEAD"].position = Vector2(target.position.x ,target.position.y - 100)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue