diff options
Diffstat (limited to 'client/menu/popup_message.gd')
-rw-r--r-- | client/menu/popup_message.gd | 10 |
1 files changed, 10 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"))) |