summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index e3185c67..38b9e730 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -211,6 +211,11 @@ function packet(p: PacketC) {
global_message_clear = setTimeout(() => global_message = undefined, 4000)
console.warn(p.message)
break;
+ case "server_message":
+ if (global_message_clear) clearTimeout(global_message_clear)
+ global_message = { inner: { text: p.text }, anim_size: 0., anim_position: { x: 0, y: 0 } }
+ global_message_clear = setTimeout(() => global_message = undefined, 4000)
+ break;
case "set_ingame":
console.log(`ingame ${p.state}`);
break;