summaryrefslogtreecommitdiff
path: root/src/gui/widgets/whispertab.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-16 10:10:50 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-16 10:10:50 -0600
commit736795a624ae5f04b11fa284cb8a4b14579c1766 (patch)
tree6c7c70926959ff23831002a06ea82c17cadc3188 /src/gui/widgets/whispertab.cpp
parente8dd52d8264cd0eec1f5d32c1f809a164e2d2f59 (diff)
downloadMana-736795a624ae5f04b11fa284cb8a4b14579c1766.tar.gz
Mana-736795a624ae5f04b11fa284cb8a4b14579c1766.tar.bz2
Mana-736795a624ae5f04b11fa284cb8a4b14579c1766.tar.xz
Mana-736795a624ae5f04b11fa284cb8a4b14579c1766.zip
Rehash CommandHandler a bit, it's now fully merged
Tabs can now interract with CommandHandler and define their own commands in a seemless way. Most channel-related commands have been moved into ChannelTab, the close command is now in the WhisperTab, and eAthena's party tab now shows all standard commands.
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-rw-r--r--src/gui/widgets/whispertab.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index d69a495c..975cac94 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -62,3 +62,30 @@ void WhisperTab::handleCommand(std::string msg)
else
ChatTab::handleCommand(msg);
}
+
+void WhisperTab::showHelp()
+{
+ chatLog(_("/close > Close the whisper tab"));
+}
+
+bool WhisperTab::handleCommand(std::string type, std::string args)
+{
+ if (type == "help")
+ {
+ if (args == "close")
+ {
+ chatLog(_("Command: /close"));
+ chatLog(_("This command closes the current whisper tab."));
+ }
+ else
+ return false;
+ }
+ else if (type == "close")
+ {
+ delete this;
+ }
+ else
+ return false;
+
+ return true;
+}