aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/menu/rating/rating.gd5
-rw-r--r--client/menu/rating/rating.tscn5
2 files changed, 10 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
diff --git a/client/menu/rating/rating.tscn b/client/menu/rating/rating.tscn
index 780cf261..4b4b7a5f 100644
--- a/client/menu/rating/rating.tscn
+++ b/client/menu/rating/rating.tscn
@@ -126,6 +126,10 @@ text = "c.menu.accept"
wait_time = 0.5
one_shot = true
+[node name="ButtonTimer" type="Timer" parent="."]
+one_shot = true
+autostart = true
+
[node name="Control" type="Control" parent="."]
layout_mode = 1
anchors_preset = 8
@@ -155,3 +159,4 @@ scale_amount_curve = SubResource("Curve_dqga7")
color_ramp = SubResource("Gradient_majwe")
[connection signal="pressed" from="MarginContainer/PanelContainer/VBoxContainer/HBoxContainer/Close" to="." method="_on_close_pressed"]
+[connection signal="timeout" from="ButtonTimer" to="." method="_on_button_timer_timeout"]