summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-10 23:32:35 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-10 23:32:35 +0300
commit66f4de3a19e8692a10f4ab1345769c7ccc914090 (patch)
tree809ed86f749fae05f638d73729addea225e71274
parent881501a05400f58df76036e59313d08305c0b494 (diff)
downloadmanaplus-66f4de3a19e8692a10f4ab1345769c7ccc914090.tar.gz
manaplus-66f4de3a19e8692a10f4ab1345769c7ccc914090.tar.bz2
manaplus-66f4de3a19e8692a10f4ab1345769c7ccc914090.tar.xz
manaplus-66f4de3a19e8692a10f4ab1345769c7ccc914090.zip
Add option to show/hide MVP messages.
By default this messages hidden.
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/gui/setup_chat.cpp3
-rw-r--r--src/net/ea/chathandler.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index d7fa07a07..f8497fba7 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -219,6 +219,7 @@ DefaultsData* getConfigDefaults()
AddDEF(configData, "seflMouseHeal", true);
AddDEF(configData, "enableLazyScrolling", true);
AddDEF(configData, "extMouseTargeting", true);
+ AddDEF(configData, "showMVP", false);
return configData;
}
diff --git a/src/gui/setup_chat.cpp b/src/gui/setup_chat.cpp
index 9e75b9c0a..1b8209c8f 100644
--- a/src/gui/setup_chat.cpp
+++ b/src/gui/setup_chat.cpp
@@ -125,6 +125,9 @@ Setup_Chat::Setup_Chat()
new SetupItemTextField(_("Highlight words (separated by comma)"), "",
"highlightWords", this, "highlightWordsEvent");
+ new SetupItemCheckBox(_("Show MVP messages"), "",
+ "showMVP", this, "showMVPEvent");
+
setDimension(gcn::Rectangle(0, 0, 550, 350));
}
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 3863fc6f3..60af645be 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -338,7 +338,7 @@ void ChatHandler::processMVP(Net::MessageIn &msg)
{
// Display MVP player
int id = msg.readInt32(); // id
- if (localChatTab && actorSpriteManager)
+ if (localChatTab && actorSpriteManager && config.getBoolValue("showMVP"))
{
Being *being = actorSpriteManager->findBeing(id);
if (!being)