summaryrefslogtreecommitdiff
path: root/src/gui/menuwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/menuwindow.cpp')
-rw-r--r--src/gui/menuwindow.cpp42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index 9415188e..25ece461 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -1,44 +1,47 @@
/*
* The Mana World
- * Copyright 2004 The Mana World Development Team
+ * Copyright (C) 2004 The Mana World Development Team
*
* This file is part of The Mana World.
*
- * The Mana World is free software; you can redistribute it and/or modify
+ * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
- * The Mana World is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "menuwindow.h"
-
#include <string>
#include <guichan/actionlistener.hpp>
#include "button.h"
+#include "menuwindow.h"
#include "windowcontainer.h"
#include "../utils/gettext.h"
-extern Window *setupWindow;
-extern Window *inventoryWindow;
+extern Window *chatWindow;
extern Window *equipmentWindow;
+extern Window *inventoryWindow;
+extern Window *itemShortcutWindow;
+extern Window *emoteWindow;
+extern Window *setupWindow;
extern Window *skillDialog;
-extern Window *magicDialog;
extern Window *statusWindow;
-extern Window *guildWindow;
-extern Window *itemShortcutWindow;
+#ifdef TMWSERV_SUPPORT
extern Window *buddyWindow;
+extern Window *guildWindow;
+extern Window *magicDialog;
+#endif
namespace {
struct MenuWindowListener : public gcn::ActionListener
@@ -54,20 +57,25 @@ MenuWindow::MenuWindow():
Window()
{
setResizable(false);
+ setWindowName("Menu");
setMovable(false);
setTitleBarHeight(0);
// Buttons
static const char *buttonNames[] =
{
+ N_("Chat"),
N_("Status"),
N_("Equipment"),
N_("Inventory"),
N_("Skills"),
+#ifdef TMWSERV_SUPPORT
N_("Magic"),
N_("Guilds"),
N_("Buddys"),
+#endif
N_("Shortcut"),
+ N_("Emote"),
N_("Setup"),
0
};
@@ -96,7 +104,11 @@ void MenuWindowListener::action(const gcn::ActionEvent &event)
{
Window *window = NULL;
- if (event.getId() == "Status")
+ if (event.getId() == "Chat")
+ {
+ window = chatWindow;
+ }
+ else if (event.getId() == "Status")
{
window = statusWindow;
}
@@ -112,6 +124,7 @@ void MenuWindowListener::action(const gcn::ActionEvent &event)
{
window = skillDialog;
}
+#ifdef TMWSERV_SUPPORT
else if (event.getId() == "Magic")
{
window = magicDialog;
@@ -124,10 +137,15 @@ void MenuWindowListener::action(const gcn::ActionEvent &event)
{
window = buddyWindow;
}
+#endif
else if (event.getId() == "Shortcut")
{
window = itemShortcutWindow;
}
+ else if (event.getId() == "Emote")
+ {
+ window = emoteWindow;
+ }
else if (event.getId() == "Setup")
{
window = setupWindow;