--- a/src/widget/widget_base.cpp Sat Mar 10 04:52:01 2007 +0000
+++ b/src/widget/widget_base.cpp Sat Mar 10 08:53:59 2007 +0000
@@ -74,6 +74,11 @@
return m_rect;
}
+Rect16 Widget::GetLocalRect() const
+{
+ return Rect16(Point16(0, 0), BottomRight() - TopLeft());
+}
+
void Widget::SetLeft(int16 val)
{
m_rect.SetRight(Right() + val - Left());
@@ -212,13 +217,12 @@
void Widget::DrawFrameRect(int ctab, FrameFlags flags)
{
- DrawFrameRect(Left(), Top(), Right(), Bottom(), ctab, flags);
+ DrawFrameRect(0, 0, Width() - 1, Height() - 1, ctab, flags);
}
void Widget::DrawSprite(SpriteID img, SpriteID pal, const Point16 &local_pos)
{
- Point16 window_space_pos = TopLeft() + local_pos;
- ::DrawSprite(img, pal, window_space_pos.x, window_space_pos.y);
+ ::DrawSprite(img, pal, local_pos.x, local_pos.y);
}