aboutsummaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-28 20:38:56 +0200
committertpart <tpart120@proton.me>2024-09-28 20:38:56 +0200
commit5cd87fc5d570d584019a6d6dd8dc25b6e5f274a0 (patch)
treee581a7a973813ea93e230438a9718e4e675c5c5a /client/menu
parent40f4dddf5b8dcdc53996d981bf01d124584038df (diff)
downloadhurrycurry-5cd87fc5d570d584019a6d6dd8dc25b6e5f274a0.tar
hurrycurry-5cd87fc5d570d584019a6d6dd8dc25b6e5f274a0.tar.bz2
hurrycurry-5cd87fc5d570d584019a6d6dd8dc25b6e5f274a0.tar.zst
Refactor in_lobby code in popup message
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/communicate/popup_message/popup_message.gd13
1 files changed, 5 insertions, 8 deletions
diff --git a/client/menu/communicate/popup_message/popup_message.gd b/client/menu/communicate/popup_message/popup_message.gd
index 7a4dce4b..98bd94e3 100644
--- a/client/menu/communicate/popup_message/popup_message.gd
+++ b/client/menu/communicate/popup_message/popup_message.gd
@@ -50,6 +50,11 @@ func _ready():
else:
update_state()
)
+ game.in_lobby_updated.connect(
+ func a(in_lobby):
+ is_ingame = not in_lobby
+ update_state()
+ )
func _process(_delta: float):
for pos: Vector2 in positional_messages.keys():
@@ -66,14 +71,6 @@ func _process(_delta: float):
msg.last_size = msg.node.size
msg.node.position = -0.5 * msg.last_size
-func ingame():
- is_ingame = true
- update_state()
-
-func lobby():
- is_ingame = false
- update_state()
-
func update_state():
if is_ingame and is_joined:
start_game_hints()