diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 20:56:08 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 21:02:48 -0800 |
commit | ce0b009e851f37ee522e7e0ef420a0e9fb0b246e (patch) | |
tree | 8c363c6cf37ebc36f2c615a666b00ebe3ce1b978 /crawl-ref/source/macro.h | |
parent | 55abf2cd3e897e7c06b860427a31484810b203dc (diff) | |
download | crawl-ref-ce0b009e851f37ee522e7e0ef420a0e9fb0b246e.tar.gz crawl-ref-ce0b009e851f37ee522e7e0ef420a0e9fb0b246e.zip |
New class pause_all_key_recorders
If declared on the stack, it will pause all key recorders as soon as
declared, then return them to their previous pausing state when it goes
out of scope.
Diffstat (limited to 'crawl-ref/source/macro.h')
-rw-r--r-- | crawl-ref/source/macro.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/macro.h b/crawl-ref/source/macro.h index f38cd9c20f..0e847a1b55 100644 --- a/crawl-ref/source/macro.h +++ b/crawl-ref/source/macro.h @@ -40,6 +40,15 @@ public: void clear(); }; +class pause_all_key_recorders { +public: + pause_all_key_recorders(); + ~pause_all_key_recorders(); + +private: + std::vector<bool> prev_pause_status; +}; + int getchm(int (*rgetch)() = NULL); // keymaps applied (ie for prompts) int getchm(KeymapContext context, int (*rgetch)() = NULL); |