From d0ccffd7db79f5dbff6f2cb4f8b77a8bb3435e57 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Aug 2013 12:36:22 +0300 Subject: add autocomplete support for online list. --- src/gui/chatwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/chatwindow.cpp') diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index b33a14a0e..04c2a2d9a 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -43,6 +43,7 @@ #include "gui/sdlfont.h" #include "gui/sdlinput.h" #include "gui/viewport.h" +#include "gui/whoisonline.h" #include "gui/widgets/battletab.h" #include "gui/widgets/dropdown.h" @@ -1262,6 +1263,11 @@ void ChatWindow::autoComplete() } if (newName.empty()) newName = autoComplete(name, &mCustomWords); + if (newName.empty()) + { + whoIsOnline->getPlayerNames(nameList); + newName = autoComplete(nameList, name); + } if (!newName.empty()) { -- cgit v1.2.3-60-g2f50