diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-14 16:45:13 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-14 16:45:13 +0000 |
commit | d1395845cdc678db2a71326f2e6f20253ed14cac (patch) | |
tree | 9a75fe0591fc7bd74f828aa048aa027f59a4ae66 /src/gui/chat.cpp | |
parent | 6c3a2550813c14290307f2ad91e1d76eea3e6a02 (diff) | |
download | mana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.gz mana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.bz2 mana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.xz mana-d1395845cdc678db2a71326f2e6f20253ed14cac.zip |
Merged 0.0 changes from revision 2988 to 3035 to trunk.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 3dc252ab..d992c6dd 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -53,7 +53,7 @@ ChatWindow::ChatWindow(): loadWindowState(); mChatInput = new ChatInput(); - mChatInput->setEventId("chatinput"); + mChatInput->setActionEventId("chatinput"); mChatInput->addActionListener(this); mTextOutput = new BrowserBox(BrowserBox::AUTO_WRAP); @@ -180,9 +180,9 @@ ChatWindow::chatLog(CHATSKILL act) } void -ChatWindow::action(const std::string &eventId, gcn::Widget *widget) +ChatWindow::action(const gcn::ActionEvent &event) { - if (eventId == "chatinput") + if (event.getId() == "chatinput") { std::string message = mChatInput->getText(); @@ -360,9 +360,10 @@ ChatWindow::const_msg(CHATSKILL act) } void -ChatWindow::keyPress(const gcn::Key &key) +ChatWindow::keyPressed(gcn::KeyEvent &event) { - if (key.getValue() == key.DOWN && mCurHist != mHistory.end()) + if (event.getKey().getValue() == gcn::Key::DOWN && + mCurHist != mHistory.end()) { // Move forward through the history HistoryIterator prevHist = mCurHist++; @@ -374,8 +375,8 @@ ChatWindow::keyPress(const gcn::Key &key) mCurHist = prevHist; } } - else if (key.getValue() == key.UP && mCurHist != mHistory.begin() && - mHistory.size() > 0) + else if (event.getKey().getValue() == gcn::Key::UP && + mCurHist != mHistory.begin() && mHistory.size() > 0) { // Move backward through the history mCurHist--; |