summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/Makefile.am10
-rw-r--r--src/game.cpp20
-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
7 files changed, 9 insertions, 192 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4b0d75a5..afbb4555 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -153,6 +153,10 @@ SET(SRCS
gui/focushandler.h
gui/gui.cpp
gui/gui.h
+ gui/guildlistbox.cpp
+ gui/guildlistbox.h
+ gui/guildwindow.cpp
+ gui/guildwindow.h
gui/help.cpp
gui/help.h
gui/inventorywindow.cpp
@@ -492,12 +496,6 @@ SET(SRCS_EA
)
SET(SRCS_MANA
- gui/buddywindow.cpp
- gui/buddywindow.h
- gui/guildlistbox.cpp
- gui/guildlistbox.h
- gui/guildwindow.cpp
- gui/guildwindow.h
net/manaserv/adminhandler.cpp
net/manaserv/adminhandler.h
net/manaserv/beinghandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 9bbcbc29..cb54815e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -99,6 +99,10 @@ mana_SOURCES = gui/widgets/avatar.cpp \
gui/focushandler.h \
gui/gui.cpp \
gui/gui.h \
+ gui/guildlistbox.cpp \
+ gui/guildlistbox.h \
+ gui/guildwindow.cpp \
+ gui/guildwindow.h \
gui/help.cpp \
gui/help.h \
gui/inventorywindow.cpp \
@@ -391,12 +395,6 @@ mana_SOURCES = gui/widgets/avatar.cpp \
if SERVER_MANASERV
mana_CXXFLAGS += -DMANASERV_SUPPORT
mana_SOURCES += \
- gui/buddywindow.cpp \
- gui/buddywindow.h \
- gui/guildlistbox.cpp \
- gui/guildlistbox.h \
- gui/guildwindow.cpp \
- gui/guildwindow.h \
net/manaserv/adminhandler.cpp \
net/manaserv/adminhandler.h \
net/manaserv/beinghandler.cpp \
diff --git a/src/game.cpp b/src/game.cpp
index 33833772..49c0b34c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -68,10 +68,7 @@
#include "gui/viewport.h"
#include "gui/windowmenu.h"
#include "gui/partywindow.h"
-#ifdef MANASERV_SUPPORT
-#include "gui/buddywindow.h"
#include "gui/guildwindow.h"
-#endif
#include "gui/npcpostdialog.h"
#include "gui/quitdialog.h"
#include "gui/specialswindow.h"
@@ -110,16 +107,11 @@ StatusWindow *statusWindow;
MiniStatusWindow *miniStatusWindow;
BuyDialog *buyDialog;
SellDialog *sellDialog;
-#ifdef EATHENA_SUPPORT
BuySellDialog *buySellDialog;
-#endif
InventoryWindow *inventoryWindow;
SkillDialog *skillDialog;
PartyWindow *partyWindow;
-#ifdef MANASERV_SUPPORT
-BuddyWindow *buddyWindow;
GuildWindow *guildWindow;
-#endif
NpcDialog *npcDialog;
NpcPostDialog *npcPostDialog;
StorageWindow *storageWindow;
@@ -236,12 +228,8 @@ static void createGuiWindows()
sellDialog = new SellDialog;
tradeWindow = new TradeWindow;
partyWindow = new PartyWindow;
-#ifdef MANASERV_SUPPORT
- buddyWindow = new BuddyWindow;
guildWindow = new GuildWindow;
-#else
buySellDialog = new BuySellDialog;
-#endif
equipmentWindow = new EquipmentWindow(player_node->mEquipment.get());
npcDialog = new NpcDialog;
npcPostDialog = new NpcPostDialog;
@@ -285,17 +273,12 @@ static void destroyGuiWindows()
del_0(miniStatusWindow);
del_0(buyDialog);
del_0(sellDialog);
-#ifdef EATHENA_SUPPORT
del_0(buySellDialog);
-#endif
del_0(inventoryWindow);
del_0(partyWindow);
del_0(npcDialog);
del_0(npcPostDialog);
-#ifdef MANASERV_SUPPORT
- del_0(buddyWindow);
del_0(guildWindow);
-#endif
del_0(skillDialog);
del_0(minimap);
del_0(equipmentWindow);
@@ -823,10 +806,7 @@ void Game::handleInput()
equipmentWindow->setVisible(false);
helpWindow->setVisible(false);
debugWindow->setVisible(false);
-#ifdef MANASERV_SUPPORT
guildWindow->setVisible(false);
- buddyWindow->setVisible(false);
-#endif
}
break;
case KeyboardConfig::KEY_WINDOW_STATUS:
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;