summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/game.gd9
-rw-r--r--client/menu/communicate/popup_message/popup_message.gd13
2 files changed, 8 insertions, 14 deletions
diff --git a/client/game.gd b/client/game.gd
index a34ff57e..fe1e9ba6 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -247,18 +247,15 @@ func handle_packet(p):
map.gi_bake()
await get_parent()._menu_open()
map.autobake = true
-
- if in_lobby: popup_message.lobby()
- else: popup_message.ingame()
+
+ in_lobby_updated.emit(in_lobby)
else:
map.autobake = false
await get_parent()._menu_exit()
-
+
lobby.visible = in_lobby
if lobby and join_state == JoinState.SPECTATING:
toggle_join()
-
- in_lobby_updated.emit(in_lobby)
"score":
if p.time_remaining != null:
overlay.update(p.demands_failed, p.demands_completed, p.points, p.time_remaining)
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()