diff options
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 1c63d1c9..0ae042df 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -19,38 +19,28 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <guichan/widgets/label.hpp> - #include "whispertab.h" -#include "../../beingmanager.h" -#include "../../commandhandler.h" -#include "../../channel.h" -#include "../../configuration.h" -#include "../../game.h" -#include "../../localplayer.h" +#include "localplayer.h" + +#include "gui/palette.h" #ifdef TMWSERV_SUPPORT -#include "../../net/tmwserv/chatserver/chatserver.h" -#include "../../net/tmwserv/gameserver/player.h" +#include "net/tmwserv/chatserver/chatserver.h" #else -#include "../../party.h" -#include "../../net/messageout.h" -#include "../../net/ea/protocol.h" +#include "party.h" +#include "net/messageout.h" +#include "net/ea/protocol.h" #endif -#include "../../resources/iteminfo.h" -#include "../../resources/itemdb.h" - -#include "../../utils/dtor.h" -#include "../../utils/gettext.h" -#include "../../utils/strprintf.h" -#include "../../utils/stringutils.h" +#include "utils/gettext.h" +#include "utils/strprintf.h" WhisperTab::WhisperTab(const std::string &nick) : ChatTab(nick), mNick(nick) { + setForegroundColor(guiPalette->getColor(Palette::WHISPER)); } WhisperTab::~WhisperTab() @@ -58,7 +48,7 @@ WhisperTab::~WhisperTab() chatWindow->removeWhisper(mNick); } -void WhisperTab::sendChat(const std::string &msg) { +void WhisperTab::handleInput(const std::string &msg) { if (msg.length() == 0) { chatLog(_("Cannot send empty chat!"), BY_SERVER, false); return; @@ -78,7 +68,7 @@ void WhisperTab::sendChat(const std::string &msg) { msg.c_str()), BY_PLAYER, false); } -void WhisperTab::handleCommand(const std::string msg) +void WhisperTab::handleCommand(std::string msg) { if (msg == "close") delete this; |