diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/chat.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 34e7b04b..71954601 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -23,12 +23,12 @@ #include <fstream> #include <guichan/focushandler.hpp> -#include <guichan/key.hpp> #include "browserbox.h" #include "chat.h" #include "chatinput.h" #include "scrollarea.h" +#include "sdlinput.h" #include "windowcontainer.h" #include "../beingmanager.h" @@ -584,8 +584,10 @@ void ChatWindow::scroll(int amount) void ChatWindow::keyPressed(gcn::KeyEvent & event) { - if (event.getKey().getValue() == gcn::Key::DOWN && - mCurHist != mHistory.end()) { + + if (event.getKey().getValue() == Key::DOWN && + mCurHist != mHistory.end()) + { // Move forward through the history HistoryIterator prevHist = mCurHist++; if (mCurHist != mHistory.end()) { @@ -594,8 +596,10 @@ void ChatWindow::keyPressed(gcn::KeyEvent & event) } else { mCurHist = prevHist; } - } else if (event.getKey().getValue() == gcn::Key::UP && - mCurHist != mHistory.begin() && mHistory.size() > 0) { + } + else if (event.getKey().getValue() == Key::UP && + mCurHist != mHistory.begin() && mHistory.size() > 0) + { // Move backward through the history mCurHist--; mChatInput->setText(*mCurHist); |