summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-12-24 12:48:40 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-12-24 12:48:40 +0000
commitad916910b34d91db78c5eb6dc966745117bd0d6f (patch)
tree7cbc1f41d49a5715b723c325fdbf6f3aa7e5ebd9
parent657f2b37b3b0b349cc7094541c6ade7d3d8e329d (diff)
downloadmana-client-ad916910b34d91db78c5eb6dc966745117bd0d6f.tar.gz
mana-client-ad916910b34d91db78c5eb6dc966745117bd0d6f.tar.bz2
mana-client-ad916910b34d91db78c5eb6dc966745117bd0d6f.tar.xz
mana-client-ad916910b34d91db78c5eb6dc966745117bd0d6f.zip
Disabled non-functional item shortcut window.
-rw-r--r--ChangeLog3
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/Makefile.am6
-rw-r--r--src/game.cpp14
-rw-r--r--src/gui/itemcontainer.cpp12
-rw-r--r--src/gui/menuwindow.cpp12
-rw-r--r--src/main.cpp6
-rw-r--r--src/net/inventoryhandler.cpp4
8 files changed, 28 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index 12b8e518..ef67ee17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* README, data/help/changes.txt, data/help/header.txt, NEWS: Updated
release date.
+ * src/game.cpp, src/gui/menuwindow.cpp, src/gui/itemcontainer.cpp,
+ src/main.cpp, src/CMakeLists.txt, src/net/inventoryhandler.cpp,
+ src/Makefile.am: Disabled non-functional item shortcut window.
2007-12-23 Philipp Sehmisch <tmw@crushnet.org>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 396a1101..fd5b9d45 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -99,10 +99,6 @@ SET(SRCS
gui/inventorywindow.h
gui/itemcontainer.cpp
gui/itemcontainer.h
- gui/itemshortcutcontainer.cpp
- gui/itemshortcutcontainer.h
- gui/itemshortcutwindow.cpp
- gui/itemshortcutwindow.h
gui/item_amount.cpp
gui/item_amount.h
gui/linkhandler.h
@@ -294,8 +290,6 @@ SET(SRCS
inventory.h
item.cpp
item.h
- itemshortcut.cpp
- itemshortcut.h
joystick.cpp
joystick.h
keyboardconfig.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index f9e955c6..b2bfa32f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,10 +49,6 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
gui/inventorywindow.h \
gui/itemcontainer.cpp \
gui/itemcontainer.h \
- gui/itemshortcutcontainer.cpp \
- gui/itemshortcutcontainer.h \
- gui/itemshortcutwindow.cpp \
- gui/itemshortcutwindow.h \
gui/item_amount.cpp \
gui/item_amount.h \
gui/linkhandler.h \
@@ -246,8 +242,6 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
inventory.h \
item.cpp \
item.h \
- itemshortcut.cpp \
- itemshortcut.h \
joystick.cpp \
joystick.h \
keyboardconfig.cpp \
diff --git a/src/game.cpp b/src/game.cpp
index df355e66..de8a3ea2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -36,7 +36,7 @@
#include "engine.h"
#include "flooritemmanager.h"
#include "graphics.h"
-#include "itemshortcut.h"
+//#include "itemshortcut.h"
#include "joystick.h"
#include "keyboardconfig.h"
#include "localplayer.h"
@@ -54,7 +54,7 @@
#include "gui/gui.h"
#include "gui/help.h"
#include "gui/inventorywindow.h"
-#include "gui/itemshortcutwindow.h"
+//#include "gui/itemshortcutwindow.h"
#include "gui/menuwindow.h"
#include "gui/minimap.h"
#include "gui/ministatus.h"
@@ -118,7 +118,7 @@ TradeWindow *tradeWindow;
//BuddyWindow *buddyWindow;
HelpWindow *helpWindow;
DebugWindow *debugWindow;
-ItemShortcutWindow *itemShortcutWindow;
+//ItemShortcutWindow *itemShortcutWindow;
BeingManager *beingManager = NULL;
FloorItemManager *floorItemManager = NULL;
@@ -198,7 +198,7 @@ void createGuiWindows(Network *network)
//buddyWindow = new BuddyWindow();
helpWindow = new HelpWindow();
debugWindow = new DebugWindow();
- itemShortcutWindow = new ItemShortcutWindow();
+ //itemShortcutWindow = new ItemShortcutWindow();
// Initialize window positions
//chargeDialog->setPosition(
@@ -211,7 +211,7 @@ void createGuiWindows(Network *network)
chatWindow->setVisible(true);
miniStatusWindow->setVisible(true);
menuWindow->setVisible(true);
- itemShortcutWindow->setVisible(true);
+ //itemShortcutWindow->setVisible(true);
if (config.getValue("logToChat", 0))
{
@@ -244,7 +244,7 @@ void destroyGuiWindows()
//delete buddyWindow;
delete helpWindow;
delete debugWindow;
- delete itemShortcutWindow;
+ //delete itemShortcutWindow;
}
Game::Game(Network *network):
@@ -535,6 +535,7 @@ void Game::handleInput()
{
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
// Checks if any item shortcut is pressed.
+ /*
for (int i = KeyboardConfig::KEY_SHORTCUT_0;
i <= KeyboardConfig::KEY_SHORTCUT_9;
i++)
@@ -545,6 +546,7 @@ void Game::handleInput()
break;
}
}
+ */
switch (tKey) {
case KeyboardConfig::KEY_PICKUP:
{
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 0e203905..74d1abd1 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -30,7 +30,7 @@
#include "../graphics.h"
#include "../inventory.h"
#include "../item.h"
-#include "../itemshortcut.h"
+//#include "../itemshortcut.h"
#include "../log.h"
#include "../resources/image.h"
@@ -198,7 +198,7 @@ ItemContainer::mousePressed(gcn::MouseEvent &event)
int my = event.getY();
int index = mx / gridWidth + ((my / gridHeight) * columns) + 2;
- itemShortcut->setItemSelected(NULL);
+ //itemShortcut->setItemSelected(NULL);
// Fix for old server, it should be: if (index >= mMaxItems)
if (index > mMaxItems + 1)
{
@@ -207,9 +207,9 @@ ItemContainer::mousePressed(gcn::MouseEvent &event)
}
Item *item = mInventory->getItem(index);
setSelectedItem(item);
- if (!item->isEquipment())
- {
- itemShortcut->setItemSelected(item);
- }
+ //if (!item->isEquipment())
+ //{
+ // itemShortcut->setItemSelected(item);
+ //}
}
}
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index 2043b7d1..e4d101c8 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -35,7 +35,7 @@ extern Window *inventoryWindow;
extern Window *equipmentWindow;
extern Window *skillDialog;
extern Window *statusWindow;
-extern Window *itemShortcutWindow;
+//extern Window *itemShortcutWindow;
namespace {
struct MenuWindowListener : public gcn::ActionListener
@@ -62,7 +62,7 @@ MenuWindow::MenuWindow():
"Equipment",
"Inventory",
"Skills",
- "Shortcut",
+// "Shortcut",
"Setup",
0
};
@@ -107,10 +107,10 @@ void MenuWindowListener::action(const gcn::ActionEvent &event)
{
window = skillDialog;
}
- else if (event.getId() == "Shortcut")
- {
- window = itemShortcutWindow;
- }
+ //else if (event.getId() == "Shortcut")
+ //{
+ // window = itemShortcutWindow;
+ //}
else if (event.getId() == "Setup")
{
window = setupWindow;
diff --git a/src/main.cpp b/src/main.cpp
index 51d51243..4b6cfd3f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,7 +48,7 @@
#include "keyboardconfig.h"
#include "game.h"
#include "graphics.h"
-#include "itemshortcut.h"
+//#include "itemshortcut.h"
#include "lockedarray.h"
#include "localplayer.h"
#include "log.h"
@@ -308,7 +308,7 @@ void init_engine(const Options &options)
graphics->_beginDraw();
// Initialize the item shortcuts.
- itemShortcut = new ItemShortcut();
+ //itemShortcut = new ItemShortcut();
gui = new Gui(graphics);
state = UPDATE_STATE; /**< Initial game state */
@@ -337,7 +337,7 @@ void init_engine(const Options &options)
void exit_engine()
{
// Before config.write() since it writes the shortcuts to the config
- delete itemShortcut;
+ //delete itemShortcut;
config.write();
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp
index 7ed7e38d..9e18f23c 100644
--- a/src/net/inventoryhandler.cpp
+++ b/src/net/inventoryhandler.cpp
@@ -30,7 +30,7 @@
#include "../resources/iteminfo.h"
#include "../item.h"
-#include "../itemshortcut.h"
+//#include "../itemshortcut.h"
#include "../localplayer.h"
#include "../gui/chat.h"
@@ -80,7 +80,7 @@ void InventoryHandler::handleMessage(MessageIn *msg)
player_node->getInvItem(index)->setEquipment(true);
}
}
- itemShortcut->load();
+ //itemShortcut->load();
break;
case SMSG_PLAYER_INVENTORY_ADD: