summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilefont.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-17 05:15:52 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-17 05:15:52 +0000
commit72a1b48efaa33990165f6efe8b04c9b0c72f2823 (patch)
treea16a3ff391d85b8ff20a10656e8d34ccabc152eb /crawl-ref/source/tilefont.cc
parent4ac93cd2bf30ae6d44d8cc8b8c9e122da57e9aec (diff)
downloadcrawl-ref-72a1b48efaa33990165f6efe8b04c9b0c72f2823.tar.gz
crawl-ref-72a1b48efaa33990165f6efe8b04c9b0c72f2823.zip
Adding immediate mouseover text to inventory regions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6941 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilefont.cc')
-rw-r--r--crawl-ref/source/tilefont.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/tilefont.cc b/crawl-ref/source/tilefont.cc
index 94cbaf8e2f..720ac7b310 100644
--- a/crawl-ref/source/tilefont.cc
+++ b/crawl-ref/source/tilefont.cc
@@ -496,18 +496,18 @@ void FTFont::render_string(unsigned int px, unsigned int py,
// box with extra buffer to test against min_pos/max_pos window size
int sx = tx - buffer;
int sy = ty - buffer;
- int ex = sx + wx + buffer;
- int ey = sy + wy + buffer;
+ int ex = tx + wx + buffer;
+ int ey = ty + wy + buffer;
if (ex > max_pos.x)
tx += max_pos.x - ex;
else if (sx < min_pos.x)
- tx -= sx;
+ tx -= sx - min_pos.x;
if (ey > max_pos.y)
ty += max_pos.y - ey;
else if (sy < min_pos.y)
- ty -= sy;
+ ty -= sy - min_pos.y;
if (box_alpha != 0)
_draw_box(tx, ty, wx, wy, outline, box_colour, box_alpha);