diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-09 14:49:07 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-09 14:49:07 +0000 |
commit | cd68076f45b1ae6332b5298f57240aa4b0ebf357 (patch) | |
tree | 1736ba4bf56cf5d9ac32a50a036b996954d651ee /src/gui | |
parent | aca696b5c784bfbb426c50ac58e93e3d61944b39 (diff) | |
download | mana-cd68076f45b1ae6332b5298f57240aa4b0ebf357.tar.gz mana-cd68076f45b1ae6332b5298f57240aa4b0ebf357.tar.bz2 mana-cd68076f45b1ae6332b5298f57240aa4b0ebf357.tar.xz mana-cd68076f45b1ae6332b5298f57240aa4b0ebf357.zip |
Re-enabled non-functional item shortcut window, planned to be fixed for 0.0.25
(reverted change 3811). Somehow seems it's not drawing anything, not sure why.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemcontainer.cpp | 12 | ||||
-rw-r--r-- | src/gui/menuwindow.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index c73d25f3..ad0674f4 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -29,7 +29,7 @@ #include "../graphics.h" #include "../inventory.h" #include "../item.h" -//#include "../itemshortcut.h" +#include "../itemshortcut.h" #include "../log.h" #include "../resources/image.h" @@ -197,7 +197,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) { @@ -206,9 +206,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 e4d101c8..2043b7d1 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; |