summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-11-26 23:25:35 -0700
committerJared Adams <jaxad0127@gmail.com>2009-11-26 23:25:35 -0700
commit62d86f1c84678e04e7015a8f2440f0c251887c21 (patch)
tree5f79a8c7c733241dbfe0b325923629ddcd2026d1 /src/gui
parentedf478e1eb7987e35d56df2777fbeb389dc915ec (diff)
downloadmana-62d86f1c84678e04e7015a8f2440f0c251887c21.tar.gz
mana-62d86f1c84678e04e7015a8f2440f0c251887c21.tar.bz2
mana-62d86f1c84678e04e7015a8f2440f0c251887c21.tar.xz
mana-62d86f1c84678e04e7015a8f2440f0c251887c21.zip
Merge a little more and remove the BuddyWindow
The BuddyWindow was only half implemented and would have been made redundant with the planned social window.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buddywindow.cpp69
-rw-r--r--src/gui/buddywindow.h60
-rw-r--r--src/gui/popupmenu.cpp20
-rw-r--r--src/gui/windowmenu.cpp12
4 files changed, 1 insertions, 160 deletions
diff --git a/src/gui/buddywindow.cpp b/src/gui/buddywindow.cpp
deleted file mode 100644
index 06273b99..00000000
--- a/src/gui/buddywindow.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * The Mana World
- * Copyright (C) 2004 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * 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.
- *
- * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "gui/buddywindow.h"
-
-#include "gui/chat.h"
-
-#include "gui/widgets/avatar.h"
-#include "gui/widgets/icon.h"
-
-#include "resources/resourcemanager.h"
-#include "utils/gettext.h"
-
-extern ChatWindow *chatWindow;
-
-BuddyWindow::BuddyWindow():
- Window(_("Buddy"))
-{
- setWindowName("BuddyWindow");
- setCaption(_("Buddy List"));
- setResizable(true);
- setCloseButton(true);
- setSaveVisible(true);
- setMinWidth(110);
- setMinHeight(200);
- setDefaultSize(124, 41, 288, 330);
-
- Image *addImg = ResourceManager::getInstance()->getImage("buddyadd.png");
- Image *delImg = ResourceManager::getInstance()->getImage("buddydel.png");
-
- if (addImg && delImg)
- {
- Icon *addBuddy = new Icon(addImg);
- Icon *delBuddy = new Icon(delImg);
-
- add(addBuddy);
- add(delBuddy);
- }
-
- loadWindowState();
-}
-
-void BuddyWindow::action(const gcn::ActionEvent &event)
-{
-
-}
-
-void BuddyWindow::draw(gcn::Graphics *graphics)
-{
- Window::draw(graphics);
-}
diff --git a/src/gui/buddywindow.h b/src/gui/buddywindow.h
deleted file mode 100644
index 0057ac1d..00000000
--- a/src/gui/buddywindow.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * The Mana World
- * Copyright (C) 2004 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * 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.
- *
- * 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef BUDDYWINDOW_H
-#define BUDDYWINDOW_H
-
-#include "gui/widgets/window.h"
-
-#include <guichan/actionlistener.hpp>
-#include <guichan/actionevent.hpp>
-
-class Avatar;
-
-/**
- * Window showing buddy list.
- *
- * \ingroup Interface
- */
-class BuddyWindow : public Window, public gcn::ActionListener
-{
- public:
- /**
- * Constructor.
- */
- BuddyWindow();
-
- /**
- * Performs action.
- */
- void action(const gcn::ActionEvent &event);
-
- /**
- * Draws the window
- */
- void draw(gcn::Graphics *graphics);
-
-
- private:
- std::list<Avatar*> mBuddyList;
-};
-
-#endif // BUDDYWINDOW_H
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 54c0f334..9f3ecc7d 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -79,8 +79,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
{
case Being::PLAYER:
{
- // Players can be traded with. Later also follow and
- // add as buddy will be options in this menu.
+ // Players can be traded with.
mBrowserBox->addRow(strprintf("@@trade|%s@@",
strprintf(_("Trade with %s..."),
name.c_str()).c_str()));
@@ -125,14 +124,9 @@ void PopupMenu::showPopup(int x, int y, Being *being)
/*mBrowserBox->addRow(strprintf("@@follow|%s@@",
strprintf(_("Follow %s"),
name.c_str()).c_str()));*/
- /*mBrowserBox->addRow(strprintf("@@buddy|%s@@",
- strprintf(_("Add %s to Buddy List"),
- name.c_str()).c_str()));*/
-#ifdef MANASERV_SUPPORT
mBrowserBox->addRow(strprintf("@@guild|%s@@",
strprintf(_("Invite %s to join your guild"),
name.c_str()).c_str()));
-#endif
if (player_node->isInParty())
mBrowserBox->addRow(strprintf("@@party|%s@@",
strprintf(_("Invite %s to join your party"),
@@ -253,7 +247,6 @@ void PopupMenu::handleLink(const std::string &link)
{
player_relations.setRelation(being->getName(), PlayerRelation::FRIEND);
}
-#ifdef MANASERV_SUPPORT
// Guild action
else if (link == "guild" &&
being != NULL &&
@@ -261,23 +254,12 @@ void PopupMenu::handleLink(const std::string &link)
{
player_node->inviteToGuild(being);
}
-#endif
/*
// Follow Player action
else if (link == "follow")
{
}*/
- /*
- // Add Buddy action
- else if ((link == "buddy") && being && being->isPlayer())
- {
- if (!buddyWindow->isVisible())
- buddyWindow->setVisible(true);
-
- buddyWindow->addBuddy(being->getName());
- }*/
-
// Pick Up Floor Item action
else if ((link == "pickup") && mFloorItem)
{
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 4e0313b6..8c0043eb 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -43,10 +43,7 @@ extern Window *setupWindow;
extern Window *skillDialog;
extern Window *specialsWindow;
extern Window *statusWindow;
-#ifdef MANASERV_SUPPORT
-extern Window *buddyWindow;
extern Window *guildWindow;
-#endif
WindowMenu::WindowMenu():
mEmotePopup(0)
@@ -60,10 +57,7 @@ WindowMenu::WindowMenu():
N_("Inventory"),
N_("Skills"),
N_("Specials"),
-#ifdef MANASERV_SUPPORT
N_("Guilds"),
- N_("Buddies"),
-#endif
N_("Shortcut"),
N_("Setup"),
0
@@ -133,16 +127,10 @@ void WindowMenu::action(const gcn::ActionEvent &event)
{
window = specialsWindow;
}
-#ifdef MANASERV_SUPPORT
else if (event.getId() == "Guilds")
{
window = guildWindow;
}
- else if (event.getId() == "Buddies")
- {
- window = buddyWindow;
- }
-#endif
else if (event.getId() == "Shortcut")
{
window = itemShortcutWindow;