Cleaning up dead comments
This commit is contained in:
@@ -27,38 +27,6 @@ func _ready() -> void:
|
||||
|
||||
# ── Loading ───────────────────────────────────────────────────────────────────
|
||||
|
||||
#func _load_page(page: int) -> void:
|
||||
#if not is_inside_tree():
|
||||
#return
|
||||
#if not is_instance_valid(loading_lbl):
|
||||
#print("Dead")
|
||||
#return
|
||||
#if not is_instance_valid(entry_list):
|
||||
#print("ded")
|
||||
#return
|
||||
#
|
||||
#_page = page
|
||||
#loading_lbl.visible = true
|
||||
#
|
||||
#for c in entry_list.get_children():
|
||||
#if is_instance_valid(c):
|
||||
#c.queue_free()
|
||||
#
|
||||
#Network.request(
|
||||
#"leaderboard.get",
|
||||
#{ "page": _page, "pageSize": PAGE_SIZE },
|
||||
#func(_type: String, p: Variant):
|
||||
#if not is_instance_valid(self) or not is_inside_tree():
|
||||
#return
|
||||
#_on_leaderboard_ok(p),
|
||||
#func(_c: String, _m: String):
|
||||
#if not is_instance_valid(self) or not is_inside_tree():
|
||||
#return
|
||||
#if not is_instance_valid(loading_lbl):
|
||||
#return
|
||||
#loading_lbl.text = "Failed to load."
|
||||
#loading_lbl.visible = true
|
||||
#)
|
||||
func _load_page(page: int) -> void:
|
||||
if not is_inside_tree():
|
||||
return
|
||||
@@ -92,46 +60,7 @@ func _load_page(page: int) -> void:
|
||||
call_deferred("_on_leaderboard_failed")
|
||||
)
|
||||
|
||||
#func _on_leaderboard_ok(p: Variant) -> void:
|
||||
#print("[Leaderboard] rcvd: ", p)
|
||||
#if not is_instance_valid(self) or not is_inside_tree():
|
||||
#return
|
||||
#if not is_instance_valid(loading_lbl):
|
||||
#print("dead here")
|
||||
#return
|
||||
#if not is_instance_valid(entry_list):
|
||||
#print("dead over here")
|
||||
#return
|
||||
#
|
||||
#loading_lbl.visible = false
|
||||
#
|
||||
#var d := p as Dictionary
|
||||
#var entries: Array = d.get("entries", []) as Array
|
||||
#_total = int(d.get("totalCount", 0))
|
||||
#_page_count = max(1, int(ceil(_total / float(PAGE_SIZE))))
|
||||
#
|
||||
#_update_pagination()
|
||||
#
|
||||
#if entries.is_empty():
|
||||
#if is_instance_valid(loading_lbl):
|
||||
#loading_lbl.text = "No players yet."
|
||||
#loading_lbl.visible = true
|
||||
#return
|
||||
#
|
||||
#for entry in entries:
|
||||
#if not is_instance_valid(entry_list):
|
||||
#return
|
||||
#
|
||||
#var e := entry as Dictionary
|
||||
#var row := ROW.instantiate()
|
||||
#entry_list.add_child(row)
|
||||
#row.setup(
|
||||
#int(e.get("rank", 0)),
|
||||
#e.get("displayName", "???"),
|
||||
#int(e.get("rankScore", 0)),
|
||||
#e.get("accountId", "") == Auth.user_id,
|
||||
#int(e.get("rank", 99)) <= 3
|
||||
#)
|
||||
|
||||
func _on_leaderboard_ok(p: Variant) -> void:
|
||||
|
||||
if not is_inside_tree():
|
||||
|
||||
Reference in New Issue
Block a user