diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-24 15:21:11 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-24 15:51:39 -0700 |
commit | d039422e70e47a762ef61de619e9e98780b12664 (patch) | |
tree | d0cb68147e6fe37a8c85e4907766976bf79547b4 /src/gui/popupmenu.cpp | |
parent | 84cf9bcc38028696d02c03cd523b7997906b9f01 (diff) | |
download | mana-d039422e70e47a762ef61de619e9e98780b12664.tar.gz mana-d039422e70e47a762ef61de619e9e98780b12664.tar.bz2 mana-d039422e70e47a762ef61de619e9e98780b12664.tar.xz mana-d039422e70e47a762ef61de619e9e98780b12664.zip |
Move StorageWindow to instancing intead of global
Also make storage under eAthena more flexible.
Reviewed-by: Dennis Friis
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index e9c71496..7e4bfd65 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -320,8 +320,8 @@ void PopupMenu::handleLink(const std::string &link) else if (link == "retrieve") { - ItemAmountWindow::showWindow(ItemAmountWindow::StoreRemove, - storageWindow, mItem); + ItemAmountWindow::showWindow(ItemAmountWindow::StoreRemove, mWindow, + mItem); } else if (link == "party" && being && being->getType() == Being::PLAYER) @@ -356,10 +356,12 @@ void PopupMenu::handleLink(const std::string &link) mItem = NULL; } -void PopupMenu::showPopup(int x, int y, Item *item, bool isInventory) +void PopupMenu::showPopup(Window *parent, int x, int y, Item *item, + bool isInventory) { assert(item); mItem = item; + mWindow = parent; mBrowserBox->clearRows(); if (isInventory) @@ -384,7 +386,7 @@ void PopupMenu::showPopup(int x, int y, Item *item, bool isInventory) mBrowserBox->addRow(strprintf("@@split|%s@@", _("Split"))); } - if (player_node->getInStorage()) + if (StorageWindow::isActive()) { mBrowserBox->addRow(strprintf("@@store|%s@@", _("Store"))); } |