summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mpr.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-02-06 21:56:24 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-02-06 22:04:22 +0100
commitcd1feccb53c2a97927753533a3339ce13500e100 (patch)
tree91fa58be512072aefc6b70415906a7f17037b153 /crawl-ref/source/mpr.h
parent751d75980be90d15ba060f5911b6ec7f1560df5e (diff)
downloadcrawl-ref-cd1feccb53c2a97927753533a3339ce13500e100.tar.gz
crawl-ref-cd1feccb53c2a97927753533a3339ce13500e100.zip
Improved joining of short messages.
They will now only be joined if they fit together in a message line. There's still the arbitrary restriction of <= 30 characters, though I guess that could be dropped or raised. mpr() has an extra parameter (ugh) to disable joining. force_more messages are guaranteed a single line. There's now a check_join() that could be adapted to filter out certain channels or messages, possibly by user configuration at some point should that be necessary. For now, MSGCH_EQUIPMENT is prevented from joining, fixing the problems with commands [" etc, though it may affect too many messages. If you find messages joining up that shouldn't, please add to dcss:feedback:interface:messagewindow on the cdo wiki.
Diffstat (limited to 'crawl-ref/source/mpr.h')
-rw-r--r--crawl-ref/source/mpr.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h
index 295d96a782..8c65ec52f8 100644
--- a/crawl-ref/source/mpr.h
+++ b/crawl-ref/source/mpr.h
@@ -74,7 +74,14 @@ enum msg_colour_type
msg_colour_type msg_colour(int colour);
-void mpr(std::string text, msg_channel_type channel = MSGCH_PLAIN, int param=0);
+void mpr(std::string text, msg_channel_type channel=MSGCH_PLAIN, int param=0,
+ bool nojoin=false);
+
+inline void mprnojoin(std::string text, msg_channel_type channel=MSGCH_PLAIN,
+ int param=0)
+{
+ mpr(text, channel, param, true);
+}
// 4.1-style mpr, currently named mprf for minimal disruption.
void mprf( msg_channel_type channel, int param, const char *format, ... );