From 34148e21012289b8ebf4ba5a3e2aa8b65051fd55 Mon Sep 17 00:00:00 2001 From: Simon Effenberg Date: Mon, 12 Jan 2015 11:32:32 +0100 Subject: adding preference option for dynamic input blocking /inpblock is now having subcommands 'timeout' and 'dynamic' with: /inpblock timeout and /inpblock dynamic Defaults are: /inpblock timeout 500 /inpblock dynamic on To get the old behavior specify: /inpblock timeout 20 /inpblock dynamic off The dynamic mode will block incrementally after something should be written to the window or after a key was pressed. So pressing a key would set the timeout to 0ms and after 10 timeouts to the next bigger one. Example (with dynamic mode on): "/inpblock timeout 50" timeout series: 10x 0ms 10x 10ms (0ms + 10 times since last keypress) 10x 30ms (10ms + 20 times since last keypress) *x50ms until next key was pressed or --- src/ui/console.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui/console.c') diff --git a/src/ui/console.c b/src/ui/console.c index d219a175..69abafef 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1182,7 +1182,12 @@ cons_show_chat_prefs(void) void cons_inpblock_setting(void) { - cons_show("Input block (/inpblock) : %d milliseconds", prefs_get_inpblock()); + cons_show("Input timeout (/inpblock) : %d milliseconds", prefs_get_inpblock()); + if (prefs_get_boolean(PREF_INPBLOCK_DYNAMIC)) { + cons_show("Input dynamic (/inpblock) : ON"); + } else { + cons_show("Input dynamic (/inpblock) : OFF"); + } } void -- cgit 1.4.1-2-gfad0