From 2c7d0b3518d72a7ab0726b72f7d2137e5944f049 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Thu, 25 Aug 2005 18:06:19 +0000 Subject: Made our drawImage() method respect the clip area from the guichan graphics part. Removed some (now) obsolete code. Fixed compilation errors. --- src/gui/textfield.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/gui/textfield.cpp') diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp index 94ab856e..5055c328 100644 --- a/src/gui/textfield.cpp +++ b/src/gui/textfield.cpp @@ -80,11 +80,6 @@ TextField::~TextField() void TextField::draw(gcn::Graphics *graphics) { - int x, y, w, h; - getAbsolutePosition(x, y); - w = getWidth(); - h = getHeight(); - if (hasFocus()) { drawCaret(graphics, getFont()->getWidth(mText.substr(0, mCaretPosition)) - @@ -98,13 +93,10 @@ void TextField::draw(gcn::Graphics *graphics) void TextField::drawBorder(gcn::Graphics *graphics) { - int x, y, w, h, bs; - getAbsolutePosition(x, y); + int w, h, bs; bs = getBorderSize(); w = getWidth() + bs * 2; h = getHeight() + bs * 2; - x -= bs; - y -= bs; - dynamic_cast(graphics)->drawImageRect(x, y, w, h, skin); + dynamic_cast(graphics)->drawImageRect(0, 0, w, h, skin); } -- cgit v1.2.3-70-g09d2