--- a/src/widget/widget_caption.cpp Sat Mar 10 04:52:01 2007 +0000
+++ b/src/widget/widget_caption.cpp Sat Mar 10 08:53:59 2007 +0000
@@ -29,7 +29,7 @@
bool make_close_box = ((m_feature_flags & FF_NO_CLOSE_BOX ) == FF_NONE);
bool make_sticky_box = ((m_feature_flags & FF_NO_STICKY_BOX) == FF_NONE);
- Rect16 rc_caption = GetRect();
+ Rect16 rc_caption = GetLocalRect();
/* add close box */
if (make_close_box) {
@@ -58,10 +58,10 @@
byte caption_color = w->caption_color;
assert(Height() == 14); // XXX - to ensure the same sizes are used everywhere!
- DrawFrameRect(Left(), Top(), Right(), Bottom(), m_color, FR_BORDERONLY);
- DrawFrameRect(Left() + 1, Top() + 1, Right() - 1, Bottom() - 1, m_color, (caption_color == 0xFF) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
+ DrawFrameRect(m_color, FR_BORDERONLY);
+ DrawFrameRect(1, 1, Width() - 2, Height() - 2, m_color, (caption_color == 0xFF) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
if (caption_color != 0xFF) {
- GfxFillRect(Left() + 2, Top() + 2, Right() - 2, Bottom() - 2, _colour_gradient[_player_colors[caption_color]][4]);
+ GfxFillRect(2, 2, Width() - 3, Height() - 3, _colour_gradient[_player_colors[caption_color]][4]);
}
}
@@ -71,7 +71,7 @@
assert(w != NULL);
DrawBackground(ev);
- DrawStringCenteredTruncated(Left() + 2, Right() - 2, Top() + 2, w->m_caption_text, 0x84);
+ DrawStringCenteredTruncated(2, Width() - 3, 2, w->m_caption_text, 0x84);
ev.SetHandled();
}