From 7eabdd0b8c8281128249659c4d8e8501c10da66e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Feb 2016 00:16:55 +0300 Subject: Add into gm context menu for items command info. --- src/gui/popups/popupmenu.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 8098799fa..2467c0726 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -580,6 +580,7 @@ void PopupMenu::showPopup(const int x, const int y, mX = x; mY = y; mFloorItemId = floorItem->getId(); + mItemId = floorItem->getItemId(); mType = ActorType::FloorItem; mSubType = BeingTypeId_zero; for (int f = 0; f < maxCards; f ++) @@ -1450,6 +1451,7 @@ void PopupMenu::handleLink(const std::string &link, if (item) { mFloorItemId = item->getId(); + mItemId = item->getItemId(); for (int f = 0; f < maxCards; f ++) mItemCards[f] = item->getCard(f); showPopup(getX(), getY(), item); @@ -1723,6 +1725,7 @@ void PopupMenu::showPopup(Window *const parent, mBrowserBox->addRow("##3---"); addPickupFilter(mNick); } + addGmCommands(); // TRANSLATORS: popup menu item // TRANSLATORS: add item name to chat mBrowserBox->addRow("/addchat 'ITEMID''CARDS'", _("Add to chat")); @@ -2749,10 +2752,16 @@ void PopupMenu::showMonsterGMCommands() void PopupMenu::showFloorItemGMCommands() { + // TRANSLATORS: popup menu item + // TRANSLATORS: show item information + mBrowserBox->addRow("/iteminfo 'ITEMID'", _("Info")); } void PopupMenu::showItemGMCommands() { + // TRANSLATORS: popup menu item + // TRANSLATORS: show item information + mBrowserBox->addRow("/iteminfo 'ITEMID'", _("Info")); } void PopupMenu::showGMPopup() @@ -2771,16 +2780,16 @@ void PopupMenu::showGMPopup() showNpcGMCommands(); break; case ActorType::Monster: - showMonsterGMCommands(); + showMonsterGMCommands(); break; case ActorType::FloorItem: showFloorItemGMCommands(); break; default: + case ActorType::Unknown: if (mItemId != 0) showItemGMCommands(); break; - case ActorType::Unknown: case ActorType::Portal: case ActorType::LocalPet: case ActorType::Avatar: -- cgit v1.2.3-70-g09d2