From 89d43a060f924e565650e7a8ed85c199c6f0db36 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 31 Dec 2015 14:48:00 +0100 Subject: Added option to strip hard line-breaks from `mes` dialogs - The `\r` character, in a `mes` dialog, is normally represented by the client as a hard line-break. - Since a client may have different requirements in line lengths (for example using a font with different size or metrics), an user might wish to ignore hard-wraps and let the client automatically soft-wrap instead. - If you want to hard-wrap (official default), keep the SCRIPT_MES_STRIP_LINEBREAK define commented out. - If you want to let the client soft-wrap automatically (may work better for custom clients), uncomment it. - Imprved HULD handling of `\r` (to avoid control characters in the generated file) - Please note that this requires cooperation by script writers: * Each `mes` should contain one and only one sentence, possibly without using the '+' concatenation (but, rather, sprintf). * Two separate sentences (where a hard-wrap is required even for soft-wrapped text) should always go into separate `mes` commands. * Following the above two recommendations, also produces a better quality translations .pot file. Signed-off-by: Haru --- src/config/core.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/config') diff --git a/src/config/core.h b/src/config/core.h index 09954e0cb..afd138a43 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -40,6 +40,17 @@ /// your map-server using more resources while this is active, comment the line #define SCRIPT_CALLFUNC_CHECK +/** + * Strip linebreaks from `mes` dialogs. + * + * Leave this line commented out to keep the hard line-breaks (`\r`) in the + * displayed `mes` dialogs (as in official servers). + * Uncomment it to strip the line-breaks and replace them with spaces, letting + * the client automatically wrap text in dialogs, depending on font size and + * dialog window size (may work better for clients using a non-standard font). + */ +//#define SCRIPT_MES_STRIP_LINEBREAK + /// Comment to disable Hercules' console_parse /// CONSOLE_INPUT allows you to type commands into the server's console, /// Disabling it saves one thread. -- cgit v1.2.3-60-g2f50