diff options
Diffstat (limited to 'client/menu')
| -rw-r--r-- | client/menu/popup_message.gd | 10 | ||||
| -rw-r--r-- | client/menu/popup_message.tscn | 5 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd index 2d707289..82a16a9e 100644 --- a/client/menu/popup_message.gd +++ b/client/menu/popup_message.gd @@ -31,6 +31,7 @@ var is_joined := false  @onready var auto_hint_timers: Node = $AutoHintTimers  @onready var reset_timer = $Reset +@onready var join_while_running_timer = $JoinWhileRunning  @onready var game: Game = $"../Game" @@ -57,6 +58,9 @@ func lobby():  func update_state():  	if is_ingame and is_joined:  		start_game_hints() +	elif is_ingame: +		stop_game_hints() +		join_while_running_timer.start()  	else:  		stop_game_hints() @@ -85,6 +89,7 @@ func stop_game_hints():  	for c: Timer in auto_hint_timers.get_children():  		c.stop()  	reset_timer.stop() +	join_while_running_timer.stop()  func _input(_event):  	if Input.is_action_just_pressed("boost"): @@ -144,3 +149,8 @@ func _on_nametags_timeout():  	if not Global.get_hint("has_seen_nametags") and not Global.get_setting("usernames"):  		Global.set_hint("has_seen_nametags", true)  		display_hint_msg(tr("Username tags can be enabled/disabled in the settings")) + +func _on_join_while_running_timeout(): +	if not game.is_joined and not Global.get_hint("has_seen_join_while_running"): +		Global.set_hint("has_seen_join_while_running", true) +		display_hint_msg(tr("Press %s and click \"Join\" to join the game while it is running") % display_keybind(tr("ESCAPE"), tr("Menu button"))) diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn index b83d15a0..8a91f7c8 100644 --- a/client/menu/popup_message.tscn +++ b/client/menu/popup_message.tscn @@ -138,6 +138,10 @@ one_shot = true  wait_time = 10.0  one_shot = true +[node name="JoinWhileRunning" type="Timer" parent="."] +wait_time = 5.0 +one_shot = true +  [connection signal="timeout" from="ServerTimer" to="." method="_on_server_timer_timeout"]  [connection signal="timeout" from="HintTimer" to="." method="_on_hint_timer_timeout"]  [connection signal="timeout" from="AutoHintTimers/Move" to="." method="_on_move_timeout"] @@ -147,3 +151,4 @@ one_shot = true  [connection signal="timeout" from="AutoHintTimers/Zoom" to="." method="_on_zoom_timeout"]  [connection signal="timeout" from="AutoHintTimers/Nametags" to="." method="_on_nametags_timeout"]  [connection signal="timeout" from="Reset" to="." method="_on_reset_timeout"] +[connection signal="timeout" from="JoinWhileRunning" to="." method="_on_join_while_running_timeout"] | 
