From d039422e70e47a762ef61de619e9e98780b12664 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 24 Feb 2010 15:21:11 -0700 Subject: Move StorageWindow to instancing intead of global Also make storage under eAthena more flexible. Reviewed-by: Dennis Friis --- src/gui/popupmenu.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/gui/popupmenu.cpp') 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"))); } -- cgit v1.2.3-70-g09d2