summaryrefslogtreecommitdiff
path: root/src/gui/passwordfield.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/passwordfield.cpp
parent529ba0581833b05921d8dc3336b02a3c6abd511a (diff)
downloadMana-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/passwordfield.cpp')
-rw-r--r--src/gui/passwordfield.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/passwordfield.cpp b/src/gui/passwordfield.cpp
index 29ddb86b..51316fa8 100644
--- a/src/gui/passwordfield.cpp
+++ b/src/gui/passwordfield.cpp
@@ -31,14 +31,10 @@ PasswordField::PasswordField(const std::string& text):
void PasswordField::draw(gcn::Graphics *graphics)
{
- int x, y, w, h;
- getAbsolutePosition(x, y);
- w = getWidth();
- h = getHeight();
std::string stars;
stars.assign(mText.length(), '*');
- if (hasFocus()) {
+ if (hasFocus()) {
drawCaret(graphics,
getFont()->getWidth(stars.substr(0, mCaretPosition)) -
mXScroll);
@@ -46,5 +42,5 @@ void PasswordField::draw(gcn::Graphics *graphics)
graphics->setColor(getForegroundColor());
graphics->setFont(getFont());
- graphics->drawText(stars, 1 - mXScroll, 1);
+ graphics->drawText(stars, 1 - mXScroll, 1);
}