From e10e6c7f8860536986b455b58b907026996b28fa Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 12 Feb 2014 12:14:01 +0300 Subject: add autocomplete special commands in party tab. --- src/gui/widgets/tabs/chattab.h | 3 +++ src/gui/windows/chatwindow.cpp | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'src/gui') diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h index 9790c33e4..404d59b91 100644 --- a/src/gui/widgets/tabs/chattab.h +++ b/src/gui/widgets/tabs/chattab.h @@ -195,6 +195,9 @@ class ChatTab : public Tab virtual void getAutoCompleteList(StringVect&) const {} + virtual void getAutoCompleteCommands(StringVect&) const + {} + void addRow(std::string &line); BrowserBox *mTextOutput; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 5b0bb69b6..61817053a 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1337,6 +1337,12 @@ void ChatWindow::autoComplete() if (!newName.empty() && !startName) secureChatCommand(newName); + if (cTab && newName.empty()) + { + cTab->getAutoCompleteCommands(nameList); + newName = autoComplete(nameList, name); + } + if (newName.empty() && actorManager) { actorManager->getPlayerNames(nameList, true); -- cgit v1.2.3-70-g09d2