Skip to content

Commit

Permalink
Fixes #90
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEliptik committed Apr 28, 2024
1 parent 04cb87b commit 8da6353
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scenes/ui/scripts/leaderboard.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ func show_leaderboard(dict: Dictionary) -> void:

# Sort keys in descending order of values.
keys.sort_custom(func(x: String, y: String) -> bool: return dict[x] > dict[y])


# Remove entries before adding new ones
for c in score_list.get_children():
c.queue_free()

# Add entries
for k: String in keys:
var entry_instance = entry.instantiate()
score_list.add_child(entry_instance)
Expand Down

0 comments on commit 8da6353

Please sign in to comment.