summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authorEnne Walker <ennewalker@users.sourceforge.net>2010-01-03 16:56:13 -0500
committerEnne Walker <ennewalker@users.sourceforge.net>2010-01-03 16:59:23 -0500
commit4294ce7ebf7350f3d26dbe5350337aa9378d6797 (patch)
tree9937ace8f22f988356a970188a2c044f7e5f2d9d /crawl-ref/source/libutil.cc
parent49840080f1506e463f49fe21f380c4810a3b4ad1 (diff)
downloadcrawl-ref-4294ce7ebf7350f3d26dbe5350337aa9378d6797.tar.gz
crawl-ref-4294ce7ebf7350f3d26dbe5350337aa9378d6797.zip
[212] Fixing prompts clearing screen in tiles.
The line reader was always switching back to GOTO_CRT. When receiving input from the message window, this ended up causing the screen to blank and switch to the CRT layer. Adding a function get the current cursor region allows the line reader to not change regions.
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index b2a0fdfe1e..6823a4c932 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -683,8 +683,12 @@ void usleep(unsigned long time)
#endif
#ifndef USE_TILE
+static GotoRegion _current_region = GOTO_CRT;
+
void cgotoxy(int x, int y, GotoRegion region)
{
+ _current_region = region;
+
ASSERT(x >= 1);
ASSERT(y >= 1);
switch (region)
@@ -710,6 +714,11 @@ void cgotoxy(int x, int y, GotoRegion region)
break;
}
}
+
+GotoRegion get_cursor_region()
+{
+ return (_current_region);
+}
#endif
///////////////////////////////////////////////////////////////////////
// Pattern matching