summaryrefslogtreecommitdiff
path: root/src/gui/textfield.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-25 18:06:19 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-25 18:06:19 +0000
commit2c7d0b3518d72a7ab0726b72f7d2137e5944f049 (patch)
tree7080b1e32df54b8b44875df3609e94888939eb89 /src/gui/textfield.cpp
parent529ba0581833b05921d8dc3336b02a3c6abd511a (diff)
downloadmana-client-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.gz
mana-client-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.bz2
mana-client-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.xz
mana-client-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.cpp12
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);
}