summaryrefslogtreecommitdiff
path: root/scripts/leaderboard.gd
diff options
context:
space:
mode:
authorLogan <logan@cflip.net>2023-04-30 18:51:05 -0600
committerLogan <logan@cflip.net>2023-04-30 18:51:05 -0600
commitf4381c59c1d239400fbd787fe3a5247f0c535460 (patch)
tree8dfc62aaf276e7f8438e96fec4467bcde917d286 /scripts/leaderboard.gd
parentf30fbd753b23be1f71b4bada5e7063ac00215c33 (diff)
Move to Godot 4 and fixes
Diffstat (limited to 'scripts/leaderboard.gd')
-rw-r--r--scripts/leaderboard.gd6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/leaderboard.gd b/scripts/leaderboard.gd
index 0373e44..279d3c6 100644
--- a/scripts/leaderboard.gd
+++ b/scripts/leaderboard.gd
@@ -12,7 +12,7 @@ func _ready():
else:
$Control/HBoxContainer.visible = false
$Control/LineEdit.grab_focus()
- if !global_variables.player_name.empty():
+ if !global_variables.player_name.is_empty():
$Control/LineEdit.text = global_variables.player_name
$Control/LineEdit.select_all()
$Control/Label.text = "Your score:\n" + str(global_variables.score)
@@ -26,7 +26,7 @@ func refresh_menu():
get_node(label_score).text = str(global_variables.leaderboard[i][1])
func _on_LineEdit_text_entered(new_text):
- if !new_text.empty():
+ if !new_text.is_empty():
$Control/LineEdit.release_focus()
$Control/LineEdit.focus_mode = FOCUS_NONE
$Control/LineEdit.editable = false
@@ -52,7 +52,7 @@ func _on_QuitButton_pressed():
queue_free()
else:
# warning-ignore:return_value_discarded
- get_tree().change_scene("res://scenes/mainmenu.tscn")
+ get_tree().change_scene_to_file("res://scenes/mainmenu.tscn")
get_tree().paused = false
global_variables.reset_variables()