diff options
author | Florian Diebold <flodiebold@gmail.com> | 2012-11-24 16:15:44 +0100 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2012-11-24 16:15:44 +0100 |
commit | 729eb1357d24d1d55f5d8a5fc8e44b65a542e234 (patch) | |
tree | 9feaf188b92eadae51a86332bfa9193627239f0a /crawl-ref/source/message.cc | |
parent | 95747b995dc93e6a23a819bd357a10042c60cfc9 (diff) | |
download | crawl-ref-729eb1357d24d1d55f5d8a5fc8e44b65a542e234.tar.gz crawl-ref-729eb1357d24d1d55f5d8a5fc8e44b65a542e234.zip |
Webtiles: Do a complete update when the input mode changes.
Also, this refactors the more handling a bit, again.
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index c1f51d00d7..222bd59993 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -766,7 +766,7 @@ public: message_store buffer; #ifdef USE_TILE_WEB -bool _more = false; +bool _more = false, _last_more = false; void webtiles_send_messages() { @@ -777,8 +777,11 @@ void webtiles_send_last_messages(int n) tiles.json_open_object(); tiles.json_write_string("msg", "msgs"); tiles.json_treat_as_empty(); - if (_more) - tiles.json_write_bool("more", true); + if (_more != _last_more) + { + tiles.json_write_bool("more", _more); + _last_more = _more; + } buffer.send(n); tiles.json_close_object(true); tiles.finish_message(); @@ -1451,10 +1454,10 @@ static void readkey_more(bool user_forced) if (autoclear_more) return; int keypress; - mouse_control mc(MOUSE_MODE_MORE); #ifdef USE_TILE_WEB unwind_bool unwind_more(_more, true); #endif + mouse_control mc(MOUSE_MODE_MORE); do keypress = getch_ck(); |