diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-05 03:41:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-05 03:41:13 +0300 |
commit | d0571ca16bb4ef11a718cfa78dc29b57080fcc72 (patch) | |
tree | add362fa6b01bb83c608a78b3a56bf8b52136767 /src/gui/popupmenu.cpp | |
parent | 0202b0b4cdac57a04a3765f6bca893bd3b5c9812 (diff) | |
download | mv-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.gz mv-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.bz2 mv-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.xz mv-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.zip |
Add ability to send client states to other clients.
Using for this emotes.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 0ede3d122..ad62f79a8 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -248,8 +248,23 @@ void PopupMenu::showPopup(int x, int y, Being *being) if (player_relations.getDefault() & PlayerRelation::TRADE) { mBrowserBox->addRow("##3---"); - mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy"))); - mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell"))); + if (being->isAdvanced()) + { + if (being->isShopEnabled()) + { + mBrowserBox->addRow(strprintf( + "@@buy|%s@@", _("Buy"))); + mBrowserBox->addRow(strprintf( + "@@sell|%s@@", _("Sell"))); + } + } + else + { + mBrowserBox->addRow(strprintf( + "@@buy|%s@@", _("Buy (?)"))); + mBrowserBox->addRow(strprintf( + "@@sell|%s@@", _("Sell (?)"))); + } } } break; @@ -428,8 +443,8 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick) mBrowserBox->addRow("##3---"); if (player_relations.getDefault() & PlayerRelation::TRADE) { - mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy"))); - mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell"))); + mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy (?)"))); + mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell (?)"))); } mBrowserBox->addRow(strprintf("@@name|%s@@", _("Add name to chat"))); @@ -652,8 +667,22 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab) if (player_relations.getDefault() & PlayerRelation::TRADE) { mBrowserBox->addRow("##3---"); - mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy"))); - mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell"))); + if (being->isAdvanced()) + { + if (being->isShopEnabled()) + { + mBrowserBox->addRow(strprintf( + "@@buy|%s@@", _("Buy"))); + mBrowserBox->addRow(strprintf( + "@@sell|%s@@", _("Sell"))); + } + } + else + { + mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy (?)"))); + mBrowserBox->addRow(strprintf( + "@@sell|%s@@", _("Sell (?)"))); + } } mBrowserBox->addRow("##3---"); |