summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-02 03:02:25 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-02 03:02:25 +0300
commit17631dacf2cb8ebc3acc1dae9df0729a80a150d9 (patch)
treef05dce9d2cedcf3690f789e7697658608bd83436 /src/gui/popupmenu.cpp
parent30a3e0b6d4b773e2d803730d9815c4d0eab3ff81 (diff)
downloadmv-17631dacf2cb8ebc3acc1dae9df0729a80a150d9.tar.gz
mv-17631dacf2cb8ebc3acc1dae9df0729a80a150d9.tar.bz2
mv-17631dacf2cb8ebc3acc1dae9df0729a80a150d9.tar.xz
mv-17631dacf2cb8ebc3acc1dae9df0729a80a150d9.zip
Add enemy relation.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index d7c7e54df..a457573ce 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -145,6 +145,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -152,6 +153,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -159,6 +161,15 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("unignore", _("Unignore"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::ENEMY2:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -379,6 +390,7 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -386,6 +398,7 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -393,6 +406,7 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("unignore", _("Unignore"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -407,6 +421,14 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("erase", _("Erase"));
break;
+ case PlayerRelation::ENEMY2:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
case PlayerRelation::ERASED:
mBrowserBox->addRow("unignore", _("Unignore"));
mBrowserBox->addRow("disregard", _("Disregard"));
@@ -625,6 +647,7 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -632,6 +655,7 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -639,6 +663,7 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("unignore", _("Unignore"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("enemy", _("Set as enemy"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -648,6 +673,14 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("erase", _("Erase"));
break;
+ case PlayerRelation::ENEMY2:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
case PlayerRelation::IGNORED:
mBrowserBox->addRow("unignore", _("Unignore"));
mBrowserBox->addRow("erase", _("Erase"));
@@ -895,6 +928,16 @@ void PopupMenu::handleLink(const std::string &link,
{
player_relations.setRelation(mNick, PlayerRelation::BLACKLISTED);
}
+ else if (link == "enemy" && being &&
+ being->getType() == ActorSprite::PLAYER)
+ {
+ player_relations.setRelation(being->getName(),
+ PlayerRelation::ENEMY2);
+ }
+ else if (link == "enemy" && !mNick.empty())
+ {
+ player_relations.setRelation(mNick, PlayerRelation::ENEMY2);
+ }
else if (link == "erase" && being &&
being->getType() == ActorSprite::PLAYER)
{