La valeur par défaut reste la valeur actuelle figée de 4 secondes.
J'ai aussi fait une traduction provisoire du texte d'aide de l'option, à appliquer dans languagues/fr/strings dans le dossier de données: chat_scroll_time_fr_strings.patch
Le contenu des fichiers ci-dessus (en utf-8):
Code : Tout sélectionner
elconfig.c | 1 +
text.c | 4 +++-
text.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/elconfig.c b/elconfig.c
index c8d828a..b63e6cb 100644
--- a/elconfig.c
+++ b/elconfig.c
@@ -2400,6 +2400,7 @@ static void init_ELC_vars(void)
add_var(OPT_INT,"time_warning_hour","warn_h",&time_warn_h,change_int,-1,"Time warning for new hour","If set to -1, there will be no warning given. Otherwise, you will get a notification in console this many minutes before the new hour",CHAT, -1, 30);
add_var(OPT_INT,"time_warning_sun","warn_s",&time_warn_s,change_int,-1,"Time warning for dawn/dusk","If set to -1, there will be no warning given. Otherwise, you will get a notification in console this many minutes before sunrise/sunset",CHAT, -1, 30);
add_var(OPT_INT,"time_warning_day","warn_d",&time_warn_d,change_int,-1,"Time warning for new #day","If set to -1, there will be no warning given. Otherwise, you will get a notification in console this many minutes before the new day",CHAT, -1, 30);
+ add_var(OPT_INT,"chat_auto_scroll_seconds","cass",&chat_auto_scroll_seconds,change_int,4,"Time chat lines stay displayed","Seconds before chat lines scroll up automatically in the game window. No scrolling if less than 1",CHAT, 0, 3600);
add_var(OPT_SPECINT,"auto_afk_time","afkt",&afk_time_conf,set_afk_time,5,"AFK Time","The idle time in minutes before the AFK auto message",CHAT,0,INT_MAX);
add_var(OPT_STRING,"afk_message","afkm",afk_message,change_string,127,"AFK Message","Set the AFK message",CHAT);
add_var(OPT_BOOL, "afk_local", "afkl", &afk_local, change_var, 0, "Save Local Chat Messages When AFK", "When you go AFK, local chat messages are counted and saved as well as PMs", CHAT);
diff --git a/text.c b/text.c
index 2387917..394f62e 100644
--- a/text.c
+++ b/text.c
@@ -70,6 +70,7 @@ char last_pm_from[32];
Uint32 last_server_message_time;
int lines_to_show=0;
+int chat_auto_scroll_seconds=4;
int show_timestamp = 0;
@@ -1441,8 +1442,9 @@ void put_small_colored_text_in_box (Uint8 color, const Uint8 *text_to_add, int l
// find the last lines, according to the current time
int find_last_lines_time (int *msg, int *offset, Uint8 filter, int width)
{
+ int s = chat_auto_scroll_seconds;
// adjust the lines_no according to the time elapsed since the last message
- if ( (cur_time - last_server_message_time) / 1000 > 3)
+ if ( s > 0 && cur_time - last_server_message_time >= 1000 * s)
{
if (lines_to_show > 0)
lines_to_show--;
diff --git a/text.h b/text.h
index 5bf7cbe..642f3fd 100644
--- a/text.h
+++ b/text.h
@@ -74,6 +74,7 @@ extern char last_pm_from[32]; /*!< actor name from whom the last pm arrived */
extern Uint32 last_server_message_time; /*!< timestamp of the last server message */
extern int lines_to_show; /*!< number of lines to show at once */
+extern int chat_auto_scroll_seconds;
extern int show_timestamp;
Code : Tout sélectionner
diff --git a/options.xml b/options.xml
index 0e9f050..e684e91 100644
--- a/options.xml
+++ b/options.xml
@@ -289,6 +289,10 @@
<name>Minutes avant fin de journée</name>
<desc>Si l'option est à -1, il n'y a pas d'avertissement. Autrement, un avertissement en console va apparaitre ces minutes avant la fin de journée.</desc>
</time_warning_day>
+ <chat_auto_scroll_seconds>
+ <name>Défilement automatique des messages</name>
+ <desc>Les messages restent visibles le nombre de secondes donné avant de défiler automatiquement vers le haut, ou restent toujours visibles si zéro.</desc>
+ </chat_auto_scroll_seconds>
<summoning_filter>
<name>Filtre des messages d'invocations</name>
<desc>En activant ce filtre, les messages d'invocations n'apparaissent plus en local.</desc>