summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorJan-Fabian Humann <malastare@gmx.net>2005-03-14 12:50:00 +0000
committerJan-Fabian Humann <malastare@gmx.net>2005-03-14 12:50:00 +0000
commit020ae4ba6537fdce87209f07ea21cc002aaa52ba (patch)
tree6d17dec981f0c2b2ef60a35652cb931d63c32022 /src/gui/chat.cpp
parentbb5886f5351a148b5443adaee0a64ca6e81ee0b9 (diff)
downloadmana-020ae4ba6537fdce87209f07ea21cc002aaa52ba.tar.gz
mana-020ae4ba6537fdce87209f07ea21cc002aaa52ba.tar.bz2
mana-020ae4ba6537fdce87209f07ea21cc002aaa52ba.tar.xz
mana-020ae4ba6537fdce87209f07ea21cc002aaa52ba.zip
Fixed handling of get item button and made chatWindow (de)focus on ENTER - You can now only use the get item button when chat window isn't focused
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 253fb3f4..45c87ee8 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -188,6 +188,8 @@ void ChatWindow::action(const std::string& eventId)
chat_send(char_info[0].name, message.c_str());
chatInput->setText("");
}
+ gui->focusNone();
+
}
}
@@ -197,6 +199,11 @@ void ChatWindow::requestFocus()
chatInput->requestFocus();
}
+bool ChatWindow::isFocused()
+{
+ return chatInput->hasFocus();
+}
+
char *ChatWindow::chat_send(std::string nick, std::string msg)
{
short packid = 0x008c;
@@ -339,4 +346,5 @@ std::string ChatWindow::cut_string(std::string& value, unsigned int maximumLengt
}
return std::string("");
-} \ No newline at end of file
+}
+