aboutsummaryrefslogtreecommitdiff
path: root/client/menu/rating/rating.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/rating/rating.gd')
-rw-r--r--client/menu/rating/rating.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/menu/rating/rating.gd b/client/menu/rating/rating.gd
index ed3acf12..ced72191 100644
--- a/client/menu/rating/rating.gd
+++ b/client/menu/rating/rating.gd
@@ -23,10 +23,12 @@ const PARTICLE_AMOUNTS = [1, 6, 32, 128]
@onready var stars = $MarginContainer/PanelContainer/VBoxContainer/Stars.get_children()
@onready var star_timer = $StarTimer
@onready var particles = $Control/Particles
+@onready var close_button: Button = $MarginContainer/PanelContainer/VBoxContainer/HBoxContainer/Close
func _ready():
super()
show_rating(data[0], data[1])
+ close_button.disabled = true # Disable for short time period to prevent accidental button press
func _process(_delta):
particles.emission_rect_extents = get_viewport_rect().size * Vector2(0.5, 0.5)
@@ -54,3 +56,6 @@ func show_rating(stars_: int, points: int):
func _on_close_pressed():
exit()
+
+func _on_button_timer_timeout() -> void:
+ close_button.disabled = false