diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 11:38:34 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 11:38:34 +0000 |
commit | 6bda7067bc268b6104b4f55940049b2db25b96fa (patch) | |
tree | 1bc59eb4c3ea2a2644aeb3a95d3a0322ee7b96cb /crawl-ref/source/libutil.h | |
parent | ddfbd2a60be7ce857997097f6bc03eac22f55be1 (diff) | |
download | crawl-ref-6bda7067bc268b6104b4f55940049b2db25b96fa.tar.gz crawl-ref-6bda7067bc268b6104b4f55940049b2db25b96fa.zip |
Restore old cursor behaviour on Windows, with little icky hooks to make it controllable for the newgame slider menu.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@459 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r-- | crawl-ref/source/libutil.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h index d05ef53bd4..2da46f421b 100644 --- a/crawl-ref/source/libutil.h +++ b/crawl-ref/source/libutil.h @@ -13,6 +13,7 @@ #ifndef LIBUTIL_H #define LIBUTIL_H +#include "AppHdr.h" #include "defines.h" #include <string> #include <vector> @@ -127,14 +128,19 @@ enum KEYS class cursor_control { public: - cursor_control(bool cs) : cstate(cs) { + cursor_control(bool cs) + : cstate(cs), smartcstate( is_smart_cursor_enabled() ) + { + enable_smart_cursor(false); _setcursortype(cs? _NORMALCURSOR : _NOCURSOR); } ~cursor_control() { _setcursortype(cstate? _NOCURSOR : _NORMALCURSOR); + enable_smart_cursor(smartcstate); } private: bool cstate; + bool smartcstate; }; // Reads lines of text; used internally by cancelable_get_line. |