aboutsummaryrefslogtreecommitdiff
path: root/client/menu/popup_message.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-15 15:00:50 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-15 15:00:50 +0200
commit55f1cd9cd968b77121f1536cee963048ffe0acb0 (patch)
tree66a9d5994f4bc842e8322f2f7468157349b490ed /client/menu/popup_message.gd
parent340aa47c4652fe2f0ec5b0e4f293cfff407a0e6c (diff)
parentd9ad661792297503fb0ea11f79ec153d8430f65b (diff)
downloadhurrycurry-55f1cd9cd968b77121f1536cee963048ffe0acb0.tar
hurrycurry-55f1cd9cd968b77121f1536cee963048ffe0acb0.tar.bz2
hurrycurry-55f1cd9cd968b77121f1536cee963048ffe0acb0.tar.zst
Merge branch 'master' of https://codeberg.org/hurrycurry/hurrycurry
Diffstat (limited to 'client/menu/popup_message.gd')
-rw-r--r--client/menu/popup_message.gd10
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")))