diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-23 22:20:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-23 22:20:52 +0300 |
commit | ea721a7170da66bac40f8dfdb8a4de659ccde374 (patch) | |
tree | 1e79b9c393d0279251e103ddcfb02f6af1ac1508 /src/gui/popups/popupmenu.cpp | |
parent | 62d0365986f1a273c276cacac7b3eada9cbf2ae3 (diff) | |
download | manaverse-ea721a7170da66bac40f8dfdb8a4de659ccde374.tar.gz manaverse-ea721a7170da66bac40f8dfdb8a4de659ccde374.tar.bz2 manaverse-ea721a7170da66bac40f8dfdb8a4de659ccde374.tar.xz manaverse-ea721a7170da66bac40f8dfdb8a4de659ccde374.zip |
Add basic support for gm commands for items context menu.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 14305f485..8098799fa 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -614,6 +614,8 @@ void PopupMenu::showPopup(const int x, const int y, // TRANSLATORS: add item name to chat mBrowserBox->addRow("/addchat 'FLOORID''CARDS'", _("Add to chat")); mBrowserBox->addRow("##3---"); + addGmCommands(); + // TRANSLATORS: popup menu item // TRANSLATORS: close menu mBrowserBox->addRow("cancel", _("Cancel")); @@ -1763,6 +1765,7 @@ void PopupMenu::showItemPopup(const int x, const int y, mBrowserBox->addRow("/use 'ITEMID'", _("Use")); } addProtection(); + addGmCommands(); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: close menu @@ -1819,6 +1822,7 @@ void PopupMenu::showItemPopup(const int x, const int y, } } addProtection(); + addGmCommands(); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: close menu @@ -1862,6 +1866,7 @@ void PopupMenu::showDropPopup(const int x, addPickupFilter(mNick); } } + addGmCommands(); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item mBrowserBox->addRow("/cleardrops", _("Clear drop window")); @@ -2119,6 +2124,7 @@ void PopupMenu::showUndressPopup(const int x, const int y, // TRANSLATORS: popup menu item // TRANSLATORS: undress item from player mBrowserBox->addRow("undress item", _("Undress")); + addGmCommands(); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: close menu @@ -2741,6 +2747,14 @@ void PopupMenu::showMonsterGMCommands() } } +void PopupMenu::showFloorItemGMCommands() +{ +} + +void PopupMenu::showItemGMCommands() +{ +} + void PopupMenu::showGMPopup() { mBrowserBox->clearRows(); @@ -2757,11 +2771,16 @@ void PopupMenu::showGMPopup() showNpcGMCommands(); break; case ActorType::Monster: - showMonsterGMCommands(); + showMonsterGMCommands(); + break; + case ActorType::FloorItem: + showFloorItemGMCommands(); break; default: + if (mItemId != 0) + showItemGMCommands(); + break; case ActorType::Unknown: - case ActorType::FloorItem: case ActorType::Portal: case ActorType::LocalPet: case ActorType::Avatar: |