diff options
author | Andrei Karas <akaras@inbox.ru> | 2009-10-31 15:42:28 +0200 |
---|---|---|
committer | Blue <bluesansdouze@gmail.com> | 2010-01-07 23:12:10 +0100 |
commit | be5460f2a294bb8e50b40f498f29a556b31bedd7 (patch) | |
tree | 5256167e0b8487fdb2c49090986cc883614fb9b1 /src/gui/widgets/textfield.cpp | |
parent | 84da747711ed1713984ca514a8bb786219a85d9b (diff) | |
download | mana-be5460f2a294bb8e50b40f498f29a556b31bedd7.tar.gz mana-be5460f2a294bb8e50b40f498f29a556b31bedd7.tar.bz2 mana-be5460f2a294bb8e50b40f498f29a556b31bedd7.tar.xz mana-be5460f2a294bb8e50b40f498f29a556b31bedd7.zip |
Chat auto completing
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index f19b4d82..0f0caa00 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -41,12 +41,14 @@ int TextField::instances = 0; float TextField::mAlpha = 1.0; ImageRect TextField::skin; -TextField::TextField(const std::string &text): +TextField::TextField(const std::string &text, bool loseFocusOnTab): gcn::TextField(text), mNumeric(false) { setFrameSize(2); + mLoseFocusOnTab = loseFocusOnTab; + if (instances == 0) { // Load the skin @@ -245,7 +247,9 @@ void TextField::keyPressed(gcn::KeyEvent &keyEvent) break; case Key::TAB: - return; + if (mLoseFocusOnTab) + return; + break; } keyEvent.consume(); |