Skip to content

Commit

Permalink
Merge pull request #21 from TaloDev/develop
Browse files Browse the repository at this point in the history
Release 0.7.1
  • Loading branch information
tudddorrr authored Sep 14, 2024
2 parents 5e407ac + e1f9a48 commit 58bde26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/talo/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Talo Game Services"
description="Talo (https://trytalo.com) is an open-source game backend with services designed to help you build games faster. You can currently:\n\n- Identify and authenticate players\n- Store persistent data across players\n- Track events (levelling up, finding loot, etc)\n- Display high scores with leaderboards\n- Store and load player saves\n- Load game config options and flags from the cloud\n- Get feedback directly from your players"
author="trytalo"
version="0.7.0"
version="0.7.1"
script="talo_autoload.gd"
9 changes: 8 additions & 1 deletion addons/talo/samples/leaderboards/scripts/leaderboard.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ var entry_scene = preload("res://addons/talo/samples/leaderboards/entry.tscn")
@onready var info_label: Label = %InfoLabel
@onready var username: TextEdit = %Username

var _entries_error: bool

func _ready() -> void:
leaderboard_name.text = leaderboard_name.text.replace("{leaderboard}", leaderboard_internal_name)

await _load_entries()
if entries_container.get_child_count() == 0:
info_label.text = "No entries yet!"
info_label.text = "No entries yet!" if not _entries_error else "Failed loading leaderboard %s. Does it exist?" % [leaderboard_internal_name]
else:
info_label.text = "%s entries" % entries_container.get_child_count()

Expand All @@ -36,6 +38,11 @@ func _load_entries() -> void:

while !done:
var res = await Talo.leaderboards.get_entries(leaderboard_internal_name, page)

if res.size() == 0:
_entries_error = true
return

var entries = res[0]
var last_page = res[2]

Expand Down

0 comments on commit 58bde26

Please sign in to comment.