summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cio.cc
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2012-08-06 00:37:53 +0200
committerFlorian Diebold <flodiebold@gmail.com>2012-11-23 21:28:19 +0100
commit8b3793078f4f5ef16d60e10bf78b8d317a955080 (patch)
tree267d0888b6cf61c8b0614a9346291d450a1a4e60 /crawl-ref/source/cio.cc
parent4882cf5f39a471a223465d7f033b7f08938180b7 (diff)
downloadcrawl-ref-8b3793078f4f5ef16d60e10bf78b8d317a955080.tar.gz
crawl-ref-8b3793078f4f5ef16d60e10bf78b8d317a955080.zip
Webtiles: Do message scrolling etc. on the client side.
Previously, the message pane was rendered on the server side and its contents were sent to the client as they were displayed in the terminal. Now, messages are sent as separate objects. This also necessitates special handling of more prompts and line_reader for webtiles.
Diffstat (limited to 'crawl-ref/source/cio.cc')
-rw-r--r--crawl-ref/source/cio.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc
index 618a8a6a59..eb1a583925 100644
--- a/crawl-ref/source/cio.cc
+++ b/crawl-ref/source/cio.cc
@@ -287,6 +287,14 @@ int line_reader::read_line(bool clear_previous)
if (bufsz <= 0)
return false;
+#ifdef USE_TILE_WEB
+ tiles.redraw();
+ tiles.json_open_object();
+ tiles.json_write_string("msg", "get_line");
+ tiles.json_close_object();
+ tiles.finish_message();
+#endif
+
cursor_control con(true);
if (clear_previous)