diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-25 18:06:19 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-25 18:06:19 +0000 |
commit | 2c7d0b3518d72a7ab0726b72f7d2137e5944f049 (patch) | |
tree | 7080b1e32df54b8b44875df3609e94888939eb89 /src/gui/textfield.cpp | |
parent | 529ba0581833b05921d8dc3336b02a3c6abd511a (diff) | |
download | mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.gz mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.bz2 mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.xz mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.zip |
Made our drawImage() method respect the clip area from the guichan graphics part. Removed some (now) obsolete code. Fixed compilation errors.
Diffstat (limited to 'src/gui/textfield.cpp')
-rw-r--r-- | src/gui/textfield.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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*>(graphics)->drawImageRect(x, y, w, h, skin); + dynamic_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, skin); } |