From b8a6949fcc62e0bc59fc6a1ee8adba1df92b9b09 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 6 Oct 2008 18:21:43 +0000 Subject: changed scroll offset from 5 to 3 --- src/client/console.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/console.cc b/src/client/console.cc index bc99bfd..e3c4288 100644 --- a/src/client/console.cc +++ b/src/client/console.cc @@ -101,6 +101,9 @@ void Console::toggle() void Console::keypressed(unsigned int key) { + // number of lines to scroll + const size_t scroll_offset = 3; + std::deque::reverse_iterator upit; switch( key ) { @@ -163,12 +166,15 @@ void Console::keypressed(unsigned int key) } break; case SDLK_PAGEUP: - console_scroll +=5; - if (console_scroll > consoleinterface_text.size()) console_scroll = consoleinterface_text.size(); + console_scroll += scroll_offset; + if (console_scroll > consoleinterface_text.size()) + console_scroll = consoleinterface_text.size(); break; case SDLK_PAGEDOWN: - if (console_scroll > 5) console_scroll -=5; - else console_scroll = 0; + if (console_scroll > scroll_offset) + console_scroll -= scroll_offset; + else + console_scroll = 0; break; default: if ((key >= 32 ) && (key <175) && ((*history_pos).size() < MAXCMDSIZE)) { -- cgit v1.2.3