Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-06 18:21:43 +0000
committerStijn Buys <ingar@osirion.org>2008-10-06 18:21:43 +0000
commitb8a6949fcc62e0bc59fc6a1ee8adba1df92b9b09 (patch)
tree04b5eb5a5ee5b96214831554c12e1a154c1b0921
parentd13118f006f0249577c5a829c2c22a33fe12d8ac (diff)
changed scroll offset from 5 to 3
-rw-r--r--src/client/console.cc14
1 files changed, 10 insertions, 4 deletions
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<std::string>::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)) {